"replace_text_in_raw_data" function in pycelonis does nothing

I need to do quite a few mass changes across multiple dashboards and replace_text_in_raw_data was exactly what I wanted, but It doesn’t seem to replace anything.

For testing purposes I used simple saved formula:


Command I used in python:

analysis.replace_text_in_raw_data("replace_text_testing", "It worked")

but no matter what I do I dont see any changes.

Did anyone found what is the issue with changing rew data?

Hi Tomasz,

As far as I know, you can only use Python within the ML Workbench, not in the PQL-editor as you show in your screenshot. To replace text in your source data, please follow these steps:

  • Create new ML app (see the documentation on the help pages or examples on GitHub.

  • Access the source data table that you want to change

  • Apply the ‘replace_text_in_raw_data function’, as you suggested.

  • Once executed, you should be able to see the new values in you analysis. Create a new OLAP table and display the table and column where you would expect your changes. If you have a lot of rows, you can filter the column values by creating an object filter like:

    FILTER <table_name.column_name> = '<new_value>' 

Does this work for you?

Best regards,