Area: Observability
Sub-Area: Data Quality
Applies to: Cloud
Issue
You need to know where DataHub Cloud assertions run, what data goes back to DataHub Cloud, and how assertions reach your source systems. This helps with security and compliance reviews.
You Might Be Asking
- Where are DataHub assertions executed?
- What data is sent to DataHub Cloud?
- Does source data leave my network?
- How do assertions connect to my warehouse?
- Do I need a Remote Executor?
- Which platforms support assertions?
Cause
DataHub Cloud has two ways to run assertions. Which one you use decides where queries run.
Solution
Where assertions run
- Default: DataHub Cloud runs assertions itself. It issues a SQL query against the source on a schedule. You do not need a Remote Executor.
- In-network (optional): If you deploy a Remote Executor, assertions execute inside your network. Only the results are sent back to DataHub Cloud. Source data does not leave your network.
A Remote Executor is optional. It is not required for production use.
How assertions connect to your data
Assertions run their queries through the ingestion source that originally ingested the table. They use that source's connection and its configured user or role. There is no separate assertion connection or assertion role. Grant any needed access to the user or role in that ingestion source.
If several ingestion sources ingested the same table, the executor uses the one that ingested the table's dataset properties. Contact DataHub Support to change this.
Credentials with a Remote Executor
Credentials stay local to the Remote Executor only when they come from local secret backends: Kubernetes secrets mounted at /mnt/secrets/, AWS Secrets Manager or GCP Secret Manager at runtime, ECS deploy-time secrets, or environment variables on the executor.
If the ingestion source uses secrets created in the DataHub UI Secrets tab, DataHub decrypts them and sends them to the executor over TLS at runtime. DataHub recommends local secrets for production Remote Executor pools.
Supported platforms
- Active query (DataHub queries the warehouse on a schedule) works only on Snowflake, Redshift, BigQuery and Databricks. Custom SQL assertions, Column Value assertions, time-series bucketing and historical backfill all require active query.
- Other platforms run in ingestion-driven mode. Freshness uses ingested Operations. Volume and Column Metric use ingested dataset profiles. Schema uses the ingested schema. Results refresh only as often as that metadata is ingested.
- Schema assertions are evaluated when DataHub detects a schema change in the ingested schema. They work on any platform whose schema DataHub ingests.
Assertion types
DataHub Cloud evaluates Freshness, Volume, Column (Column Metric and Column Value), Custom SQL and Schema assertions. You can also report results from third-party tools into DataHub, such as dbt test, Great Expectations, Snowflake Data Metric Functions, SQLMesh, Monte Carlo, ODCS and custom assertions through the API.
To create assertions, open the dataset, click the Quality tab, and click Create. You can also use the upsertDataset...Monitor GraphQL mutations or the acryl-datahub-cloud Python SDK (client.assertions.sync_*). Do not use the deprecated datahub assertions CLI or assertion YAML files.
Deploying a Remote Executor (optional)
-
Docker: set these environment variables:
DATAHUB_GMS_URL(must start withhttps://),DATAHUB_GMS_HOST(the raw domain),DATAHUB_GMS_TOKEN(the Remote Executor access token) andDATAHUB_EXECUTOR_POOL_ID. The docs example also setsDATAHUB_EXECUTOR_MODE=worker. - Kubernetes:
helm repo add acryl https://executor-helm.acryl.io
helm repo update
helm install --set global.datahub.executor.pool_id="remote" --set global.datahub.gms.url="https://<your-company>.acryl.io/gms" acryl-executor-worker acryl/datahub-executor-worker
The GMS URL must end in /gms. Set global.datahub.executor.channel=KAFKA only if your pool uses the Kafka channel. The default is SQS.
-
AWS ECS with Terraform: use the module
git::https://github.com/acryldata/datahub-terraform-modules.git//remote-ingestion-executor, pinned with?ref=. Setdatahub.url(with trailing/gms),datahub.executor_pool_idandsubnet_ids. Pass the access token through bothsecrets(asDATAHUB_GMS_TOKEN) andtask_exec_secret_arns. Setcreate_task_exec_iam_role = true, because the task does not launch without it.
See the Remote Executor guide for full examples.
Try it out
The Custom SQL builder's Try it out button is not available for sources that run on a Remote Executor.
Security review
For questions beyond this article, contact DataHub Support.