write me an python program for the requirements like connect to oracle database and execute the below two sql quaries one is source and another one is target
primary_query = f"SELECT * FROM {schema_ppm}.etl_ppm_replication_master WHERE eprm_catalog='SC' AND eprm_enabled_flg='Y'"
target_query = f"SELECT * FROM {schema_ext}.etl_ppm_replication_master WHERE eprm_catalog='SC' AND eprm_enabled_flg='Y'"
and execute thos quaries using pd_read_sql and after executing take the primary key of one row from the source db and compare the columns content i mean vaues with the target db with same primary key as source like that yoou can iterate all the records in source and check if content is changed then you can print the primary column for which the content is different below i have given one sample
|EPRM_SEQ_NBR|EPRM_CATALOG|EPRM_ENTITY_TYPE|EPRM_TABLE_NAME |EPRM_TABLE_COL_PK|EPRM_TABLE_COL_PK_SEQ |EPRM_TABLE_TYPE|EPRM_TABLE_ALIAS|EPRM_PARENT_TABLE_NAME|EPRM_JOIN_COLS_REIM |EPRM_JOIN_COLS_ENTITY|EPRM_JOIN_WITH_REIM|EPRM_ENABLED_FLG|EPRM_REIM_ENTITY_ID|EPRM_REIM_ENTITY_REF_ID|EPRM_REIM_ENTITY_REF_ID_1|EPRM_REIM_ENTITY_REF_ID_2|EPRM_REIM_ENTITY_DESC|EPRM_REIM_VERSION|EPRM_REMARKS|EPRM_CREATED_BY|EPRM_CREATED_ON |EPRM_UPDATED_BY|EPRM_UPDATED_ON |
|------------|------------|----------------|----------------------------|-----------------|-------------------------|---------------|----------------|----------------------|-------------------------------------|---------------------|-------------------|----------------|-------------------|-----------------------|-------------------------|-------------------------|---------------------|-----------------|------------|---------------|-----------------------|---------------|-----------------------|
|5032 |SC |SERVICECATALOG |PPM_HEADER_PARAM_MASTER_DEFN|HEADER_PARAM_ID |PPM_HEADER_PRM_MASTER_SEQ|MASTER |phpmd | |phpmd.op_id='%s' AND phpmd.bu_id='%s'|op_id, bu_id |notApplicable |Y | | | | | | | |ETL_PC_ADMIN |2020-03-20 18:53:00.000|ETL_PC_ADMIN |2020-03-20 18:53:00.000|
above one is source and below one is target
|EPRM_SEQ_NBR|EPRM_CATALOG|EPRM_ENTITY_TYPE|EPRM_TABLE_NAME |EPRM_TABLE_COL_PK|EPRM_TABLE_COL_PK_SEQ |EPRM_TABLE_TYPE|EPRM_TABLE_ALIAS|EPRM_PARENT_TABLE_NAME|EPRM_JOIN_COLS_REIM |EPRM_JOIN_COLS_ENTITY|EPRM_JOIN_WITH_REIM|EPRM_ENABLED_FLG|EPRM_REIM_ENTITY_ID|EPRM_REIM_ENTITY_REF_ID|EPRM_REIM_ENTITY_REF_ID_1|EPRM_REIM_ENTITY_REF_ID_2|EPRM_REIM_ENTITY_DESC|EPRM_REIM_VERSION|EPRM_REMARKS|EPRM_CREATED_BY|EPRM_CREATED_ON |EPRM_UPDATED_BY|EPRM_UPDATED_ON |
|------------|------------|----------------|----------------------------|-----------------|-------------------------|---------------|----------------|----------------------|-------------------------------------|---------------------|-------------------|----------------|-------------------|-----------------------|-------------------------|-------------------------|---------------------|-----------------|------------|---------------|-----------------------|---------------|-----------------------|
|EPRM_SEQ_NBR|EPRM_CATALOG|EPRM_ENTITY_TYPE|EPRM_TABLE_NAME |EPRM_TABLE_COL_PK|EPRM_TABLE_COL_PK_SEQ |EPRM_TABLE_TYPE|EPRM_TABLE_ALIAS|EPRM_PARENT_TABLE_NAME|EPRM_JOIN_COLS_REIM |EPRM_JOIN_COLS_ENTITY|EPRM_JOIN_WITH_REIM|EPRM_ENABLED_FLG|EPRM_REIM_ENTITY_ID|EPRM_REIM_ENTITY_REF_ID|EPRM_REIM_ENTITY_REF_ID_1|EPRM_REIM_ENTITY_REF_ID_2|EPRM_REIM_ENTITY_DESC|EPRM_REIM_VERSION|EPRM_REMARKS|EPRM_CREATED_BY|EPRM_CREATED_ON |EPRM_UPDATED_BY|EPRM_UPDATED_ON |
|------------|------------|----------------|----------------------------|-----------------|-------------------------|---------------|----------------|----------------------|-------------------------------------|---------------------|-------------------|----------------|-------------------|-----------------------|-------------------------|-------------------------|---------------------|-----------------|------------|---------------|-----------------------|---------------|-----------------------|
|5032 |SC |SERVICECATALOG |PPM_HEADER_PARAM_MASTER_DEFN|HEADER_PARAM_ID |PPM_HEADER_PRM_MASTER_SEQ|MASTER |php | |phpmd.op_id='%s' AND phpmd.bu_id='%s'|op_id, bu_id |notApplicable |Y | | | | | | | |ETL_PC_ADMIN |2020-03-20 18:53:00.000|ETL_PC_ADMIN |2020-03-20 18:53:00.000|
so if you observer eprm_table_alias is changed in target so inthis content is changed like wise for everu column every row you have to check