BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
eagles_dare13
Obsidian | Level 7

Some times in SAS Data Integration Studio, there will be a step (e.g a SQL JOIN) that will show some mappings when you click on 'Select' on the right hand navigation menu inside the step.

But then if you go to 'Code' tab, there will be code that overrides  those mappings with different mappings.

In this case, at execution time, will the program executed what is in hte 'Code' tab or what is on the 'Mapping' tab?

1 ACCEPTED SOLUTION

Accepted Solutions
Patrick
Opal | Level 21

DI Studio code generation is metadata driven so the code generated is based on what you define in metadata (so for example what you set up in the mapping tab). The code tab shows you then the generated code exactly how it will be used for executing the job.

But of course: The mapping definitions will only take effect as long as you don't switch over to "user written" (drop down box in the code tab right above the code pane). As soon as you're using "user written" instead of "auto generated" it's no more the metadata (eg. the mapping) which gets used to generate the code but what you're actually manually typing as "code" in the code tab.

The code used will always be what you see under the code tab.

It is best practice to use "auto generated" and have everything metadata driven as far as possible.

View solution in original post

1 REPLY 1
Patrick
Opal | Level 21

DI Studio code generation is metadata driven so the code generated is based on what you define in metadata (so for example what you set up in the mapping tab). The code tab shows you then the generated code exactly how it will be used for executing the job.

But of course: The mapping definitions will only take effect as long as you don't switch over to "user written" (drop down box in the code tab right above the code pane). As soon as you're using "user written" instead of "auto generated" it's no more the metadata (eg. the mapping) which gets used to generate the code but what you're actually manually typing as "code" in the code tab.

The code used will always be what you see under the code tab.

It is best practice to use "auto generated" and have everything metadata driven as far as possible.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 776 views
  • 0 likes
  • 2 in conversation