Skip to Content
avatar image
Former Member

How to implement composite primary key concept in BODS

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.

A B C 1 X 10 1 x 20
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Oct 19, 2015 at 09:37 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 20, 2015 at 07:34 AM

    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,

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 20, 2015 at 07:36 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded