Skip to main content
Version: Next

Glue

Certified

Important Capabilities

CapabilityStatusNotes
Asset ContainersEnabled by default. Supported for types - Database.
Column-level LineageSupport via the emit_s3_lineage config field.
Detect Deleted EntitiesEnabled by default via stateful ingestion.
DomainsSupported via the domain config field.
Platform InstanceEnabled by default.
Table-Level LineageEnabled by default.

Note: if you also have files in S3 that you'd like to ingest, we recommend you use Glue's built-in data catalog. See here for a quick guide on how to set up a crawler on Glue and ingest the outputs with DataHub.

This plugin extracts the following:

  • Tables in the Glue catalog
  • Column types associated with each table
  • Table metadata, such as owner, description and parameters
  • Jobs and their component transformations, data sources, and data sinks

IAM permissions

For ingesting datasets, the following IAM permissions are required:

{
"Effect": "Allow",
"Action": [
"glue:GetDatabases",
"glue:GetTables"
],
"Resource": [
"arn:aws:glue:$region-id:$account-id:catalog",
"arn:aws:glue:$region-id:$account-id:database/*",
"arn:aws:glue:$region-id:$account-id:table/*"
]
}

For ingesting jobs (extract_transforms: True), the following additional permissions are required:

{
"Effect": "Allow",
"Action": [
"glue:GetDataflowGraph",
"glue:GetJobs",
"s3:GetObject",
],
"Resource": "*"
}

For profiling datasets, the following additional permissions are required:

    {
"Effect": "Allow",
"Action": [
"glue:GetPartitions",
],
"Resource": "*"
}

CLI based Ingestion

Starter Recipe

Check out the following recipe to get started with ingestion! See below for full configuration options.

For general pointers on writing and running a recipe, see our main recipe guide.

source:
type: glue
config:
# Coordinates
aws_region: "my-aws-region"

sink:
# sink configs

Config Details

Note that a . is used to denote nested fields in the YAML recipe.

