Model sync (Reverse ETL) from BigQuery to LinkedIn Ads
Model sync (Reverse ETL) from BigQuery to LinkedIn Ads
This example creates a Model Sync from BigQuery to LinkedIn Ads using the Polytomic Terraform provider.
Prerequisites:
- Install the Polytomic Terraform provider.
- Set your Polytomic API key as an environment variable.
1. Configure the Polytomic provider
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, specify the key along with an organization user email. A user with that email will be used when operating on an organization. The user will be created if it does not exist.
2. Create a BigQuery connection
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.
3. Create a LinkedIn Ads connection
Create the LinkedIn Ads Connection through Polytomic’s OAuth flow so Polytomic can request the required LinkedIn Ads API permissions on your behalf. Use the admin console or embedded authentication.
Once the Connection exists, reference it from Terraform with the Polytomic LinkedIn Ads datasource.
4. Create a source model for the LinkedIn Ads audience
Define a model that queries BigQuery:
5. Create the Model Sync
Define a resource that syncs the model to a LinkedIn Ads audience:
6. Apply the configuration
Initialize Terraform and apply:
Review the planned changes and confirm to proceed.
For more details, see the Polytomic Terraform provider documentation.
