Data is garbled when importing CSV to SQL instance

61 views
Skip to first unread message

Airflow Ex

unread,
Jul 4, 2022, 4:04:10 PM7/4/22
to Google Cloud SQL discuss
Hello,
    I have been trying to import a CSV file to GCP SQL Instance, PFA a screenshot of the part of the SQL File. Import is showing as successful, I tried both using the UI and gcp sql import command but same result for both. PFA SELECT * command from the table.
    Please let me know what I am doing wrong, and if you need any more information.
Thanks and Regards,
Shashanka
Screenshot 2022-07-03 at 1.55.24 PM.png
Screenshot 2022-07-03 at 1.55.00 PM.png
Screenshot 2022-07-03 at 1.55.46 PM.png

perezsanchez

unread,
Jul 5, 2022, 7:03:45 PM7/5/22
to Google Cloud SQL discuss

SQL Server and Cloud SQL do not support CSV files. As already indicated, SQL Server presently supports importing databases using BAK and SQL files in Cloud SQL.

The Cloud SQL versions for MySQL and PostgreSQL somehow support it.

One of the following options is possible:

Alternatively, switch to MySQL or PostgreSQL as the database engine (where CSV files are supported).

You can utilize your CSV file to create a SQL file that you may use to import into Cloud SQL, SQL Server, if the data on it comes from an on-premises SQL Server DB table.
Reply all
Reply to author
Forward
0 new messages