SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

Get transformation source code from DI studio ETLs.

Reply
Regular Contributor
Posts: 161

Get transformation source code from DI studio ETLs.

Hi all,
I know that proc metadata can extract almost all from DI studio(tables, Jobs, transformations names, columns etc.) but I didn't found that it can extract also some source code of transformation from some concrete ETL.
So I have general question:
Can I somehow(by proc metadata etc.) dinamically extract source code of some transformation in some concrete ETL?
For example, I have DI studio job(ETL) which has few transformations , and one of them - "user written code"( or simple "SQL join" it's not important) and I need get source code of this transform without connecting to DI studio manually, for example by running some standard proc metadata(or another procedure) with appropriate XMLmap and another options in Enterprise Guide.

So is it possible get such information?

Thanks!
SAS Employee
Posts: 75

Re: Get transformation source code from DI studio ETLs.

Yura,

In most cases the source code is not stored in the metadata for each transformation in a DI Studio job. Usually the source code for each transformation is generated at runtime from the metadata.

It is possible for user-written code to be specified for any transformation, and that user-written code can be stored in the metadata or in a file. But most jobs use transformations that generate the appropriate code at runtime, based on the metadata.

Dave
Regular Contributor
Posts: 161

Re: Get transformation source code from DI studio ETLs.

Posted in reply to DaveR_SAS
Hi Dave,
Thanks, It's clear.
Just for clarify one thing - So if I use transform "User written code" and I specify type "Metadata"(not "File") so I should be able to extract this code using proc metadata?


Thanks! Message was edited by: Yura2301
Contributor
Posts: 66

Re: Get transformation source code from DI studio ETLs.

Custom code stored in Metadata is in the TextStore of the Metadata server. Use GetMetadata to view it and choose SourceCode.
Regular Contributor
Posts: 161

Re: Get transformation source code from DI studio ETLs.

Posted in reply to CameronLawson
Thanks!
Super User
Posts: 5,424

Re: Get transformation source code from DI studio ETLs.

Just a bit curious, what do you want to do with this?

/Linus
Data never sleeps
Regular Contributor
Posts: 161

Re: Get transformation source code from DI studio ETLs.

Hi Linus,
I needed collect some info which is stored in User-written codes(for example - macroes which are used by this UW code, marts etc.).
So shortly - I'll collect appropriate UW from some ETLs, then parse their codes and extracts some useful info from them.
Actually I connected to TextStore of UW transforms by using "metadata_getXXX" functions.

Strange that you asked, I suppose that it is common task - collect some info from metadata objects...

Thanks!
Super User
Posts: 5,424

Re: Get transformation source code from DI studio ETLs.

It is a common task, I have done it myself (but not User Written Code).
My gut feeling was that it would be easier to scan the deployed job code than search through the metadata.

/Linus
Data never sleeps
Ask a Question
Discussion stats
  • 7 replies
  • 256 views
  • 0 likes
  • 4 in conversation