Hitachi Vantara Pentaho Community Forums
Results 1 to 8 of 8

Thread: SCD type2

  1. #1

    Default SCD type2

    Hi,

    How we are implementing scd2 in a dimension table with PK,FK,AK constraints.?

    I have fields which are not null too.

    Which fields I have to define in the key fields?

    Anyone please help me

    preetha
    Last edited by preetha; 11-14-2008 at 11:24 AM.

  2. #2
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    How we are implementing scd2 in a dimension table with PK,FK,AK constraints.?
    You typically don't put any constraints on them.

    I have fields which are not null too.
    If they are not keys, it's fine.

    Which fields I have to define in the key fields?
    The natural key of the SCD. Typically this is the primary key of the source system table (customer ID, product ID, etc)

  3. #3

    Default need more information for SCD2

    Thank you very much for your advice....

    I need some more clarifications.

    I have a dimension table OFFICE_DM with

    1) OFFICE_DM_KEY as PK---it's values is generated from the sequence
    SEQ_OFFICE_DM
    2) COMPANY_DM_KEY as FK
    3) SOURCE_OFFICE_PRIMARY_ID as AK

    So in the technical keyfield I gave my PK field OFFICE_DM_KEY and in the key field I gave my foreign key COMPANY_DM_KEY.(Is this specification correct?)

    All other fields are included in the lookup/update field.

    I created addtional columns in my dimension table for version,date_from and date_to.

    I removed all the constraints and it is working.

    I already have data in my dimension.I want to modify one row but it is inserting the row with version 1.

    I don't have version column in my source table.



    Please give me a solution for this

    Thanking You.

    regards

    preetha







    Quote Originally Posted by MattCasters View Post
    You typically don't put any constraints on them.



    If they are not keys, it's fine.



    The natural key of the SCD. Typically this is the primary key of the source system table (customer ID, product ID, etc)

  4. #4
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    Is this specification correct?
    Most likely not, no. It seems you don't understand how SCD work.
    Please figure that out first.

  5. #5
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    Sure, no problem:

    http://en.wikipedia.org/wiki/Slowly_changing_dimension

    All the best,

    Matt

  6. #6

    Default

    Hi,

    Thanks Matt....I tried scd2 and is working....but while running some of my fields getting the following error


    COMPANY_DM_KEY BigNumber : There was a data type error: the data type of java.lang.Double object [1855.0] does not correspond to value meta [BigNumber]

    Caused by: java.lang.RuntimeException: LONGITUDE_NUM String(64) : There was a data type error: the data type of java.lang.Double object [-92.410718] does not correspond to value meta [String(64)]


    What is the cause of this error?When I tried adding these columns to my key field,it is working correctly....Can you help me ,please?

    for scd1 can I use the dimension lookup/update?

    Thanking you

    regards
    preetha

  7. #7
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    It looks like you are mixing rows with different layout. Check the "Safe mode" box before running to see where it occurs.

  8. #8

    Default

    Hi Matt,

    Thank you for your valuable informations.

    I'm getting the following error

    Error serializing row to byte array.
    Caused by: java.lang.RuntimeException: SOURCE_OFFICE_ID Integer(16) : There was a data type error: the data type of java.lang.String object [0001] does not correspond to value meta [Integer(16)]

    Actually my source_office_id is a NUMBER data type.

    In the initial load ,there is no errors.While we are inserting or updating this error occurs.

    Please tell me a solution.

    Thanking you.

    Preetha

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.