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
1,493 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,460 points
3,289 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,720 points
1,184 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
2,244 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
3,128 views
0 votes
0 answers
0 votes
1 answer

Is there a way to run Python on Android?

YES! here’s a barcode scanner written in six ...READ MORE

answered Sep 19, 2018 in Python by Priyaj
• 58,020 points
1,039 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,560 points
968 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
536 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP