I just started to upload CSV files and creating tables in the database of the company I work for. Would anyone be so kind to explain the proper steps to ensure the copy was complete and there are no mistakes?
My boss told me a few steps of how they do things:
CREATE TABLE -> COPY
or
INSERT DATA -> CREATE INDEX/CONSTRAINTS (if necessary) -> TABLE ANALYSIS
The table analysis part is the confusing part for me. They told me to analyze the table, then check for errors, then get the estimate rows. What do I do with the estimate rows? I used ANALYZE table_name but nothing really shows on the data output.
Please help!
Typically you’ll want to check for a few things
My assumption is “get estimate rows” is he simply wants the number of rows returned. I’ll leave that up to you to figure out how to determine that.
If the CSV file was created correctly, I wouldn’t sweat it too much. Don’t be afraid to ask for help or advice from your colleagues, that’s how you learn!
Best of luck!