I have set up a pipeline which works as follows: A message is published to a PubSub topic which has schema enforcement & then a PubSub-to-BigQuery subscriber sends the messages into a BQ table with the same schema.
I have a specific field called ingestion_time which is meant to indicate when rows are inserted into the table. It is NULLABLE in the table schema, it has a TIMESTAMP type and a defaultValueExpression set to CURRENT_TIMESTAMP().
Messages are published to the topic without including the ingestion_time field in the message body. However, when messages are loaded into the table, the ingestion_time field is always null. How come the defaultValueExpression is not assigning the CURRENT_TIMESTAMP() values when rows are loaded into the table?
Thank you in advance
Edit: I have now reached a solution, the issue was that the ingestion_time field was incorrectly included in the topic schema. Once I removed it and published a test message, the defaultValueExpression is applied correctly.