6 if __name__ ==
"__main__":
10 from CondCore.Utilities.CondDBFW
import querying_framework_api
11 import CondCore.Utilities.CondDBFW.data_sources
as data_sources, CondCore.Utilities.CondDBFW.data_formats
as format
12 from CondCore.Utilities.CondDBFW.querying
import connect
17 gt = connection.global_tag(name=
"74X_dataRun1_HLT_frozen_v2")
18 valid_iovs = gt.iovs(valid=
True, amount=100)
20 json_structure.add_key(gt.snapshot_time,
"snapshot_time")
21 json_structure.add_key(valid_iovs,
"valid_iovs")
24 secrets_file =
"/afs/cern.ch/cms/DB/conddb/.cms_cond/netrc"
25 secrets_file_1 =
"netrc_test"
27 connection_data = {
"db_alias" :
"orapro",
"schema" :
"cms_conditions",
"host" :
"oracle",
"secrets" : secrets_file}
28 qf = querying_framework_api(connection_data)
31 data.get(
"valid_iovs").as_table(fit=[
"tag_name",
"payload_hash",
"insertion_time"], col_width=35)
33 pprint.pprint(data.data())