Google BigQuery Streaming failed sometimes if I do delete table and create table first, before streaming
Avoid truncating and recreating tables while streaming.
From the official docs:
https://cloud.google.com/bigquery/troubleshooting-errors#streaming
Table Creation/Deletion - Streaming to a nonexistent table will return a variation of a notFound response. Creating the table in response may not immediately be recognized by subsequent streaming inserts. Similarly, deleting and/or recreating a table may create a period of time where streaming inserts are effectively delivered to the old table and will not be present in the newly created table.
Table Truncation - Truncating a table's data (e.g. via a query job that uses writeDisposition of WRITE_TRUNCATE) may similarly cause subsequent inserts during the consistency period to be dropped.
To avoid losing data: Create a new table with a different name.