Skip to content

Instantly share code, notes, and snippets.

@pentium10
Created May 18, 2021 16:10
Show Gist options
  • Save pentium10/d370729f2a096870f75a554afe9c8e0d to your computer and use it in GitHub Desktop.
Save pentium10/d370729f2a096870f75a554afe9c8e0d to your computer and use it in GitHub Desktop.
#workflow entrypoint
main:
steps:
- getList:
call: BQ_Query
args:
query: select distinct _TABLE_SUFFIX as table_id FROM `my-project.analytics_242990349.*`
WHERE _TABLE_SUFFIX
BETWEEN CONCAT('events_intraday_', format_date('%Y%m%d', date_sub(CURRENT_DATE, interval 7 day)))
AND CONCAT('events_intraday_', format_date('%Y%m%d', CURRENT_DATE))
result: items
- loopItems:
call: BQ_Results_LoopItems
args:
items: ${items.rows}
result: res
- final:
return: ${res}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment