Model sync (Reverse ETL) from BigQuery to Salesforce
Model sync (Reverse ETL) from BigQuery to Salesforce
Model sync (Reverse ETL) from BigQuery to Salesforce
This example creates a Model Sync from BigQuery to Salesforce using the Polytomic Terraform provider.
Prerequisites:
Configure the Polytomic provider in your Terraform script:
Define var.polytomic_api_key in your variables file or pass it at apply time.
🤝 Partner keys
If you are using a partner key, set
partner_keyon the provider and setorganizationon each resource that targets a specific organization.
Define a resource for the BigQuery connection:
This example loads the service account key with the file function.
Any string value or variable works as well.
Polytomic supports several authorization modes for Salesforce. To manage a Salesforce Connection from Terraform, you must supply the client ID and secret.
If you want to use Polytomic’s OAuth flow instead, create the Connection through the admin console or the authentication API, then reference it from Terraform with the Salesforce datasource.
Define the Salesforce Connection:
🤝 Partner keys
When using a partner key, you must also set the Organization ID on every resource.
Define a model that queries BigQuery:
Define a Model Sync to Salesforce. This example creates an update-only sync to Salesforce Contacts, matched on email address:
Initialize Terraform and apply:
Review the planned changes and confirm to proceed.
For more details, see the Polytomic Terraform provider documentation.