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

How extract mapping columns (the relationship from the source to target) from metadata by using DIS?

Reply
New Contributor
Posts: 3

How extract mapping columns (the relationship from the source to target) from metadata by using DIS?

I have a transformation inside a job, in DIS, which uses a table to create a new table with a new field which is the concatenation of two fields from the source table.

 

Example:

 

Source table:

....

Postal Code (Postal_Code)     2775-001

Postal Code Name  (Postal_Code_Name)   PAREDE

 

Target:

.....

Postal Code (Postal_Code)     2775-001

Postal Code Name  (Postal_Code_Name)   PAREDE

Postal Code Description (Postal_Code_Desc)   2775-001 PAREDE (New field)

 

How extract, from metadata, this relationship?

 

I intended to get the following relationships for fields

Src (Postal_Code) -> Tgt (Postal_code)

Src(Postal_Code_Name) -> Tgt(Postal_Code_Name)

Src (Postal_Code) -> Tgt (Postal_Code_Desc)

Src (Postal_Code_Name) -> Tgt (Postal_Code_Desc)

 

where Src means Source and Tgt menas Target.

Respected Advisor
Posts: 4,795

Re: How extract mapping columns (the relationship from the source to target) from metadata by using

[ Edited ]
Posted in reply to LuisValença

@LuisValença

It's nothing I'd attempt doing as it's going to become quite involved.

 

The first thing you've got to figure out is where in Metadata this information is stored. Once you've got this you need to write the code to actually query metadata and pull out this information (SAS data step or Proc Metadata).

 

I've got two approaches to figure out where stuff lives in SAS Metadata.

 

A: Analyse XML

Export your job (.spk), then open this .spk with WinZip or the like, find the relevant XML and search for your expression. Then analyse the XML to figure out the Tag hierarchies as this will tell you how to query metadata.

 

B: Use Metabrowse

Use PC SAS and use METABROWSE

Capture.JPG

 

The dive into the trees to find your expression:

Capture.JPG

 

Ask a Question
Discussion stats
  • 1 reply
  • 114 views
  • 0 likes
  • 2 in conversation