This year's challenge is to create a clone of an existing metadata folder(around 800 objects). I can adjust the attributes of the data objects (names, paths, etc.) using SAS code (metadata_getnasn, metadata_getnattr, metadata_setattr).
So far I have failed at exchanging user written transformations in DI jobs. I suspect that this is possible with the
"metadata_setassn" function, but I can't find the way exchanging the association.
Have anyone already made such replacements and can you give me a tip? Or is this not possible with SAS code?
I would be very grateful for a short feedback and a hint in which direction I could continue my research.
Warm greeting, Michael
Thank you Greg for the quick reply. The explanations on how the functions "metadata_setassn" works are very helpful.
I'll try to create a little more understanding for our task with the following:
We need to clone (exportpackage -> importpackge) about 850 DI Jobs that contain user written transformations (hereinafter referred to as UWT). After cloning, in the jobs the original UWTs must be exchanged for the cloned UWTs .
As an example: in the source, the “Table_Source” table in the “Job_Source” job is linked to the user-written transformation “UWT_Source”.
After cloning, the “Table_Clone” table, which has also been cloned, is still linked to the UWT “UWT_Source”
Now we are looking for a way to convert the connection of the table “Table_Clone” to the also cloned UWT “UWT_Clone” with SAS code
The aim should be
As the UWTs are identical, the options and mapping should also be retained when replacing them.
Based on your explanation, I hope to make progress with the metadata_setassn function.
I would be very grateful for any further information
Best regards, Michael
In principle you are right, but it is about 330 jobs with 450 UWTs and 12200 mappings to be drawn manually.
The metadata browser and I are great friends, but the integration of UWTS in the job is really very complex . I think I will invest a few more hours in R&D 😁
Thanks again for your support
The SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment.
SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.
Find more tutorials on the SAS Users YouTube channel.