Skip to content
Advertisement

Bigquery Partition Date Python

I would like to write another table by partition date the table in bigquery. But I couldn’t find how to do it. I use Python and google cloud library. I want to create a table using standard SQL.But I get an error.

Error : google.api_core.exceptions.BadRequest: 400 GET https://bigquery.googleapis.com/bigquery/v2/projects/astute-baton-272707/queries/f4b9dadb-1390-4260-bb0e-fb525aff662c?maxResults=0&location=US: The number of columns in the column definition list does not match the number of columns produced by the query at [2:72]

Please let me know if there is another solution. Day to day İnsert to table the next stage of the project.

I may have been doing it wrong from the beginning. I am not sure.

Thank You.

Advertisement

Answer

A quick solution for the problem presented here: When creating a table, you don’t need to declare the schema of it, if there’s a query where data is coming from. Right now there’s a conflict between the data and the declared schema. So remove one.

Instead of starting the query with:

Start the query with:

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement