How to create surrogate key in dimension without unique value

Hi, I have a dimension where there is no column with unique value. I want to add a surrogate key to replace the existing primary key which is derived from concatenating 3 columns(e.g. 'A'||'B'||'C'). I'm thinking of using sequence. But this won't allow me to link the dimension to fact table. How do I come up with surrogate key under this situation? Thanks. ~Tracy

I'm actually trying to accomplish something similar myself.
In my sources I've got two sorts of customers, ones that are directly reported, and ones whose information is provided with sales records (this is stored in module ODS).
Of course identification is different, but in the datamart (module DWH) I'm sort of forced to use an equivalent way of loading (due to the way it first used to work). To accelerate lookups on dimensions, I copy the ODS surrogate key to DWH dimensions, but this does not work for the 'inbuilt' customers because they do not have a surrogate key in the ODS.
They DO have means of unique identification, and at first I thought I could concatenate these (also 3) columns to use as identification code. Unfortunately this is VARCHAR2, where the surrogate key is (naturally) NUMBER.
So now it looks like I'm forced to first build a table in ODS especially for these 'inbuilt' customers and assign a surrogate key (by sequence) to it, this way it conforms to how 'normal' customers are loaded into DWH.
I guess you'll have to pull of the same trick, i.e. create a table with either only the 'translation' of D-code to a surrogate key or all information that is fed into the dimension, which then can be used as a lookup or as complete source when loading data into your datamart.
Good luck, Patrick

