admin管理员组

文章数量:1300133

I am trying to create a glue job that accepts dynamic parameters and uses the parameters to query Redshift. I cannot for the life of me figure out how I am supposed to do this. I have researched and googled so many things but I cannot find a straight forward solution. I am trying not to over-complicate things.

I have looked at getting the parameters from an S3 file or from a Crawler. I've tried putting the parameters inside the SQL statement but that always errors out.

i.e.

args = getResolvedOptions(sys.argv, ['JOB_NAME','identifier'])

glueContext.create_dynamic_frame.from_options(connection_type="redshift", connection_options={"sampleQuery":"select distinct sec_id from schema.table where identifier = 'args['identifier]'",...

I am working in the Glue Visual Studio but if I need to do this via the Script itself I can.

I'm just lost and could really use some help or guidance.

本文标签: amazon s3How to use Glue Parameters in a Redshift SQL scriptStack Overflow