Skip to content

Glue Join showing no data to display after renaming keys

0

In Glue, I am trying to join some tables together. When joining these tables it works fine until I have to rename the keys due to overlapping field names. After this, sometimes I will get a perfect join and it will work great, but the other 95% of the time it just tells me there is no data to display. If I save the job and go back into it sometimes it will fix itself, but normally just gives me the same "no data to display". I am using an IAM role specifically for glue, and the data is coming out of S3 correctly, and even previews correctly in the transform - schema change, it just will not consistently show data in the join.

asked 10 months ago154 views

1 Answer
0

This issue with AWS Glue joins showing "no data to display" after renaming keys is likely related to a few potential causes:

  1. Join key uniqueness: When performing joins in AWS Glue, the join keys must be unique in both datasets (primary and reference). If your join keys contain duplicates, this can cause inconsistent results or no data being displayed.

  2. NULL values in key columns: If your key columns contain NULL values, this can also cause join operations to fail or produce inconsistent results.

  3. Data type mismatches: Sometimes Glue doesn't correctly identify or maintain data types during transformations. This is particularly common when renaming keys or changing schemas. The data preview functionality sometimes helps Glue determine the correct data types, which might explain why occasionally saving and reopening the job resolves the issue.

  4. Preview limitations: The preview functionality in AWS Glue samples a subset of your data, which might not always be representative of the entire dataset, especially if your data has edge cases or inconsistencies.

To resolve this issue:

  • Verify that your join keys don't contain duplicates in either dataset
  • Ensure join key columns don't contain NULL values
  • Start a data preview session before performing the join to help Glue correctly identify data types
  • Check the script code to confirm the data types are correct after renaming keys, and modify if needed
  • Consider adding an ApplyMapping transform node after renaming keys to explicitly set the data types

If the issue persists, you might want to examine the full job logs in CloudWatch for any error messages that could provide additional insights.
Sources
Troubleshoot rules and rulesets | AWS re:Post
AWS Glue Visual ETL Job fails using MERGE statement on Redshift, type mismatch error | AWS re:Post
Joining datasets - AWS Glue

answered 10 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.