Skip to content

Instantly share code, notes, and snippets.

@micheleberardi
Created February 19, 2022 23:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save micheleberardi/bed496fcbdc71206128ac062d5f417a9 to your computer and use it in GitHub Desktop.
Save micheleberardi/bed496fcbdc71206128ac062d5f417a9 to your computer and use it in GitHub Desktop.
script_cron
gcloud scheduler --project micheleone \
jobs create http import_catalog_xmq5ynl8i2i \
--time-zone='America/Los_Angeles' \
--schedule='0 0 * * *' \
--uri='https://retail.googleapis.com/v2alpha/projects/***********/locations/global/catalogs/default_catalog/branches/1/products:import' \
--description='Import Retail catalog data' \
--headers='Content-Type: application/json; charset=utf-8' \
--http-method='POST' \
--message-body='{"inputConfig":{"bigQuerySource":{"projectId":"project-id","datasetId":"retail","tableId":"catalog","dataSchema":"product"}},"reconciliationMode":"INCREMENTAL"}' \
--oauth-service-account-email=''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment