Skip to main content

I use PyCelonis to get Data as follows: 

analysis = celonis_manual.analyses.find()

sheet = analysis.draft.sheets.find()

component = sheet.components.find()

df = component.get_data_frame()

But sometimes get_data_frame() doesn't work and i get the following Error:

 

Exception: Export failed. Status: {'id': 'aab0d447-a0d5-419d-b25d-36ee3d504b71', 'exportStatus': 'FAILED', 'created': 1702286071091, 'message': 'Encountered " "(" "( "" at line 1, column 10.\\nWas expecting one of:\\n ")" ...\\n "||" ...\\n ', 'exportType': 'PARQUET'}

 

I dont understand why as the Tables do not seem different from the ones where it works.

Im working in pycelonis 1.4.1.

 

Any help would be greatly appreciated.

 

Thank you

Gina

Please see if you have multiline PQL, try to convert them in Single line in componet. Sometime it works.


Thank you for your answer. Could you please elaborate? I'm new and dont really understand what you mean by that... What exactly is multiline PQL?

 

Thank you very much


Hello @gina.diett Just check if you have PQL like this

 

CASE WHEN

Conditon THEN 'VALUE1'

ELSE 'VALUE2' END

 

to Like this

CASE WHEN Conditon THEN 'VALUE1' ELSE 'VALUE2' END

 

PS: This is just example, you might have multiple PQL in this way in the component.

 

 

 

 


Hello @gina.diett Just check if you have PQL like this

 

CASE WHEN

Conditon THEN 'VALUE1'

ELSE 'VALUE2' END

 

to Like this

CASE WHEN Conditon THEN 'VALUE1' ELSE 'VALUE2' END

 

PS: This is just example, you might have multiple PQL in this way in the component.

 

 

 

 

I will try that thank you :)


Hi @gina.diett,

 

It is good to know that PyCelonis 1.x is deprecated due to instability issues. To have the best performance and future proof solutions, upgrading to PyCelonis 2.x is therefore advisable, but you will miss functionalities as extracting table data from Studio Analyses. You could replace this by extracting tables with custom PQL queries using SoalaPy interface: base - PyCelonis.

Not a solution to your question, but maybe this can help you in the future.


I solved the Problem. The issue was that the PQL used a predefined KPI and apparently Python doesn't have the information on those KPIs. I replaced the KPI with the underlying definition and now it works 🙂


I solved the Problem. The issue was that the PQL used a predefined KPI and apparently Python doesn't have the information on those KPIs. I replaced the KPI with the underlying definition and now it works 🙂

Hi @gina.diett,

 

Good to hear that you solved your use case!

For future use cases, if you have your saved formulas stored in a Knowledge Model, you can instruct PyCelonis to resolve it: https://celonis.github.io/pycelonis/2.5.0/reference/pycelonis/ems/studio/content_node/knowledge_model/#pycelonis.ems.studio.content_node.knowledge_model.KnowledgeModel.resolve_query

 

Maybe this helps you and/or fellow Celopeers!


Reply