Area: Ingestion
Sub-Area: Athena
Applies to: OSS + Cloud
Issue
Some Athena ingestion runs succeed and others fail, with no clear error message or consistent pattern.
You Might Be Asking
- Does the Athena source read Athena query history, and is there a setting to delay or retry it?
- Which settings does an Athena recipe need, and which keys can I use?
- Why does my recipe fail validation after I add
query_log_delayorquery_timeout?
Cause
The Athena source does not read Athena query history or query logs. It declares these capabilities: platform instance, domains, data profiling (tables), lineage to Glue, Iceberg or S3 entities depending on the catalog type, descriptions, and probe. It declares no usage-statistics capability.
Recipes that use the keys query_log_delay, query_history_lookback_days, max_retry_count, retry_backoff_multiplier or query_timeout fail. None of these keys appears in the Athena config, and DataHub config models reject unknown keys. Remove them.
A recipe that lacks query_result_location also fails. This key has no default. It is the S3 path where Athena stores the results of the queries DataHub runs.
If a run fails only some of the time, the cause usually sits in the AWS settings the recipe depends on. Check the items in the Solution section.
Solution
-
Use a valid recipe. Set the three keys that have no default:
aws_region,work_groupandquery_result_location. Remove any retry, timeout or query-log keys.
source:
type: athena
config:
aws_region: "us-east-1"
work_group: "primary"
query_result_location: "s3://<your-bucket>/<prefix>/"
s3_staging_dir is deprecated. Use query_result_location instead.
-
Check the partition query.
extract_partitionsdefaults to true. For each table it runsselect * from table$partitions, which needs SELECT permission on that table. If you don't want to grant it, setextract_partitions: false. -
Check role assumption. If you set
aws_role_arn, DataHub assumes that role foraws_role_assumption_durationseconds. The default is 3600 and the maximum is 43200. -
Check AWS credentials and permissions. Without
usernameandpassword, DataHub uses the standard boto3 credential rules. Make sure the credentials in use can reach Athena, Glue and the S3 result bucket. -
Look at AWS during the failure windows:
- Review Athena CloudWatch metrics for the times when runs failed.
- Check the AWS Health Dashboard for service issues.
- Compare the ingestion logs of failed runs and successful runs for the time of day and the table that failed.
-
If AWS throttles your requests, contact AWS support.