update oracle cols

PHOTO EMBED

Sat Aug 13 2022 11:31:59 GMT+0000 (UTC)

Saved by @Safrugans #python

import psycopg2

con = psycopg2.connect(database="pegasus", user=dbutils.secrets.get(scope = "dfh-prdsrc-keyvault-01", key = "user-pgsus-prd-02"), password=dbutils.secrets.get(scope = "dfh-prdsrc-keyvault-01", key = "pass-pgsus-prd-02"), host="pgsus-prd-dbpgres-01.postgres.database.azure.com", port="5432")

cur = con.cursor()

#cur.execute("UPDATE public.dc_parametrization set is_active= 'Y' where folder_name='sysgrid'")#.format(raw_table_name))
#cur.execute("UPDATE public.dc_parametrization set initial_load_flg = 'Y' where folder_name= 'sim-f'")#.format(raw_table_name))
cur.execute("UPDATE public.dc_parametrization set initial_load_flg = 'Y' where folder_name= 'q16_senv'")#.format(raw_table_name))
#cur.execute("UPDATE public.dc_parametrization set initial_load_flg = 'Y' where folder_name= 'jump'")#.format(raw_table_name))
#cur.execute("select * from public.dc_parametrization where folder_name= 'senv-sgcc'")

con.commit()
content_copyCOPY