I am fairly new to AWS and I am currently exploring it. I was hoping to get an insight or suggestion on how to work with AWS Glue.
Say I want to run a script that uses SELECT
for an input and outputs it to Redshift
. However, I want to to use a parameter for the WHERE
clause particularly dates. In Python and it goes something like:
df = "SELECT * FROM table WHERE date between {0}-{1}-{3} AND {4}-{5}-{6}".format(day,month,year,day2,month2,year2)
After I get this values, I then use something like a TEMP table
in Redshift for staging and LEFT JOIN
in the Fact Table. But I can't seem to figure out how Glue can do this.
I've read some articles/posts that suggests to use a flat file for the variables but I'm not so sure how to do this.
Any thoughts?