This is the structure of my database. Currently, I have a BIG csv file that contains all the fields. I'm thinking of several solutions:
I'm still at a stage of learning SQL, so I want to find a naive way of importing the data. Any suggestions?
This is too long for a comment.
I would bring your giant CSV file into a staging table -- you might even want all the fields to be strings, if there might be data conversion issues.
Then, use the staging table to create the tables in your data model. If you are using Postgres, you can actually set up a single set of CTEs to load into all the tables in one expression.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.