cancel
Showing results for 
Search instead for 
Did you mean: 

How to implement composite primary key concept in BODS

Former Member
0 Kudos

Its very basic question,I want to implement or create validation rule to identify primary key and composite primary key before loading it to table.

Any help will be much appreciated.

For Ex:

Composite primary key : If column A and column B is declared as composite primary key.

ABC
1X10
1x20

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member187605
Active Contributor
0 Kudos

What do you want exactly?

You don't know what your primary key columns are, and you want to identify them? If that's the case, DS is not the right tool; you need profiling tool as the Dta Insight module in SAP Information Steward.

If you want to validate your tentative primary key columns, DS can do. Do a group by with count(*). If max(count) = 1, your composite PK is ok.

Former Member
0 Kudos

Hello Ankit,

Has your target table this primary key? If it is not set that's why you are using a regular table (I think it already exists in your database).

Try to use a template target table to achieve that (for testing). And if it's successful, then apply the primary key in your regular target table (in database layer, Drop And Create Table, applying the primary key).

Regards,

Former Member
0 Kudos

Just before loading into target table , apply reserve primary key option on your column A & B in query transform by right clicking on column names.

I hope this will help.

Thanks,

Swapnil

Former Member
0 Kudos

Thanks Swapnil for quick response.

Are you pointing to this option:

If yes then its not working.

Regards,

Ankit