Troubleshooting data lineage
The following sections describe common data lineage issues and how to resolve them.
Lineage doesn't appear for a job
Check the following:
-
Release. The job runs on emr-spark-8.2.0 or later, or AWS Glue 6.1 or later.
-
The job writes data. Queries that only read data don't produce lineage.
-
Permission. The role that sends events has
glue:PostLineageEvent. See Permissions to send lineage for which role that is. Look for a warning in the Spark driver log. -
Network. Jobs in private subnets have an interface VPC endpoint for AWS Glue, or another route to it. If the endpoint has a policy, it allows
glue:PostLineageEvent. -
Opt-out. The job doesn't set
spark.openlineage.disabled=true, and no IAM policy or service control policy (SCP) deniesglue:PostLineageEvent. -
Overridden properties. The job doesn't override
spark.openlineage.transport.typeor remove the listener fromspark.extraListeners. -
Time. Lineage is processed asynchronously. Wait a few minutes after the job completes.
The graph shows an S3 path instead of a table
The job wrote by path, not through the Data Catalog. Write to the table by name, for example INSERT INTO sales_db.orders, so the output resolves to the Amazon Resource Name (ARN) of the AWS Glue table.
The same table appears as two nodes
The producers used different identifiers for the same dataset. Use the AWS Glue naming for Data Catalog tables: namespace arn:aws:glue:<region>:<account-id> and name table/<database>/<table>.
Duplicate lineage after moving from Amazon EMR 7.x
The job still lists the Amazon DataZone lineage JAR or properties. Remove them. See Lineage for Amazon EMR.
AccessDeniedException from GetLineageNode
The principal needs glue:GetLineageNode. Data Catalog grants and Lake Formation permissions don't give access to lineage.
InvalidInputException from PostLineageEvent
The event isn't a valid OpenLineage RunEvent. Check that it has eventType, eventTime, run.runId, job.namespace, job.name, and producer, and that the JSON is encoded as UTF-8 bytes (or base64 in the HTTP API).
The lineage system table is empty
-
The system table records events only from the time you turned it on.
-
Check the setting with
aws glue get-data-catalog-export-configuration. -
Wait about 5 minutes after the job completes.
Queries on the lineage system table fail
-
The principal needs Lake Formation
SELECTon the table ands3tables:GetTableData. -
Integration with AWS analytics services is turned on for the
aws-catalogtable bucket. -
If the table uses a customer managed key, the principal has
kms:Decrypt.
Snowflake or Databricks lineage is missing
-
Check the crawler run status and logs.
-
Check that the Snowflake role or Databricks service principal can read the history or lineage system tables.
-
The first run collects only the last 7 days.