Hi Team ,
Is there any simple way to write a PQL query for select * from table name in celonis ML for get_data_frame(query). As of now we need to add all the column names separately one after the other PQLColumns(). Any suggestions would be helpful.
Thank you
Amruth
Is there any simple way to write a PQL query for select * from table name in celonis ML for get_data_frame(query). As of now we need to add all the column names separately one after the other PQLColumns(). Any suggestions would be helpful.
Thank you
Amruth
Page 1 / 1
Hi Amruth,
Yes you can add all columns of a table to a MLW query by looping over the columns of the given table, with a snippet like this:
query = pql.PQL()
for col in dm.tables.find('table_name').columns:
query += pql.PQLColumn('\\"table_name\\".\\"'+colo'name']+'\\"', colo'name'])
df = dm.get_data_frame(query)
df.head()
And it should of course be possible to adapt this snippet to pull several tables.
Best,
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.