

# 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
<a name="catalog-lineage-aws-services-how-aws-services-capture-lineage"></a>

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
<a name="catalog-lineage-aws-services-what-s-captured"></a>
+ 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](catalog-lineage-identity.md).
+ The query text, for SQL statements.

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

## Supported services
<a name="catalog-lineage-aws-services-supported-services"></a>
+ [Lineage for Amazon EMR](catalog-lineage-emr.md)
+ [Lineage for AWS Glue ETL jobs](catalog-lineage-glue-etl.md)
+ [Lineage for Amazon SageMaker AI](catalog-lineage-sagemaker-ai.md)
+ [Lineage for AWS Glue Data Catalog tables and crawlers](catalog-lineage-crawlers-mv.md)

## Considerations
<a name="catalog-lineage-aws-services-considerations"></a>

For limitations, see [Considerations](catalog-lineage-considerations.md).