Similar Messages

  • How to create surrogate keys

    dear all,
    please give me some steps to creating and implementation of Surrogate keys in ODI .
    thanks in advance
    sri

    Hi Yellanki,
    Both ways are for calling the sequence in back end.
    <%=odiRef.getObjectName("<your sequence name>")%>.NEXTVAL is syntax for calling back end objects from ODI.
    your sequence name.NEXTVAL is generic syntax for calling sequence in Oracle.
    Both will work in ODI but its "recommended" to call backend objects in ODI syntax.
    Makes sense?
    Thanks,
    Guru

  • How we use Surrogate Keys for snowflake dimension

    Hi All,
    my question is - How we use  Surrogate Keys for  snowflake dimension
    i heard from some body Surrogate Keys only work with star schema.
    please correct me if i wrong.
    Regards,
    Manish

    Hi manishcal16PPS,
    According to your description, you can only create natural key in your dimension. But it's not working when using surrogate key. Right?
    In Analysis Services, the snowflake schema of the dimensions are represented by more than one dimension table in other words its takes multiple dimension tables to define a dimension. Surrogate key are just some extra, redundant, unique key based on the
    natural key. So there's no direct relationship or some limitations between surrogate keys and snowflake schema.
    In this scenario, since there's relationship between the two dimensions, you should create natural key. For using natural key or surrogate key. Please refer to an article below:
    Surrogate Key vs. Natural Key
    For understanding star/snowflake schema, please see:
    Understanding Star and Snowflake Schemas 
    Regards,
    Simon Hou
    TechNet Community Support

  • How we generate Surrogate Keys without using identify column

    Hi All,
    How we generate Surrogate Keys without using identify column.
    Regards,
    Manish

    There are various options
    1.IDENTITY columns - simplest to implement
    2. Using NEWID(), NEWSEQUENTIALID() functions (if you want to use GUID values as surrogate keys)
    3. SEQUENCE object (if SQL 2012 and above)
    4. Using custom functions to generate keys yourself
    This is an good article which compares use of GUIDs against integers as surrogate keys
    http://blog.jonathanoliver.com/integers-vs-guids-and-natural-vs-surrogate-keys/
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • About Surrogate Key and Dimension Key on OWB 10.2

    Hi, everyone.
    I am using OWB 10.2 and I have a question about Surrogate key and Dimension Key.
    I indicated the foreign key as VARCHAR2 type in Fact Table and Dimension Key as VARCHAR2 type is operated as Primary key in Dimension Table. I made Single Level in Dimension Table.
    I know that Dimension Key stores the surrogate ID for dimension and is the primary key of the table. Also, Surrogate ID should be only NUMBER type.
    So, in this case, Surrogate ID is NUMBER type
    Dimension key should be NUMBER type to store the surrogate ID.
    But, Dimension key also should operate the primary to relate Foreign key as VARCHAR2 type.
    How I can solve this confusing condition?
    Please let me know that.
    JWS

    Hi JWS,
    From a SQL point of view it should not be a problem to join a NUMBER field to a VARCHAR2 field because during execution there will be an implicite cast for the NUMBER value to a VARCHAR2 value. See the example below.
       SELECT * FROM DUAL
       WHERE   1 = '1'From an OWB point of view it is not possible to have a Dimension with an NUMBER value Key that has a relation to a VARCHAR2 value Foreign key in a Fact table. This is caused due to the creation of a Fact table in OWB in which the Foreign keys in it are build from de Dimension tables that refer to them.
    You will loose the reference to the Dimension when changing the type of the Foreign Key.
    To resolve this issue I would advise you to use a Sequence that generates your Surrogate Key (NUMBER type) for the Dimension table and store it in the Primary Key Column (VARCHAR2 type).
    When validating the mapping you will get a warning, but when executing this should give no problems.
    Regards,
    Ilona

  • How to create Hierarchies for a Dimension?

    Hi,
    How to create Hierarchies for a Dimension in Multidimensional Models? Could you please suggest some document provides step by step instructions to create Multidimensional Model?
    Thanks
    M Thiyagarajan

    Hi M Thiyagarajan,
    connect dimension to first level and after that connect that level to another one and so on. For level - each additional outgoing connection means additional hierarchy.
    Philip

  • How to create iTune or App Store without credit card for my existing Apple ID without create new Apple ID or email?

    I got 2 Apple ID and the first time to I use it to iTune or App Store, a box will pop out and telling me this:
    "This Apple ID has not yet been used with the i Tunes Store. Please review your account information."
    Then, I click on the button, "Review". Bla bla... but ended up, I must provide a credit card in order to complete it.
    I do not have credit card, so I search 'How to create iTune or App Store without credit card', same link and same tactic only valid for New Apple ID.
    So, it seem no other option to create iTune or App Store without credit card for existing Apple ID, right?

    The same thing is happening to me!

  • HT2731 how to create a free apple id without puttin in the cridit card info?

    how to create a free apple id without puttin in the cridit card info?
    Card type "None" option is not available

    Welcome to the Apple Community.
    To be able to download free apps without a recognised method of payment or gift card.
    Open iTunes and navigate to the app store. Select a free app to download. A simple way to do this is to scroll down to the top free apps box on the right hand side, hover your mouse over the first item and click on the free button that appears when you hover over it.
    A pop up will open asking you to sign in with your Apple ID click "create new account", click continue to create your account. Check the box to accept the store terms and conditions and click continue.
    Enter your email address, password, security question, and date of birth, click continue. Now, you will be asked to provide a payment method. Note now that the last option says "none".

  • How to create an instance for RemoteSession without using create() method

    How to create an instance for RemoteSession without using create() method?

    What's RemoteSession? Not in the JDK. And does the question have anything to do with concurrency?

  • How to get the "Key" for Dimension in SSAS.

    Hi
    How to get the "Key" for Dimension in SSAS.
    (Below value is the PPSParameters table XML column value in PPSDatabase in SharePoint.
    Below three key values are belongs to "Dimension". I have tried to find the key but I could net get it.)
    <NewDataSet>
    <UserValues><Key>16A201A9E75128559F947D58E6D187A9</Key></UserValues>
    <UserValues><Key>7FBEA449A6ED5606973306445839619E</Key></UserValues>
    <UserValues><Key>A8F75F9720817BCD2E1DFC1C1CF1E678</Key></UserValues>
    </NewDataSet>
    Thanks & Regards
    Poomani Sankaran

    To Be Honest there is not one straight Cmdlet that atleast I have come across 
    The best way would if you have Lync monitoring server 
    Using the Lync Server 2013 Monitoring Server
    If you have the Monitoring Server role configured in your environment, and for Lync Server 2013 everyone should!, you can use information contained in the LcsCDR database to pull back the last time a user signed in.  You can run the following query* to
    pull back the user's SIP URI and their last login time:
    USE LcsCDR
    SELECT dbo.Users.UserUri, dbo.UserStatistics.LastLogInTime
    FROM dbo.UserStatistics
    JOIN dbo.Users ON dbo.Users.UserId = dbo.UserStatistics.UserId
    ORDER BY UserUri
    Which produces the following output:
    The advantage to using the Monitoring Server to obtain this data is that unlike the information contained in the rtcdyn database, the information from the LcsCDR data will persist even when the user isn't signed into Lync.
    To get approx count of users enable for Lync Server in your organisation 
    Get-CsUser -Filter {Enabled -eq $true} | MeasurE
    Please not the above command let will give you an approx number not exact 
    From the Monitoring report yet the SIP account that signed in and then from count find out how many user havent signed in this is manual task 
    Hope this is helpful 
    Please remember, if you see a post that helped you please click ;Vote As Helpful" and if it answered your question please click "Mark As Answer" Regards Edwin Anthony Joseph

  • How to create objects to paint itselfs without specifiy the location

    How to create objects to paint itselfs without specifiy the location using Java 2D

    shot in the dark: pass in the Graphics2D context to the method ?

  • How to created Costing Key

    Hi,
    How to create costing key and wwhere to assign for value fields.Kindly provide me the Tcodes for the same.
    I will assgin poiints
    Thanks
    Sunitha

    Hi,
    The tcode to create costing key: KE40
    The tcode to assign value fields: KE4R

  • How to create AES keys?

    How to create AES keys in Java Card SDK 2.2.1?
    The manual is confusing.

    The oncard building of an AES key is somehow similar to an DES key.
    On applet installation build an AES key by:
    AESKey key = (AESKey) KeyBuilder.buildKey(KeyBuilder.TYPE_AES,KeyBuilder.LENGTH_AES_128,false);
    //Now you can fill the key with random data.
    key.setKey(randomDataof128bitLength,(short)0);For generationg random data see RandomData.
    But you should keep in mind that most JavaCards only support DES /3DES as symmetric cipher. I only know two card that support AES (g&d SmartCafe Expert 64 and Axalto Cyberflex Access 64 K).
    Jan

  • How to create a parent-child dimension in EIS?

    Does anyoe know how to create a parent-child dimension in EIS? Helps.

    It's easy but there are a few things to know.
    -The underlying dimension table must be a 2 column recursive design. It can also have additional aliases and property columns.
    -in the OLAP model you must do a "self-join". select the table properties | physical joins. then join the parent to the child within the same table
    -in the metaoutline drag only one column, not both (i like using the child only) to the dimension in the metaoutline panel.
    If you need more help email me ([email protected]) and I'll do a webex demo for you.
    Ron

  • How to create and execute a function whose return value is  a table

    hi folks ,
    i would like know how to create and execute a function whose return value is a table ,
    am new to pl/sql ,
    my statement for the function is
    SELECT ct.credential_code, c.expiration_date
    FROM certifications c, credential_types ct
    WHERE ct.crdnt_id = c.crdnt_id
    AND c.person_id = person_id;
    i would like to have the result of the above query as return value for the function.
    Thanks in advance ,
    Ashok.c

    hi Ps ,
    Can you please do small sample ,
    that would help me in clear understanding
    thanks in advance
    ashok.c

Maybe you are looking for

  • Proble while creating new Data Connection for the Webservice

    Hai All, when creating a new Data Conneciotn for the Webservice in the interactive form i got the following errror Cannot choose this operation: - there is no associated SOAP Binding edit -> new Data Connection -> WSDL -> i entered the wsdl url -> i

  • I installed itunes 10.5 won't open in Win 7

    I have tried all suggestions I have read online, I have even done suggestions by apple, I have tried running it in safe mode, I have created a new user and run it, I have deleted everything relating to apple and reinstalled, and nothing, when I tried

  • Problem in using at selection-screen output

    Hai Frnds, I am using 5 parameters in the selection screen . I am entering data in the 4 input fields. Then I am doing concatenate 4 fileds data into the 5th field in the event AT SELECTION-SCREEN OUTPUT, but my problem is When ever i click ENTER , t

  • My itunes is not launching

    my laptop was working really well but after it got updated to the newest version my itunes stopped working and it doesnt open at all

  • Calling Windows XP FTP Command in java

    Hi there! Need help in calling Windows XP FTP command in java: executing the FTP command in DOS works well, but when I tried calling it in java using Process and Runtime objects, it successfully transferred the files from remote to my local pc... but