BookmarkSubscribeRSS Feed
Shussa
Calcite | Level 5

Hi,

I wanted to ask if there is a way to change the order of input tables in a User written code.  Say I have 4 tables as input to a User Written code node, can I influence the the order these are linked to User written code node so the relevant generated macro variables in the user defined code node are created as expected.

Thanks,

4 REPLIES 4
twocanbazza
Quartz | Level 8

My only guess would be the order that you link the data nodes to the User written code node.

Barry

Shussa
Calcite | Level 5

Thanks for the reply Barry.

I though the same but haven't had the chance to test it yet. I thought there would have been some option within connection option to control the inputs, as some out jobs have over 15 inputs, which will be time consuming prone to error to manually change the order of the link.

Thanks

LinusH
Tourmaline | Level 20

The User Written Code Transformation is very generic. It means that there are very little that can be customized in terms of metadata and dynamic macro variables. If you have some kind of naming standard of your input tables, you might can develop some macro code to map/find specific input tables that has special tasks in the transformation.

One work-around could be to use an User Written Transform. It will let you specify specific input data to specific macro variable names and descriptions.

Then can use the Connections windows to see/map input to specific input slots.

/Linus

Data never sleeps
CameronL
Fluorite | Level 6

Yes you can change the order but it is a little vague.  You are correct in that you need to go to the "Connections" option (Right Mouse Click on the User Written node).  Here are the steps which I just verified by testing;

1.  Right click on User Written node and select "Connections".

2.  Click the "..." button and select "<none>" .  Then select OK

3.  Now choose the order you need via the "..." button and selecting the datasets.

4.  Your order of input datasets has changed

See the below screenshots showing it. 

P.S.  My preferred rate is $1600 per day Smiley Wink

Cam

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 4 replies
  • 994 views
  • 3 likes
  • 4 in conversation