Skip to content

How do I best create a JSON from a flat csv for table creation in OEP? #925

Answered by jh-RLI
pajot asked this question in Q&A
Discussion options

You must be logged in to vote

There are several possible solutions here. We have not yet agreed on a best practice (we dont recommend the 4. option, as this is not available to the user.)

  1. Use the wizard (OEP website) to upload CSV data - navigate to Database -> click Create Table on the right side -> Create the table -> switch to Upload CSV tab / If table present: navigate to table -> click upload CSV.
  2. read the data with pandas convert to JSON and then upload with the API. Examples: tutorial: 11 (section 2.1.2. Upload data)
  3. read the data with pandas and use sqlalchemy with oedialect: Tutorial: OEP-oedialect_upload_from_csv, Tutorial: OEP_Upload_Process_Data_and_Metadata_oem2orm using pandas to_sql() function with sq…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@pajot
Comment options

@jh-RLI
Comment options

Answer selected by pajot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants