Created
September 17, 2018 16:20
-
-
Save jacoor/cc9c7adcc0328d235971a653a60be3bd to your computer and use it in GitHub Desktop.
skipping header in AWS glue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# use filter, Luke | |
# the idea is to use a filter function that will return True for the records to keep. | |
# Usage: just use before the last function at end of your ETL job script. Update frame and update next function frame with "filtered". | |
def filter_function(dynamicRecord): | |
if dynamicRecord.merchant_id == "merchant_id" and dynamicRecord.merchant_ref_number == "merchant_ref_number": | |
return False | |
else: | |
return True | |
filtered = Filter.apply(frame = dropnullfields3, f = filter_function, transformation_ctx = "filtered") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment