is there a way to send sql query data from redshift and send the data via email to sns

0 votes
is there a way to  send sql query data from redshift and send the data via email to sns?

querying data from redshift using glue job and sending the data out via email using sns.
Aug 29, 2020 in Python by Ruben
• 180 points
554 views

1 answer to this question.

0 votes
I resolved this issue using AWS Glue pyspark

 sns = boto3.client('sns')
    sns.publish(TopicArn ='arn:aws:sns:us-west-2:xxxxxxxxx', Subject = "Description - subject line ", Message = data)
    datasink5 = glueContext.write_dynamic_frame.from_jdbc_conf(frame = datasource0, catalog_connection = "connection_name", connection_options = {"dbtable": "schema.table", "database": "db_name", "postactions": "TRUNCATE TABLE schema.table_name;"}, redshift_tmp_dir = args["TempDir"], transformation_ctx = "datasink5")
answered Nov 21, 2020 by Ruben
• 180 points

Related Questions In Python

0 votes
1 answer

Is there anyway to obtain the full abstract from a 'PUBmed' article using bioPython

Hey Charlie, it's certainly possible to pull ...READ MORE

answered Aug 24, 2018 in Python by aryya
• 7,440 points
2,109 views
0 votes
1 answer

Is there a foreach function in python and is there a way to implement it if there isnt any

Every occurence of "foreach" I've seen (PHP, ...READ MORE

answered Aug 31, 2018 in Python by charlie_brown
• 7,710 points
419 views
0 votes
1 answer

Is there a way to list out in-built variables and functions of Python?

The in-built variables and functions are defined ...READ MORE

answered May 14, 2019 in Python by Junaid
790 views
0 votes
1 answer

Is there a way to loop between 0 and 1 by 0.1 in python?

You can use the linespace function. It ...READ MORE

answered May 28, 2019 in Python by Olly
1,301 views
0 votes
1 answer

Is there a way to run Python on Android?

YES! An example via Matt Cutts via SL4A -- "here’s ...READ MORE

answered Sep 19, 2018 in Python by Priyaj
• 58,080 points
404 views
0 votes
1 answer
0 votes
1 answer

What is the recommended way to randomize a list of strings using Python?

Hi. Nice question. Here is the simplified answer ...READ MORE

answered Jan 18, 2019 in Python by Nymeria
• 3,540 points
328 views
0 votes
1 answer
0 votes
0 answers

is there a way to run android using python?

can you give a few sample projects ...READ MORE

Apr 22, 2019 in Python by Waseem
• 4,540 points
196 views
0 votes
1 answer

Is there a way to store a huge dataset as a dataframe using Pandas?

This can be easliy done by using ...READ MORE

answered Jun 22, 2019 in Python by Taj
• 1,080 points
421 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP