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

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