1 Answer
- Newest
- Most votes
- Most comments
0
Hello,
You can use below code to execure Redshift Procedure:
Redshift Procedure name: post_script
post_query="begin; CALL post_script(); end;"
datasink = glueContext.write_dynamic_frame.from_jdbc_conf(frame = resolvechoice3, catalog_connection = "redshift_connection", connection_options = {"dbtable": "public.shoes", "database": "dev","postactions":post_query},redshift_tmp_dir = 's3://tempb/temp/' transformation_ctx = "datasink")
answered 2 years ago
Relevant content
- asked 5 years ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- What happens to Amazon RDS and Amazon Redshift queries that are running during a maintenance window?AWS OFFICIALUpdated 9 months ago
Thank you for this, but i got a new problem,
Question is this correct format of code in calling a stored procedure in redshift.
stmt = conn.createStatement();
try: rs = stmt.executeQuery('call dbo.sp_copy_csv_gz_staging('target_db', 's3_source')'); except: print("An exception occurred but proc has run")
conn.close()