I'm trying to create a BQ table schema, as seen on this page
But I get a compilation error for all the mode="REQUIRED"
I didn't see anything special to import but the bq module.
Expected type '_SpecialForm[str]', got 'str' instead
The code:
bqServiceWrapper.create_table(_ADS_TO_REMOVE_TABLE_NAME,
[
bigquery.SchemaField("add_id", "STRING", mode="REQUIRED"),
bigquery.SchemaField("timestamp_str", "TIMESTAMP", mode="REQUIRED"),
bigquery.SchemaField("timestamp", "TIMESTAMP", mode="REQUIRED")
])
BTW does the python BQ library allows creating a table without a schema (like Java does?). If so - how can the type to implied as "TIMESTAMP"
and not "STRING"
?