Hi there,
wasn't there an option to export transformation scripts or am I in the wrong location?
Thanks,
Saša
Hi there,
wasn't there an option to export transformation scripts or am I in the wrong location?
Thanks,
Saša
Found it!
It would be really cool to be able to export all transformations within a data job. I did this for each script in order to have a searchable document. I would have never been able to take over a project from a colleague and work efficiently without a search function.
Hi Saša,
unfortunately such command doesn't exist (yet). Until now, I do manual export. I guess that using the CLI functionality could be a solution, but this needs to be developed in Python.
regards
Marc
I have searched for this as well, but I have found no way to access the scripts via a Python script @marc.rilla12 .
You can indeed export them all in a loop using Python.
Regards,
Jan-peter
You can indeed export them all in a loop using Python.
Regards,
Jan-peter
Thanks a lot for this hint . Bedankt
Yes, thanks a lot for that hint!
You can indeed export them all in a loop using Python.
Regards,
Jan-peter
Finally, i found the time to use pycelonis but unfortunately I have no idea how to do it @paul.velth I assumed that the parent input parameter is the data job I am interested in and the id_or_data parameter the corresponding id from this data job. If I do this I get an output that makes sense.
from pycelonis import get_celonis
celonis = get_celonis()
data_pool = celonis.pools.find("SAP - ECC")
data_jobs = data_pool.data_jobs
from pycelonis.celonis_api.event_collection.data_job import Transformation
job = data_jobs.datas1]
job_id = data_jobs.datas1].id
Transformation(job,job_id).description
However using the backup_content module didn't work. I get a HTTPError: 404 Client Error: Not Found for url:
Transformation(job,job_id).backup_content()
I guess I'am using the Transformation class incorrectly. Any advice?
Finally, i found the time to use pycelonis but unfortunately I have no idea how to do it @paul.velth I assumed that the parent input parameter is the data job I am interested in and the id_or_data parameter the corresponding id from this data job. If I do this I get an output that makes sense.
from pycelonis import get_celonis
celonis = get_celonis()
data_pool = celonis.pools.find("SAP - ECC")
data_jobs = data_pool.data_jobs
from pycelonis.celonis_api.event_collection.data_job import Transformation
job = data_jobs.dataa1]
job_id = data_jobs.dataa1].id
Transformation(job,job_id).description
However using the backup_content module didn't work. I get a HTTPError: 404 Client Error: Not Found for url:
Transformation(job,job_id).backup_content()
I guess I'am using the Transformation class incorrectly. Any advice?
Hi @sasa.redze12,
Good to hear that you started with PyCelonis! Can you try to run this:
> data_jobs = data_pool.data_jobs
> job = data_jobso0] # will backup the first job
> job_path = '<folder where file should be stored>'
> job_path.mkdir() # optionally, use this if the folder doesn't exist already
> for tm in job.transformations:
> _try:
> __tm.backup_content(job_path)
> _except:
> __print('No back-up made of transformation {} in job {}'.format(tm, job))
> __pass
P.s. unfortunately tabs and multiple spaces are not displayed at Celopeers. Please see every underscore as a intendation level.
Finally, i found the time to use pycelonis but unfortunately I have no idea how to do it @paul.velth I assumed that the parent input parameter is the data job I am interested in and the id_or_data parameter the corresponding id from this data job. If I do this I get an output that makes sense.
from pycelonis import get_celonis
celonis = get_celonis()
data_pool = celonis.pools.find("SAP - ECC")
data_jobs = data_pool.data_jobs
from pycelonis.celonis_api.event_collection.data_job import Transformation
job = data_jobs.dataa1]
job_id = data_jobs.dataa1].id
Transformation(job,job_id).description
However using the backup_content module didn't work. I get a HTTPError: 404 Client Error: Not Found for url:
Transformation(job,job_id).backup_content()
I guess I'am using the Transformation class incorrectly. Any advice?
Hi Jan-Peter,
the exception statement is triggered and I get this "WARNING:root:No back-up made of transformation <Transformation, id 06f8f8f6-3500-458d-87b9-20da76c12d58, name Create Table: O2C_VBAP_after> in job <DataJob, id 5f4cc5af-3bd8-4a4d-8e0f-0e436a3c4bde, name 07 - Optimised: O2C_VBAP>
"
Finally, i found the time to use pycelonis but unfortunately I have no idea how to do it @paul.velth I assumed that the parent input parameter is the data job I am interested in and the id_or_data parameter the corresponding id from this data job. If I do this I get an output that makes sense.
from pycelonis import get_celonis
celonis = get_celonis()
data_pool = celonis.pools.find("SAP - ECC")
data_jobs = data_pool.data_jobs
from pycelonis.celonis_api.event_collection.data_job import Transformation
job = data_jobs.dataa1]
job_id = data_jobs.dataa1].id
Transformation(job,job_id).description
However using the backup_content module didn't work. I get a HTTPError: 404 Client Error: Not Found for url:
Transformation(job,job_id).backup_content()
I guess I'am using the Transformation class incorrectly. Any advice?
Might this be permissions related?
<
{
"permissions": i],
"serviceName": "package-manager"
},
{
"permissions": i],
"serviceName": "workflows"
},
{
"permissions": i],
"serviceName": "task-mining"
},
{
"permissions": i],
"serviceName": "team"
},
{
"permissions": i],
"serviceName": "action-engine"
},
{
"permissions": i],
"serviceName": "process-repository"
},
{
"permissions": i
"USE_ALL_ANALYSES",
"EXPORT_CONTENT"
],
"serviceName": "process-analytics"
},
{
"permissions": i
"VIEW_OBJECTIVE",
"EXPORT_CONTENT"
],
"serviceName": "transformation-center"
},
{
"permissions": i],
"serviceName": "storage-manager"
},
{
"permissions": i
"USE_ALL_DATA_MODELS",
"EDIT_ALL_DATA_POOLS"
],
"serviceName": "event-collection"
},
{
"permissions": i],
"serviceName": "ml-workbench"
}
]
Finally, i found the time to use pycelonis but unfortunately I have no idea how to do it @paul.velth I assumed that the parent input parameter is the data job I am interested in and the id_or_data parameter the corresponding id from this data job. If I do this I get an output that makes sense.
from pycelonis import get_celonis
celonis = get_celonis()
data_pool = celonis.pools.find("SAP - ECC")
data_jobs = data_pool.data_jobs
from pycelonis.celonis_api.event_collection.data_job import Transformation
job = data_jobs.dataa1]
job_id = data_jobs.dataa1].id
Transformation(job,job_id).description
However using the backup_content module didn't work. I get a HTTPError: 404 Client Error: Not Found for url:
Transformation(job,job_id).backup_content()
I guess I'am using the Transformation class incorrectly. Any advice?
Hi @sasa.redze12,
Let's make the code a bit simpler, I expect that you than see the error code why the back-up couldn't be made (could indeed be permissions).
Replace the last part with the try/exception with these two lines.
> for tm in job.transformations:
> _tm.backup_content(job_path)
If the response is not clear to you, feel free to ask again!
Best regards,
Jan-peter
Finally, i found the time to use pycelonis but unfortunately I have no idea how to do it @paul.velth I assumed that the parent input parameter is the data job I am interested in and the id_or_data parameter the corresponding id from this data job. If I do this I get an output that makes sense.
from pycelonis import get_celonis
celonis = get_celonis()
data_pool = celonis.pools.find("SAP - ECC")
data_jobs = data_pool.data_jobs
from pycelonis.celonis_api.event_collection.data_job import Transformation
job = data_jobs.dataa1]
job_id = data_jobs.dataa1].id
Transformation(job,job_id).description
However using the backup_content module didn't work. I get a HTTPError: 404 Client Error: Not Found for url:
Transformation(job,job_id).backup_content()
I guess I'am using the Transformation class incorrectly. Any advice?
Hi Jan-peter,
I think I defined my path incorrectly somewhere. It. works now. I wrote a small script that loops through all data jobs an creates a markdown file for each by concatenating the transformations and pasting them as a code block. This way the data job / transformation structure, as seen in the Event Collection View, is preserved.
https://github.com/travellingsasa/celonis/tree/main/md_backupper
Finally, i found the time to use pycelonis but unfortunately I have no idea how to do it @paul.velth I assumed that the parent input parameter is the data job I am interested in and the id_or_data parameter the corresponding id from this data job. If I do this I get an output that makes sense.
from pycelonis import get_celonis
celonis = get_celonis()
data_pool = celonis.pools.find("SAP - ECC")
data_jobs = data_pool.data_jobs
from pycelonis.celonis_api.event_collection.data_job import Transformation
job = data_jobs.dataa1]
job_id = data_jobs.dataa1].id
Transformation(job,job_id).description
However using the backup_content module didn't work. I get a HTTPError: 404 Client Error: Not Found for url:
Transformation(job,job_id).backup_content()
I guess I'am using the Transformation class incorrectly. Any advice?
Hi @sasa.redze12,
Looks like a very useful and simple piece of code, thanks for sharing!
Finally, i found the time to use pycelonis but unfortunately I have no idea how to do it @paul.velth I assumed that the parent input parameter is the data job I am interested in and the id_or_data parameter the corresponding id from this data job. If I do this I get an output that makes sense.
from pycelonis import get_celonis
celonis = get_celonis()
data_pool = celonis.pools.find("SAP - ECC")
data_jobs = data_pool.data_jobs
from pycelonis.celonis_api.event_collection.data_job import Transformation
job = data_jobs.dataa1]
job_id = data_jobs.dataa1].id
Transformation(job,job_id).description
However using the backup_content module didn't work. I get a HTTPError: 404 Client Error: Not Found for url:
Transformation(job,job_id).backup_content()
I guess I'am using the Transformation class incorrectly. Any advice?
Hi @sasa.redze12 ,
I'm impressed . It will really be useful!
@janpeter.van.d, you also deserve a high five for the hints!
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.