1 réponse
- Le plus récent
- Le plus de votes
- La plupart des commentaires
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")
répondu il y a 2 ans
Contenus pertinents
- demandé il y a un an
- demandé il y a 2 mois
- demandé il y a un an
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a 3 ans
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()