This guide shows how to send SQLMesh metadata and the output of
sqlmesh run and sqlmesh audit to Coalesce Quality. Coalesce Quality uses it to show your models, and run, test and audit failures. Only SQLMesh metadata is sent, no data from your tables.To finish this guide, you need to be able to change the tool that runs SQLMesh (e.g. your Airflow DAG or CI job).⏱️ Estimated time to finish: 10 minutes.Create the integration
- Navigate to Settings → Integrations → Add Integration and select SQLMesh.
- Enter an integration name, for example
SQLMesh. - Select the Git integration of the repository with your SQLMesh project. Coalesce Quality reads audit references from the model files, so audit executions need it.
- If you use Snowflake or Databricks, enter the Snowflake account or Databricks workspace URL from your warehouse integration, so that models link to their tables.
- Click Create.
Create a token
On the integration page, create a token in the Upload tokens section. You can also open the menu of the integration in Settings → Integrations and click Manage tokens.Install synq-sqlmesh
synq-sqlmesh collects the metadata and uploads it. It uses the web module of SQLMesh, so install SQLMesh with it:
synq-sqlmesh-arm64-linux) and macOS on Intel (synq-sqlmesh-amd64-darwin).
Upload metadata and logs
Run these commands from the SQLMesh project directory, aftersqlmesh run and sqlmesh audit:
synq-sqlmesh upload starts the SQLMesh UI on localhost:8080 to read the metadata, and stops it when it is done. Use --sqlmesh-ui-port if that port is in use, and --sqlmesh-project-dir if you run the command from a different directory.
Regional configuration
synq-sqlmesh uploads to the EU region by default. For US and AU workspaces, add --synq-endpoint to every synq-sqlmesh command:
developer.synq.io:443 (EU), api.us.synq.io:443 (US) or api.au.synq.io:443 (AU).
For all options, run synq-sqlmesh --help or see the synq-sqlmesh repository.