Learn practical skills, build real-world projects, and advance your career
from jupyter_audit_query_tools import query_runner as r, helpers as h
import pandas as pd
data_source='hive-mdl'
database1 = 'digital_dar_engineering_prod'
table1 = 'dar_sivt_viewability_ts_combine_info'
###Save query of sample data to a variable which will later be executed (sample_data)
data = r.run_query(data_source, record_limit=100, sql_query=f"""
SELECT DISTINCT tag_campaign, client_id
FROM {database1}.{table1}
WHERE tag_campaign IN ('nlsn221141', 'nlsn228775', 'nlsn223439', 'nlsn222188', 'nlsn219361', 'nlsn219147', 'nlsn211209', 'nlsn228095', 'nlsn221102', 'nlsn219495', 'nlsn228314', 'nlsn228316', 'nlsn231305', 'nlsn237493', 'nlsn225826', 'nlsn225346', 'nlsn225477', 'nlsn226604', 'nlsn226374', 'nlsn226729', 'nlsn226680', 'nlsn227207', 'nlsn227053', 'nlsn228153')
""")
df1 = pd.DataFrame(data)
print(df1)
Running query...