Skip to main content

My company is planning to update the codes used in the MARA.MSTAE and MARC.MMSTA fields. What I'm trying to figure out is where these fields are used in formulas and filters. I can look at the data models and see that we only use those tables in three specific data models. The knowledge model in one of those was pretty easy, because it has an internal search function. I tried to use the search bar inside of each package, but that appears to only do a surface level search of column titles and such. My question is this: is there a way to search the filters of each analysis/component and code within OLAP tables without opening/editing each analysis and table individually? To phrase it differently: a code-level search function within a space or analysis?

Hi,

 

Out-of-box? Due to my knowledge: no.

 

Long time ago I've experimented with scripts that analyzed PQL using Pycelonis python package and ML Workbench. Raw PQL code was extracted out of every component of every sheet of every analysis of every package of every workspace (Lots of loops). Remember also about checking not only a raw PQL but also applied filter PQL code on a component, sheet and analysis level, and variables that also may store those. But that'll take time to write in Python and a long trial-and-mistake process 🙂.

 

One of the problems is to get all fields out of PQL code, but I managed to solve it using Regex. PQL is much simpler than analysing SQL code, as it requires to put "" signs around table.column pairs, SQL also uses aliases which bring much more challenge to the table. Also the more features and different possibilities to store that info, the more places code need to analyse - different code for process analytics, different for analysis in studio, old views, and new views.

 

I've tried also to put a negative lookbehind to ignore whole line with -- comment signs but it seems not working properly (?<!--). I can recommend asking on stackoverflow and/or checking that source for extensive Regex tutorials: LINK

 

Link to Regex101: https://regex101.com/r/qwccsE/1

 

image 

Best Regards,

Mateusz Dudek


Reply