FieldDescription
aws_access_key_id
One of string, null
AWS access key ID. Can be auto-detected, see the AWS boto3 docs for details.
Default: None
aws_advanced_config
object
Advanced AWS configuration options. These are passed directly to botocore.config.Config.
aws_endpoint_url
One of string, null
The AWS service endpoint. This is normally constructed automatically, but can be overridden here.
Default: None
aws_profile
One of string, null
The named profile to use from AWS credentials. Falls back to default profile if not specified and no access keys provided. Profiles are configured in ~/.aws/credentials or ~/.aws/config.
Default: None
aws_proxy
One of string, null
A set of proxy configs to use with AWS. See the botocore.config docs for details.
Default: None
aws_region
One of string, null
AWS region code.
Default: None
aws_retry_mode
Enum
One of: "legacy", "standard", "adaptive"
Default: standard
aws_retry_num
integer
Number of times to retry failed AWS requests. See the botocore.retry docs for details.
Default: 5
aws_secret_access_key
One of string, null
AWS secret access key. Can be auto-detected, see the AWS boto3 docs for details.
Default: None
aws_session_token
One of string, null
AWS session token. Can be auto-detected, see the AWS boto3 docs for details.
Default: None
catalog_id
One of string, null
The aws account id where the target glue catalog lives. If None, datahub will ingest glue in aws caller's account.
Default: None
emit_s3_lineage
boolean
Whether to emit S3-to-Glue lineage.
Default: False
extract_delta_schema_from_parameters
One of boolean, null
If enabled, delta schemas can be alternatively fetched from table parameters.
Default: False
extract_lakeformation_tags
One of boolean, null
When True, extracts Lake Formation tags directly assigned to Glue tables/databases. Note: Tags inherited from databases or other parent resources are excluded.
Default: False
extract_owners
One of boolean, null
When enabled, extracts ownership from Glue table property and overwrites existing owners (DATAOWNER). When disabled, ownership is left empty for datasets. Expects a corpGroup urn, a corpuser urn or only the identifier part for the latter. Not used in the normal course of AWS Glue operations.
Default: True
extract_transforms
One of boolean, null
Whether to extract Glue transform jobs.
Default: True
glue_s3_lineage_direction
string
If upstream, S3 is upstream to Glue. If downstream S3 is downstream to Glue.
Default: upstream
ignore_resource_links
One of boolean, null
If set to True, ignore database resource links.
Default: False
ignore_unsupported_connectors
One of boolean, null
Whether to ignore unsupported connectors. If disabled, an error will be raised.
Default: True
include_column_lineage
boolean
When enabled, column-level lineage will be extracted from the s3.
Default: True
platform
string
The platform to use for the dataset URNs. Must be one of ['glue', 'athena'].
Default: glue
platform_instance
One of string, null
The instance of the platform that all assets produced by this recipe belong to. This should be unique within the platform. See https://docs.datahub.com/docs/platform-instances/ for more details.
Default: None
read_timeout
number
The timeout for reading from the connection (in seconds).
Default: 60
use_s3_bucket_tags
One of boolean, null
If an S3 Buckets Tags should be created for the Tables ingested by Glue. Please Note that this will not apply tags to any folders ingested, only the files.
Default: False
use_s3_object_tags
One of boolean, null
If an S3 Objects Tags should be created for the Tables ingested by Glue.
Default: False
env
string
The environment that all assets produced by this connector belong to
Default: PROD
aws_role
One of string, array, null
AWS roles to assume. If using the string format, the role ARN can be specified directly. If using the object format, the role can be specified in the RoleArn field and additional available arguments are the same as boto3's STS.Client.assume_role.
Default: None
aws_role.union
One of string, AwsAssumeRoleConfig
aws_role.union.RoleArn 
string
ARN of the role to assume.
aws_role.union.ExternalId
One of string, null
External ID to use when assuming the role.
Default: None
database_pattern
AllowDenyPattern
A class to store allow deny regexes
database_pattern.ignoreCase
One of boolean, null
Whether to ignore case sensitivity during pattern matching.
Default: True
domain
map(str,AllowDenyPattern)
A class to store allow deny regexes
domain.key.allow
array
List of regex patterns to include in ingestion
Default: ['.*']
domain.key.allow.string
string
domain.key.ignoreCase
One of boolean, null
Whether to ignore case sensitivity during pattern matching.
Default: True
domain.key.deny
array
List of regex patterns to exclude from ingestion.
Default: []
domain.key.deny.string
string
table_pattern
AllowDenyPattern
A class to store allow deny regexes
table_pattern.ignoreCase
One of boolean, null
Whether to ignore case sensitivity during pattern matching.
Default: True
profiling
GlueProfilingConfig
profiling.column_count
One of string, null
The parameter name for column count in glue table.
Default: None
profiling.enabled
boolean
Whether profiling should be done.
Default: False
profiling.max
One of string, null
The parameter name for the max value of a column.
Default: None
profiling.mean
One of string, null
The parameter name for the mean value of a column.
Default: None
profiling.median
One of string, null
The parameter name for the median value of a column.
Default: None
profiling.min
One of string, null
The parameter name for the min value of a column.
Default: None
profiling.null_count
One of string, null
The parameter name for the count of null values in a column.
Default: None
profiling.null_proportion
One of string, null
The parameter name for the proportion of null values in a column.
Default: None
profiling.profile_table_level_only
boolean
Whether to perform profiling at table-level only, or include column-level profiling as well.
Default: False
profiling.row_count
One of string, null
The parameter name for row count in glue table.
Default: None
profiling.stdev
One of string, null
The parameter name for the standard deviation of a column.
Default: None
profiling.unique_count
One of string, null
The parameter name for the count of unique value in a column.
Default: None
profiling.unique_proportion
One of string, null
The parameter name for the proportion of unique values in a column.
Default: None
profiling.operation_config
OperationConfig
profiling.operation_config.lower_freq_profile_enabled
boolean
Whether to do profiling at lower freq or not. This does not do any scheduling just adds additional checks to when not to run profiling.
Default: False
profiling.operation_config.profile_date_of_month
One of integer, null
Number between 1 to 31 for date of month (both inclusive). If not specified, defaults to Nothing and this field does not take affect.
Default: None
profiling.operation_config.profile_day_of_week
One of integer, null
Number between 0 to 6 for day of week (both inclusive). 0 is Monday and 6 is Sunday. If not specified, defaults to Nothing and this field does not take affect.
Default: None
profiling.partition_patterns
AllowDenyPattern
A class to store allow deny regexes
profiling.partition_patterns.ignoreCase
One of boolean, null
Whether to ignore case sensitivity during pattern matching.
Default: True
profiling.partition_patterns.allow
array
List of regex patterns to include in ingestion
Default: ['.*']
profiling.partition_patterns.allow.string
string
profiling.partition_patterns.deny
array
List of regex patterns to exclude from ingestion.
Default: []
profiling.partition_patterns.deny.string
string
stateful_ingestion
One of StatefulStaleMetadataRemovalConfig, null
Default: None
stateful_ingestion.enabled
boolean
Whether or not to enable stateful ingest. Default: True if a pipeline_name is set and either a datahub-rest sink or datahub_api is specified, otherwise False
Default: False
stateful_ingestion.fail_safe_threshold
number
Prevents large amount of soft deletes & the state from committing from accidental changes to the source configuration if the relative change percent in entities compared to the previous state is above the 'fail_safe_threshold'.
Default: 75.0
stateful_ingestion.remove_stale_metadata
boolean
Soft-deletes the entities present in the last successful run but missing in the current run with stateful_ingestion enabled.
Default: True

Concept Mapping

Source ConceptDataHub ConceptNotes
"glue"Data Platform
Glue DatabaseContainerSubtype Database
Glue TableDatasetSubtype Table
Glue JobData Flow
Glue Job TransformData Job
Glue Job Data sourceDataset
Glue Job Data sinkDataset

Compatibility

To capture lineage across Glue jobs and databases, a requirements must be met – otherwise the AWS API is unable to report any lineage. The job must be created in Glue Studio with the "Generate classic script" option turned on (this option can be accessed in the "Script" tab). Any custom scripts that do not have the proper annotations will not have reported lineage.

Code Coordinates

  • Class Name: datahub.ingestion.source.aws.glue.GlueSource
  • Browse on GitHub

Questions

If you've got any questions on configuring ingestion for Glue, feel free to ping us on our Slack.