View a markdown version of this page

Automatic lineage capture from AWS services - AWS Glue

Automatic lineage capture from AWS services

AWS analytics and machine learning services send lineage to the AWS Glue Data Catalog on your behalf. On supported releases, you don't need to install a library or change your code.

How AWS services capture lineage

For Spark engines (Amazon EMR and AWS Glue), the service sets the following Spark properties when a cluster, application, or job starts. The OpenLineage listener then sends an event to AWS Glue Data Catalog for each Spark action that writes data.

Property Value
spark.extraListeners io.openlineage.spark.agent.OpenLineageSparkListener
spark.openlineage.transport.type amazon_glue_api
spark.openlineage.transport.region The Region where the job runs
spark.glue.accountId The AWS account ID that runs the job
spark.openlineage.columnLineage.datasetLineageEnabled true
Note

The AWS Glue Data Catalog lineage library is already on the classpath in supported Amazon EMR and AWS Glue releases.

If your job sets spark.extraListeners or spark.jars, the service adds its values to yours. If you override the transport properties, the job stops sending lineage to AWS Glue Data Catalog.

What's captured

  • Jobs and queries that write data: CREATE TABLE AS SELECT, INSERT, MERGE, UPDATE, DELETE, DataFrame writes, and DDL such as CREATE TABLE.

  • Input and output datasets, resolved to Glue table ARNs for tables in your Data Catalog.

  • Column lineage, when the engine can derive it.

  • Run context: the account, Region, platform, cluster or job, run ID, and the roles that ran the job. For details, see Identities recorded in lineage events.

  • The query text, for SQL statements.

Queries that only read data, such as SELECT, aren't captured.

Supported services

Considerations

For limitations, see Considerations.