I am trying to build a partition table populated with data from shareded tables. So, in this partition table, I'll unnest some variables, in order to have the data more organized. My question is: in order to have the table populated with all the data I have from the past 365 days, and to have the table automatically updated every day, which function should I use? Is this one correct: From table_xxx_xxx.xxx_* WHERE _TABLE_SUFFIX BETWEEN FORMAT_DATE("%Y%m%d", DATE_SUB(CURRENT_DATE(), INTERVAL 15 DAY)) AND FORMAT_DATE("%Y%m%d", DATE_SUB(CURRENT_DATE(), INTERVAL 1 DAY))
Asked
Active
Viewed 9 times