- Newest
- Most votes
- Most comments
It is possible to provide custom runtime Arguments to your Glue job that are resolved using getResolvedOptions
. The default script generated by Glue already contains the resolved arguments in the args
variable.
Simply provide the parameter name as the the key to args['param']
to access a the value passed to your job.
If you have parameters that don't change for each job run, it is better to configure the job with the parameters under the Job details, job parameters page.
It's important to highlight that the suggestion for edokemwa is valid for custom code nodes, but you cannot configure visual nodes (with the exception of the input table source, which does allow using parameters).
So, for instance you could have a custom transform that parses the arguments and filter the data going through to be within those dates.
However, you are probably thinking on controlling the read from the source for efficiency, for that you only have the table option I mentioned or you could have a placedholder source (s3 without data) and then read the actual data in your custom code node.
Thanks for the clarification. I was actually looking for controlling the read from the source as you mentioned. Looks like it can only be done through custom code node as I suspected.
Relevant content
- asked 4 months ago
- asked 2 years ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
Thanks for the answer. Yes, it is possible to provide the arguments at run time to the generated script but as I understand it, the generated script would need to be modified manually in order to access those arguments and doing so will take away the visual aspect of the job. I do not want that to happen. As Gonzalo mentioned I think adding custom code node is the way to access the custom parameters (other than source/target databases/tables) in the visual glue jobs.