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 28, 2020 in Python by Ruben
• 180 points
278 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 23, 2018 in Python by aryya
• 7,440 points
1,744 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,780 points
331 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
422 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 27, 2019 in Python by Olly
845 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,140 points
314 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,520 points
243 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
135 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 21, 2019 in Python by Taj
• 1,080 points
302 views