Area: Ingestion
Sub-Area: AWS Glue
Applies to: OSS + Cloud
Issue
Ownership from AWS Glue tables does not appear on the matching datasets in DataHub, even though you have not turned off ownership extraction in the Glue ingestion recipe.
You Might Be Asking
- Why isn't my Glue table ownership showing up in DataHub?
- Where do I set the owner in AWS Glue?
- Does the owner need to exist in DataHub before ingestion?
- How do I get a group, not a user, as the owner?
- What is the recipe setting for Glue ownership?
- Does Glue ingestion overwrite the owners I set in DataHub?
Cause
The Glue source reads only the table's top-level Owner field. It ignores keys in the table's Parameters map, such as table_owner. If the top-level Owner is empty, DataHub has nothing to ingest.
Ownership extraction is controlled by the extract_owners recipe key. It defaults to true. The key is extract_owners, not extract_ownership. The Glue recipe config rejects keys it doesn't define, so a recipe that sets extract_ownership fails validation.
Solution
- Set the owner in the table's top-level
Ownerfield in AWS Glue. Do not put it inParametersor in custom properties. In Terraform, use the top-levelownerattribute ofaws_glue_catalog_table. - Check the value Glue holds for the table:
import boto3
glue = boto3.client('glue')
response = glue.get_table(DatabaseName='your_database', Name='your_table')
print(response['Table'].get('Owner')) # The value DataHub ingests
- Choose the right value format. DataHub does not look the owner up or match it to an existing user or group:
- A bare value, such as
jdoeoruser@company.com, becomesurn:li:corpuser:<value>. It shows as an owner only on the user whose URN id is that exact string. - A value that starts with
urn:li:corpuser:orurn:li:corpGroup:is used as is. - For a group owner, set the full
urn:li:corpGroup:<id>. A group email becomes a user URN, not a group.
- A bare value, such as
- If you set
extract_ownersin the recipe, spell it exactly. Leave it out to keep the default oftrue. In the Glue source, AWS settings such asaws_regionsit at the top level of the config. See the Glue source documentation.
source:
type: glue
config:
aws_region: us-east-1
extract_owners: true
- Re-run ingestion.
Good to know
-
Existing owners are overwritten. When
extract_ownersis on, ingestion writes the Glue owner as aDATAOWNERowner. It overwrites the existingDATAOWNERowners on that dataset. To keep owners you set in DataHub, setextract_owners: false. - The owner doesn't need to exist in DataHub first. DataHub writes the owner URN without checking that the user or group exists.
- Display of a user that doesn't exist yet (OSS). The owner appears under its username, which is the ID from the URN. It has no name or profile details until a user profile exists. With OIDC SSO in self-hosted DataHub, just-in-time provisioning is on by default, so the profile is created on the user's first SSO login.
DataHub Cloud UI ingestion changes this behavior through the recipe.