0

I am trying to import CSV file from my gcs to postgres database in cloud sql, then I connected through pgadmin and make the same columns but with different data types like sale_dollars type in postgres is double precision and in gcs its float,

when I am importing, I am getting this error and I am so confused I have tried to change the data type in pgadmin like real, integer but couldn't find the type of float.

generic::failed_precondition: ERROR: invalid input syntax for type double precision: "sale_dollars" CONTEXT: COPY iowa_test_table, line 1, column sale_dollars: "sale_dollars"

1 Answer 1

0

You are trying to import the header row as if it were data. Tell copy to skip the header row, or just don't produce the header to start with.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.