Skip to main content

Hello, I have the following problem when PQL query tables from my analysis (PyCelonis version: 2.5.0):

 

After identifying the required space, package , analysis and sheet, I specify the required table:

olap_table_HistoricPOs = published_sheet_OpenPR.components.find("#{Historic_POs}", search_attribute="title")

 

... and query the table:

olap_query_HistoricPOs = olap_table_HistoricPOs.get_query()

olap_query_HistoricPOs

 

Some columns are read correctly:

(name='_CASE_KEY', query='"freitextbestellung"."_CASE_KEY"')

and others are not. These get a hash and a brace like this:

(name='#{order_items.SUPPLIER_NR}', query='"order_items". "SUPPLIER_NR"')

 

This incorrect naming is kept in the subsequently created dataframe:

df_historic_POs = pql.DataFrame.from_pql(olap_query_HistoricPOs, data_model=data_model)

 

and leads to an empty df in the further notebook:

df_references = {}

df_referencese'historic_POs']= df_historic_POs

df_referencese'historic_POs']

 

print(df_referencesr'historic_POs'].empty)

True

 

The PQL table from my analysis is obviously not read correctly.

What could be the reason for this?

 

I am looking forward to your support!

Best, Conny

Hi Conny,

PyCelonis uses the names set in the analysis and does not do any further processing. Therefore, you can:

  • Manually adjust the names in the analysis UI
  • Try and set `use_translated_names` to False
  • Manually adjust the column names in your script by updating the name property of each column from `olap_query_HistoricPOs.columns`

 

Best,

Simon


Maybe the name of the columns that are with a hash and brace are set using a variable or something similar?

 

Just my 2 cents


Maybe the name of the columns that are with a hash and brace are set using a variable or something similar?

 

Just my 2 cents

Hi Guillermo,

no, that was not the case. The name in the OLAP Table in the Dashboard was e.g. just "SUPPLIER_NR" aligned to Conny's given example - names were already adjusted. So we really wondered about this described behavior.

We went forward with Simons 3rd proposal: Manually adjust the column names in your script by updating the name property of each column from `olap_query_HistoricPOs.columns`.

 

thank you all for your supporting comments!

Best,

Stephan


Hi Conny,

PyCelonis uses the names set in the analysis and does not do any further processing. Therefore, you can:

  • Manually adjust the names in the analysis UI
  • Try and set `use_translated_names` to False
  • Manually adjust the column names in your script by updating the name property of each column from `olap_query_HistoricPOs.columns`

 

Best,

Simon

Hi Simon,

We went forward with Simons 3rd proposal: Manually adjust the column names in your script by updating the name property of each column from `olap_query_HistoricPOs.columns`.

Thank for your support, Simon!

Cheers, Stephan


Reply