Untitled

 avatar
unknown
plain_text
2 years ago
950 B
5
Indexable
hi,can you write an python script for below requirements
first you have to connect to the mariabd and execute below query
SELECT * FROM tibtcare_ppm_st2.etl_ppm_replication_master
and construct an pandas data frame and filter out eprm_catalog column which has only PC and RELEASE and in that specific value columns check eprm_anabled_flg has value Y or N if the value is Y then you have to fetch eprm__table_name column which has different table names stored and you have to pass that table name  in below secondary dyanamic query <<eprm_table_name>> and also you have to get the values of columns eprm_join_cols_entity and eprm_join_cols_reim and pass those values in below dynamic query <<eprm_join_cols_entity>> and <<eprm_join_cols_reim>>

SELECT COUNT(*) FROM  tibtcare_ppm_st2.<<eprm_table_name>> 
WHERE (<<eprm_join_cols_entity>>) IN (SELECT <<eprm_join_cols_reim>> FROM gdf_credentials['SOURCE']['DB_SCHEMA'].release_entity_inst_map 
Editor is loading...