BookmarkSubscribeRSS Feed
danimian
Calcite | Level 5

Hi,

is there any standard option in SAS DI Studio to create or assign auto increment numbers column in the target table.

I am merging two tables using Append Transformation and need After or In Append Trans.

Please guide me if there is any possibility.

Best Regards

Dani

2 REPLIES 2
LinusH
Tourmaline | Level 20

Well, depends on what you mean by "automatic", or "standard"...

There is no real good options/transformation to do this as simple as you describes, and in a efficient way. When this requirement emerge, I usually see three options:

  1. Challenge the requirement. What is the the requirement? Mostly, this is requirement from DBA:s who is not involved in DW design principles.
  2. See if this functionality can be obtained in the target database as a automatic constraint.
  3. Create you own transformation, that just does select max(increment_col) into: max_increment on the target table (an index is required to make this fast), and then just table scans your input and assign your increment with _n_ + max_increment.
Data never sleeps
danimian
Calcite | Level 5

I think there is no direct / good option in DI Studio to do this like Load Time Column in Table Loader Transformation.
Just managed it with User Written Code Transformation.

Thanks for reply.

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
  • 2 replies
  • 1600 views
  • 3 likes
  • 2 in conversation