I have a dataset in BigQuery where I upload a new table every 2 days. All tables are the same.
Want to write and schedule a query than Union all tables, including when a newone is uploaded to the dataset.
Using the below one and is working, however every time I add a new table I need to manually include it in the query. Looking for an option where the query is querying all tables in the dataset.
(Select * from PnL.kapitani as cl WHERE cl.billing_date is not null)
Union ALL (Select * from PnL.One_Time WHERE billing_date is not null)
Union ALL (Select * from PnL.DSP WHERE billing_date is not null)
Union ALL (Select * from PnL.strypes WHERE billing_date is not null)
Union ALL (Select * from PnL.Cloud_Office WHERE billing_date is not null))```