Skip to main content
Any option to export all transformations from data job to downloads?

Hi,

 

You've got 2 options:

A) compare differences between specific version (if you're not using that feature, create new version, and modify any of the existing transformation - event adding "--test comment" anywhere will do) and a draft. Then you can take whole JSON including full transformation data:

 

obrazobrazYou can just copy that JSON and save as JSON file. Notepad ++ is nice open source tool for inspecting different files types. If you want to check some JSON viewers you can also check here: https://www.quora.com/What-are-some-good-open-source-JSON-object-viewers-editors 

 

B) You can use PyCelonis Python package for that purpose. More complicated, but you can automate data retrival, and get specific information needed f.e.: only SQL transformation code.

Link: https://celonis.github.io/pycelonis/1.7.1/reference/celonis_api/event_collection/data_job/#celonis_api.event_collection.data_job.Transformation

 

Best Regards,

Mateusz Dudek


Thanks Mateusz


Mateusz, In the same note, is there a way to download all documentations of analysis of a package as well?


Mateusz, In the same note, is there a way to download all documentations of analysis of a package as well?

Try PyCelonis, and iterate all analysis. Each analysis internally is a json struct.


Try PyCelonis, and iterate all analysis. Each analysis internally is a json struct.

Hi Guillermo, is it possible to download analysis using pycelonis? can you please elaborate?


Try PyCelonis, and iterate all analysis. Each analysis internally is a json struct.

First warning: they have changed to a new version of PyCelonis so not 100% sure my code will work

 

Here the documentation (I guess you already have it but...)

 

https://celonis.github.io/pycelonis/2.0.0/

 

This will line get the analysis struct

analysis=celonis.packages.find(filei'package_name']9i]).analyses.find(filei'analysis_name']9i])

 

Inside you will have several objets, like draft, data, etc...

 

For example to retrieve the variables you can check here

analysis.saved_formulas

 

and an example to copy the load scripts

try:

    doc_ls=analysis_orig.draft.datad"document"]e"statelessLoadScript"]

    json_doc_dump_ls = json.dumps(doc_ls, ensure_ascii=False)

    doc_ls = json.loads(json_doc_dump_ls)

    analysis_dest.draft.dataa"document"]["statelessLoadScript"] = doc_ls

    print('5. Load Scripts copiados')

 

  except:

    print('Error copiando Load Script')

 

Important: please note that you need to work with the .draft element of an analysis

 

 

 

Some tutorials

https://celonis.github.io/pycelonis/2.0.0/tutorials/executed/03_studio/01_intro_studio/#7-access-assets-in-celonis-apps

 

HTH


Try PyCelonis, and iterate all analysis. Each analysis internally is a json struct.

Thanks for sharing, Guillermo


Reply