When creating the table I set
ingress_at DATETIME DEFAULT CURRENT_DATETIME
When looking at my schema in BigQuery I can see it worked:
I have a .json file in my bucket that has all the same columns as the table, expect for the ingress_at. I’m now trying to append the data in this file to the existing table, the data loads fine, but I keep ending up with NULL values all throughout the ingress_at table. Why is it not populated with the ingress date time as specified?
I’ve tried:
-
setting CURRENT_DATETIME() instead of CURRENT_DATETIME in the schema at table creation => no change
-
making ingress_at a REQUIRED field => load job fails because there’s no such column in import file
-
setting auto detect TRUE when configuring the load job => errors because the file doesn’t have headers and the ingress_at column doesn’t exist
-
defining a schema for the load job => loads fine, but ingress_at column is entirely populated with NULL values