Looker offers a solution to export your Looks through different Deliveries such as email, SFTP or a Webhook. Those Deliveries can be either "One-shot" or "Recurring". Let's see how to use it to synchronize your Looker data with Pigment.
Looker has a row limit of 5,000 rows for data delivery. Even if your Look returns fewer than 5,000 rows, data will not be delivered unless a row limit is explicitly set within Looker.
To optimize data transfers, consider performing an initial bulk load of historical data. After this, update the dataset periodically by delivering only new or modified rows from the Look. This approach helps mitigate Looker’s row limit while maintaining up-to-date data.
Create an import configuration
Download as CSV the Look you wish to export to Pigment. Then follow the How to generate an import configuration ID in Pigment documentation. At the end of that step, you should have your Import Configuration
Get an API key
The Pigment Api Key is used to authenticate Looker calls to Pigment.
You need to generate an Import API Key from the API Keys management page. Follow the Manage API key documentation for more details.
Create a Webhook Delivery in Looker
By creating a Webhook Delivery, Looker pushes the data of your Look directly into Pigment.
Pigment has a dedicated POST API for Looker Webhook Delivery:
https://pigment.app/api/import/push/looker?configurationId={CONFIGURATION_ID}&api_key={API_KEY}
Replace {CONFIGURATION_ID} and {API_KEY} by IDs retrieved in the previous steps.
Note
Your final URL should look like this example:
https://pigment.app/api/import/push/looker?configurationId=3d8eef5c-9dc9-4c6e-b697-a4dadbd3cbcd&api_key=2cd3e145-86d8-43bc-96a9-9d6cd997be87
Looker setup:
Here are the steps you should follow:
- Create a delivery.
- Select the webhook in "Where your data should go"
- Input the following Webhook URL
https://pigment.app/api/import/push/looker?configurationId={CONFIGURATION_ID}&api_key={API_KEY}
.
Don't forget to replace the {CONFIGURATION_ID} and {API_KEY} with the one you got from the two previous steps. - Select CSV in “Format data”
For more information, see the Looker Documentation.
Looker offers you a large range of scheduling options to trigger this Delivery on daily, weekly, or monthly basis.
Note
Once you have set up a recurring delivery of your Look, Looker displays that schedule on the Schedules page. This option is only visible if your Looker admin has given you permission to schedule dashboards and Looks. For more information please consult Looker Documentation.
Once configuration is done, check that the integration is working correctly and importing successful on the Pigment side using the update history panel. Check the standard API documentation for more details.