This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"count": 6, | |
"items": [ | |
{ | |
"name": "NETFLIX STUDIOS, LLC", | |
"address1": "5808 W. Sunset Blvd.", | |
"address2": null, | |
"city": "Los Angeles", | |
"state": "CA", | |
"country": "US", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"count": 250, | |
"items": [ | |
{ | |
"keyword": "AMAZON REDSHIFT SPECTRUM", | |
"registration_number": "6576796", | |
"serial_number": "87417228", | |
"status_label": "Live/Registered", | |
"status_code": "700", | |
"status_date": "2021-11-30", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BQ_Task: | |
params: [table_id] | |
steps: | |
- delete: | |
call: BQ_Query | |
args: | |
query: ${"DELETE FROM `my-project.analytics_242990349."+table_id+"` | |
WHERE event_name IN ('not a real event')"} | |
result: queryResult | |
- documentFound: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cacheHit":false, | |
"jobComplete":true, | |
"jobReference":{ | |
"jobId":"job_jUSVysoZkp--JxdWP_xqU6NZgrMM", | |
"location":"US", | |
"projectId":"my-project" | |
}, | |
"kind":"bigquery#queryResponse", | |
"rows":[ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BQ_Results_LoopItems: | |
params: [items] | |
steps: | |
- init: | |
assign: | |
- i: 0 | |
- result: "" | |
- check_condition: | |
switch: | |
- condition: ${len(items) > i} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BQ_Query: | |
params: [query] | |
steps: | |
- runBQquery: | |
call: googleapis.bigquery.v2.jobs.query | |
args: | |
projectId: ${sys.get_env("GOOGLE_CLOUD_PROJECT_ID")} | |
body: | |
useLegacySql: false | |
query: ${query} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELETE FROM `my-project.analytics_1234567890.*` | |
WHERE _TABLE_SUFFIX BETWEEN CONCAT('events_', format_date('%Y%m%d', date_sub(CURRENT_DATE, interval 7 day))) | |
AND CONCAT('events_', format_date('%Y%m%d', CURRENT_DATE)) | |
AND event_name IN ('event_name_that_we_delete') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- initialize: | |
assign: | |
- project: ${sys.get_env("GOOGLE_CLOUD_PROJECT_ID")} | |
- firestoreDatabaseId: (default) | |
- firestoreBackupBucket: gs://my_bucket_for_backups | |
- exportFirestoreDatabaseAll: | |
call: http.post | |
args: | |
url: ${"https://firestore.googleapis.com/v1/projects/"+project+"/databases/"+firestoreDatabaseId+":exportDocuments"} | |
auth: |