View previous topic :: View next topic |
Author |
Message |
Scrynor
Joined: 26 Jul 2021 Posts: 83 Location: New York
|
Posted: Fri Apr 15, 2022 2:12 pm Post subject: CMUD and database variables |
|
|
Anybody have experience using databases in CMUD? I feel like I'm losing my mind.
I managed to make a database and access the info in it. What is killing me is trying to get the import / export functionality to work. Everything imports and exports to and from CSV just fine. The problem is that I cannot assign the columns to fields on import. I am trying to make a template to have new database know the fields so I can import from CSV but it just does not work. I can save a database as template and it claims it does it and makes a dbd file but the template never shows up as an option to select in CMUD when picking a template for a new database.
Please help! |
|
Back to top |
|
|
Olyn Immortal
Joined: 23 Jul 2008 Posts: 3252 Location: Pennsylvania
|
Posted: Sat Apr 16, 2022 1:49 pm Post subject: |
|
|
I haven't used the db, but I may be able to help you accomplish your goal without it. What are you trying to use it for? |
|
Back to top |
|
|
Scrynor
Joined: 26 Jul 2021 Posts: 83 Location: New York
|
Posted: Sun Apr 17, 2022 1:56 am Post subject: |
|
|
Hah, I kind of can't say without outing my character...
I actually already can replicate the functionality I wanted without using database variables. I wanted to use the database version though because of the ease of data entry by just being able to do a csv file instead of working with xml or the wizard. But if I have to redo fields every time that completely destroys it being easier. I might be able to cheese it but I feel like it must work somehow... I just don't know how. |
|
Back to top |
|
|
Olyn Immortal
Joined: 23 Jul 2008 Posts: 3252 Location: Pennsylvania
|
Posted: Sun Apr 17, 2022 12:05 pm Post subject: |
|
|
I'm always happy to help or collaborate, especially on cMUD. If you want, you can DM me on discord (I'm blarg on the AR server) or PM me here. I'm an implementor on the game so you don't have to worry about outing your character if you contact me directly. |
|
Back to top |
|
|
BlackWidow
Joined: 24 Apr 2014 Posts: 484 Location: Yes
|
Posted: Sun Apr 17, 2022 3:27 pm Post subject: |
|
|
I've not got experience with CMUD itself, but that sounds like something which is doable directly within R (and possibly Python as well). My day job requires me to work extensively with csv files as part of a data science team within a larger organization, and one of the things I do regularly with a file about 1 GB (!) in size is I select five relevant columns out of a much larger file... I can refer to specific columns as needed with aliases if I so desire. Analysis has been done by a colleague with a Google machine learning algorithm based on the contents of one column with numbers of one to five to determine the overall sentiment of customers regarding various products reviewed in the file. |
|
Back to top |
|
|
Davairus Implementor
Joined: 16 Jan 2004 Posts: 10368 Location: 0x0000
|
Posted: Sun Apr 17, 2022 5:59 pm Post subject: |
|
|
is there an option like "my file contains headers" or something like that |
|
Back to top |
|
|
Scrynor
Joined: 26 Jul 2021 Posts: 83 Location: New York
|
Posted: Sun Apr 17, 2022 7:28 pm Post subject: |
|
|
Yes, there is a "use first row as header" option. The problem is that just the first row isn't sufficient because the CMUD database implementation has other meta data around fields such as default values and things. So there is a *.dbd file that is the database definition file. So when you have a database open you can save it's fields as a template and make a *.dbt file. But it doesn't ever let you pick that file. It is looking for some templates db of all the saved templates but that doesn't exist. I can copy the *.dbd file of a like database and that tricks CMUD into know the field definitions but for whatever reason the import of a different CSV still doesn't work. It works perfectly in the wizard and lines up all the rows in the CSV with the right fields from the DBD based on the header but then it doesn't actually import. It just all comes in as blank despite the data being there in the import wizard. It is super frustrating.
Widow, I know python but the issue here is the CMUD implementation. I could get all the data I was into python no problem. But how do I get it into CMUD in a way that I can access it while scripting? I have no idea.
Thanks for the replies all! Appreciate the interest. |
|
Back to top |
|
|
|