erezsh / Preql

An interpreted relational query language that compiles to SQL.
Other
612 stars 13 forks source link

Error on saving table to BigQuery - required field id cannot be null #37

Open dimitri-b opened 3 years ago

dimitri-b commented 3 years ago

Givent this schema in a source table:

2021-08-28_11-45-23

attempting to persist a table in BigQuery thows an error:

connect("bigquery:///gcp-project-name-here")

calendar = import_table("eCom_US.calendar")
temp = calendar{
    Fin_Year,       // INTEGER
    Fin_Year_Label  // STRING
}[..5]
print(temp)

table test_data.temp_cal = temp
// Got error: 400 Required field id cannot be null
erezsh commented 3 years ago

I pushed a fix for this into the schemas branch.