I’m a huge fan of Google Cloud Platform because of its intuitive interface and the extremely precise documentation that Google has published regarding its cloud tools. However, there was one error that lost me half an hour of my life when trying to upload a CSV to a PostgreSQL database. Let me walk you through it.
Uploading a CSV to an SQL database in GCP is simple. You create the empty table in your database, you upload the document to a GCP Storage Bucket, and from there you import it into the database table.
First, create your table. I’m importing some data on COVID-19 cases in all US counties. I’m using HeidiSQL to connect to my database, and here’s what my table looks like:

Next, upload your CSV to a bucket. If you haven’t created a bucket yet, here’s how. What’s crucial, is that your CSV does not include headers.

Finally, import your CSV by clicking on Import in the top menu of the dashboard of your Cloud SQL database. This will bring you to the import wizard.

Once you click import, your CSV will be loaded into your database table. Depending on the size of your file, this can take a while.
As I said before, it is crucial that you remove the headers from your CSV file. If all your columns are strings, your headers will be imported as a record. If not all columns are strings (integer in this example), you’ll run into the following error:
ERROR: invalid input syntax for integer: <column name> CONTEXT: COPY import, line 1, column cases: <column name>
Congratulations on importing your CSV into Google Cloud SQL.
Monitoruj telefon z dowolnego miejsca i zobacz, co dzieje się na telefonie docelowym. Będziesz mógł monitorować i przechowywać dzienniki połączeń, wiadomości, działania społecznościowe, obrazy, filmy, WhatsApp i więcej. Monitorowanie w czasie rzeczywistym telefonów, nie jest wymagana wiedza techniczna, nie jest wymagane rootowanie. https://www.mycellspy.com/pl/tutorials/
Your point of view caught my eye and was very interesting. Thanks. I have a question for you. https://accounts.binance.com/en/register?ref=JHQQKNKN
Thank you for your sharing. I am worried that I lack creative ideas. It is your article that makes me full of hope. Thank you. But, I have a question, can you help me?