Hello everyone,
Not so long ago, I was asked if it is possible to export all measures and dimensions from QS Enterprise to csv files. Since I learned a little Python, I decided to create a script that can do this.. A few evenings and I wrote a working prototype.

Changelog

2021-08-11

  • export parents for each measure and dimension
  • export parents for all app objects
  • disable certificate validation for QS server
  • fix filenames for dimensions and measures (was the opposite)

Setup

  • Create a folder anywhere on the computer, - this will be the project folder
  • Create a certs folder inside
  • export certificates from QS in pem format (without passwords) and copy them to the certs folder
    qmc qs -> certificates (https://server.name/qmc/certificates)
  • install python (you can use the latest version 3.9. x)

In config.py write your server name to the SERVER_HOSTNAME variable

Project folder

Download all files here: master items extractor.7z (4 kb)

Install pip packages

Open cmd or PowerShell and go to your project folder, then type for install deps for this script

pip install -r requirements.txt

Run

After install, type

python extractor.py

Result

The result of the script execution will be saved in the temp folder as .csv-files

The main AppInfo.csv file contain information on applications and streams,

the other files have the following name format:

  • [application guid]_measure.csv - for measures
  • [application guid]_dimension.csv - for dimensions
  • [application guid]_objects.csv - for items with parents

The key for linking the main AppInfo.csv file with the others is qDocId - this is the guid of the application

Questions

telegram : @chernov

mail: schernov1@gmail.com