Import CSV file from Google Cloud Storage to Google Cloud SQL

后端 未结 2 2077
[愿得一人]
[愿得一人] 2021-01-01 06:37

I am trying to import a csv file directly into Google Cloud SQL using the command below.

LOAD DATA LOCAL INFILE \"gs:/zuds/stg/ems/product_offering_fact/0000         


        
2条回答
  •  天命终不由人
    2021-01-01 07:03

    Unsupported MySQL statements: Sending any of the following types of SQL statements will generate an error with the message "Error 1290: The MySQL server is running with the google option so it cannot execute this statement"

    LOAD DATA INFILE Note: LOAD DATA LOCAL INFILE is supported. SELECT ... INTO OUTFILE SELECT ... INTO DUMPFILE INSTALL PLUGIN ... UNINSTALL PLUGIN CREATE FUNCTION ... SONAME ...

    https://cloud.google.com/sql/faq#supportmysqlfeatures

    Additionally, the mysql command line will not understand a gs:// file reference.

提交回复
热议问题