Code Generation Mode SAS DI Studio

Reply
Contributor
Posts: 70

Code Generation Mode SAS DI Studio

I'm looking to change identical settings to child jobs within SAS DI studio.

Looking for verification regarding using a find and replace by changing the Code generation mode: to user written body.

Then doing the find an replace.

My question is that does this mode still process what is processed in Automatic mode.

Just a sanity check.

Regards,

Jonathan

Respected Advisor
Posts: 3,887

Re: Code Generation Mode SAS DI Studio

If you change from automatic to user written body then the initial code you get is still fully working doing the same as before. Once you change the code there is no going back to automatic mode and you loose a lot of the advantages DI Studio gives you.

I would only go for user written if you absolutely must. May be if you explain us in detail what you need to do (and why) someone can come up with an approach which doesn't require changing over to user written.

Contributor
Posts: 70

Re: Code Generation Mode SAS DI Studio

Hey Patrick,

The reason I change to user written body is when changing code that is the same in many child jobs.

I have started incorporating includes and more parameters to try to make sure this isn't necessary but not completely.

One example is the table loader for say like 50 child jobs.

They all have expressions for x amount of columns.

Instead of copy and pasting for each child job I was looking for a solution to change that in the code by using a search and replace.

Our team is still going through a migration and we are trying to make changes as quickly as possible.

What are your thoughts?

Jonathan

Super User
Posts: 5,256

Re: Code Generation Mode SAS DI Studio

Not sure if I understand the concept fully, but I agree with Patrick, user written is seldom best practice, and reduces the value of your DI investment. There are many other better ways to resuse code.

  • Job in job
  • Smaller parmeterized jobs
  • User written Transformation
  • ...
Data never sleeps
Learner
Posts: 1

Re: Code Generation Mode SAS DI Studio

On the contrary, it is seldom best practice to deploy generated code to a production environment. Only in cases where inefficient use of resources is permissible - perhaps because of the lack of qualified programmers, or due to underused servers or databases (not likely, but theoretically possible) - should code that is designed to be quick and easy to produce without knowledge of programming and optimization techniques be used in production.

Contributor
Posts: 70

Re: Code Generation Mode SAS DI Studio

Thank you guys for your input this has been very helpful.

Much appreciated.

Jonathan

Ask a Question
Discussion stats
  • 5 replies
  • 483 views
  • 7 likes
  • 4 in conversation