Pentaho

 View Only

 How to extract all "sql over sqljindi" (*.cda) queries?

  • Pentaho
  • Ctools
  • Pentaho
Glupe Registracije's profile image
Glupe Registracije posted 10-23-2018 12:20

Hi,

is there a way to extract all "sql over sqlJndi" queries?

We have many *.cda files with similar selects. We would like to extract them all in order to compare them when we have to change something.

Opening each dashboard, and manually copying is not an option.

Regards.


#Ctools
#Pentaho
Dan Keeley's profile image
Dan Keeley

Simple!

Use the repository synchronizer, and dump everything to disk.

Then use PDI to loop around all the CDA files.

Use the get data from XML step, and a CDA path something like this:

/CDADescriptor/DataSources/Connection

And there you go.

I do this to identify every CDA end point, so i can automate creation of unit tests!

Glupe Registracije's profile image
Glupe Registracije

Dan, thank you very much for your answer. I was unaware of the repository synchronizer plugin existence.

At the moment, I am testing it. Furthermore I am testing pentaho api-s (getCdaList, listQueries, getCdaFile...) as well.

Regards.

Dan Keeley's profile image
Dan Keeley

good call - the api will work perfectly well too. In fact the repo sync uses the API anyway.

I was just using the repo synchronizer in a "sledgehammer to crack a nut" way