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

How to generate a SAS data step in DI?

Reply
Contributor
Posts: 21

How to generate a SAS data step in DI?

I need generate some new variables based on a SAS data set.

Except creating user written code, how can I use SAS DI to generate a SAS data step to accomplish the task?

Thanks in advance!

Super User
Posts: 5,257

Re: How to generate a SAS data step in DI?

You ae not keen on using 'user written code'?

If your task is fairly typical you can look into 'user written transformation'.

SAS code can also be inserted in the pre and post step sections in every other transformation. 

Data never sleeps
Contributor
Posts: 21

Re: How to generate a SAS data step in DI?

Thank you for your response.

I purposely want to avoid user written code here.  I have already created SAS code in EG, and now I am re-do the work in DI.

I want take advantage on the metadata generated by DI, and this is why I try to avoid user written code.

Respected Advisor
Posts: 3,894

Re: How to generate a SAS data step in DI?

You will need to be more specific in what you have and what you want in order to give you an explicit answer.

On a general level:

There are multiple ways of creating additional variables in an target table based on variables in a source table. You could for example use an Extract or SQL Join tranformation, then add the variables to the target table and then in the mapping tab of the transformation map variables from source to target and define expressions as required for populating the new variables.

Using a Extract or SQL Join will generate SQL code and not SAS data step code - but this is something you shouldn't have to care about when using DIS.

Contributor
Posts: 21

Re: How to generate a SAS data step in DI?

Hi Patrik,

Thank you so much for your response.

I did see SQL was generated when I use extract.

I posted the question is because I couldn't generate SAS code instead of SQL.

Since SAS document says SAS data step need less resources than SAS SQL.  I have been wondering how I can generate SAS code?

Now I got another confirmation that DI doesn't do that.  Thanks!

Respected Advisor
Posts: 3,894

Re: How to generate a SAS data step in DI?

DIS might very well generate SAS Data Step code, e.g. the Lookup Transformation uses (data step) hash objects or in the Loader Transformation you can even choose between "Modify" (=data step) and SQL.

Ask a Question
Discussion stats
  • 5 replies
  • 399 views
  • 0 likes
  • 3 in conversation