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

Similar Messages

  • How to use Remote key for linking two repository

    Hi,
    I have a challenge like not to repeate common tables like Company_code,Currency,Vendor name,customer name across all repositories.
    Is there any way I can use 'Remote key' to link different repository.
    I can create a Main table with all common attributes required across the repository but want to know how I can connect it to different repository.
    For example to get company-code in Vendor table , how can I link Company-code main table(customized) in another repository may be thru 'Remote key'.
    Going thru java api route is not prefffered for the sake of simple solution.
    Appreciate your help in providing any idea and detail steps for the process.
    -regards, Reo

    could you confirm the name and the existence of this file "IOMM_20121213_060736.csv" ?
    same error like:
    http://www.oracle-base.com/articles/9i/external-tables-9i.php
    if the load files have not been saved in the appropriate directory the following result will be displayed.
    SQL> SELECT *
      2  FROM   countries_ext
      3  ORDER BY country_name;
    SELECT *
    ERROR at line 1:
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04040: file Countries1.txt in EXT_TABLES not found
    ORA-06512: at "SYS.ORACLE_LOADER", line 14
    ORA-06512: at line 1Edited by: Fran on 10-ene-2013 23:32

  • How to use Distribution Key for planning workforce

    Hi,
    I have an activity named "Activity1":
    Start date = ST = 01/01/2008
    End date = ST + 10
    Work = 120H
    Duration = 10day
    Activity type = Labor
    I want to assign workers into the activity as follows:
    01/01/2008: 10H
    02/01/2008: 20H
    03/01/2008: 30H
    04/01/2008: 40H
    04/01/2008 - 10/01/2008: 12H
    So I maintained a Distribution Function in IMG as below:
    % Duration % Req.
    0 9%
    10 18%
    30 27%
    40 36%
    50 10%
    And maintain the distribution Strategy in:
    SPRO-->PS->Resources->Distribution->Define distribution strategy.
    And maintain Req. distribution in:
    SPRO-->PS->Resources->Distribution->Define requirement distribution.
    Finally maintain this distribution key for the activity in "DistKeyCapRqInt" in internal tab .
    My question:
    What are the next steps for planning workers?
    Which transaction is used to execute and monitor the task as plan?
    Thanks
    Long

    "How to split sender data to reciever such tht the distribution should be done on the actual costs of each reciever. how to formulate the rule for reciever?" :
    In the segment header : use receiver rule 1 "variable portions" + variable portion type with rule 1 "actual costs". These parameters are confirmed in the receiving tracking factor page.
    Then go in the "receiving wighting factors" just for a check of factor per fields. All the lines have the value 100. It's absolutely OK, don't modify it.
    One thing to notice: if you use this rule, all the receiver must have a value, in the contrary a distribution based upon receiver actual cost can't run.
    "In our company GST for all documents goes to a particular cost center 'X'. Now they want to distribute the GST to the respective cost centers from which it is actually incurred.I tried using SKF with '%' as unit measure but then it's distributing the costs equally to all recievers. How to solve this?":
    did you change the percentages of each receveirs in the receiving tracking factor page?
    hope it's helpful
    Pascal

  • How to Maintain Surrogate Key Mapping (cross-reference) for Dimension Tables

    Hi,
    What would be the best approach on ODI to implement the Surrogate Key Mapping Table on the STG layer according to Kimball's technique:
    "Surrogate key mapping tables are designed to map natural keys from the disparate source systems to their master data warehouse surrogate key. Mapping tables are an efficient way to maintain surrogate keys in your data warehouse. These compact tables are designed for high-speed processing. Mapping tables contain only the most current value of a surrogate key— used to populate a dimension—and the natural key from the source system. Since the same dimension can have many sources, a mapping table contains a natural key column for each of its sources.
    Mapping tables can be equally effective if they are stored in a database or on the file system. The advantage of using a database for mapping tables is that you can utilize the database sequence generator to create new surrogate keys. And also, when indexed properly, mapping tables in a database are very efficient during key value lookups."
    We have a requirement to implement cross-reference mapping tables with Natural and Surrogate Keys for each dimension table. These mappings tables will be populated automatically (only inserts) during the E-LT execution, right after inserting into the dimension table.
    Someone have any idea on how to implement this on ODI?
    Thanks,
    Danilo

    Hi,
    first of all please avoid bolding something. After this according Kimball (if i remember well) is a 1:1 mapping, so no-surrogate key.
    After that personally you could use Lookup Table
    http://www.odigurus.com/2012/02/lookup-transformation-using-odi.html
    or make a simple outer join filtering by your "Active_Flag" column (remember that this filter need to be inside your outer join).
    Let us know
    Francesco

  • Best Practice loading Dimension Table with Surrogate Keys for Levels

    Hi Experts,
    how would you load an Oracle dimension table with a hierarchy of at least 5 levels with surrogate keys in each level and a unique dimension key for the dimension table.
    With OWB it is an integrated feature to use surrogate keys in every level of a hierarchy. You don't have to care about
    the parent child relation. The load process of the mapping generates the right keys and cares about the relation between the parent and child inside the dimension key.
    I tried to use one interface per Level and created a surrogate key with a native Oracle sequence.
    After that I put all the interfaces in to one big Interface with a union data set per level and added look ups for the right parent child relation.
    I think it is a bit too complicated making the interface like that.
    I will be more than happy for any suggestions? Thank you in advance!
    negib
    Edited by: nmarhoul on Jun 14, 2012 2:26 AM

    Hi,
    I do like the level keys feature of OWB - It makes aggregate tables very easy to implement if your sticking with a star schema.
    Sadly there is nothing off the shelf with the built in knowledge modules with ODI , It doesnt support creating dimension objects in the database by default but there is nothing stopping you coding up your own knowledge module (use flex fields maybe on the datastore to tag column attributes as needed)
    Your approach is what I would have done, possibly use a view (if you dont mind having it external to ODI) to make the interface simpler.

  • 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

  • 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 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

  • How to use a key file in the FTP Task using and SSL connection

    In the past I have used this code to set the FTP pass word in an FTP component task in SSIS.
    Does anyone know how to use a Key file in an SSL connection to download a file from an FTP site?  If not can you tell me where I can get the C# code examples to learn how to create a script task or if there is another way in SSIS to download large files
    from an SSL FTP site?  Thank you for any help offered.
    public void Main()
    ConnectionManager FTPConn;
    FTPConn = Dts.Connections["FTPServer"];
    FTPConn.Properties["ServerPassword"].SetValue(FTPConn, Dts.Variables["FTPPassword"].Value);
    Dts.TaskResult = (int)ScriptResults.Success;
    Antonio

    You can use SFTP for this.
    This is a way of implementing SFTP in SSIS using standard tasks 
    http://visakhm.blogspot.in/2012/12/implementing-dynamic-secure-ftp-process.html
    also see
    http://blog.goanywheremft.com/2011/10/20/sftp-ftps-secure-ftp-transfers/
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How to set Shortcut keys for button in Apex

    Hi
    Could anyone help me on how to set shortcut keys for buttons in Apex.
    I need to use say ALT + S to submit the page.
    The following thread pertaining to HTML DB refered to use ACCESS key. but that couldnt work in my case.
    Re: operation of the app. with the keyboard
    Any pointers on achieving this would be helpful.
    Thanks
    Vijay

    Hi Vijay,
    I’m afraid you must do it using javascript key listener. You can’t use action() on template based buttons because they are actually not HTML buttons but images with hyperlink.
    Key listener checks which key has been pressed down and invoke some JS function. For example, write this code in page header:
    <script>
    document.onkeydown=keyCheck;
    function keyCheck(e){
         var KeyId = (window.event) ? event.keyCode : e.keyCode;
         switch(KeyId){         
              case 113:
                   doSubmit('SAVE');
                   break;                    
              case 118:
                   alert('Hello');
                   break;
    </script>
    This script will submit page with request 'SAVE' if you press F2 or will show alert message if you press F7. Modify it to your issue.
    Regards,
    Przemek

  • Hello !  pls give some ti[ps how to use bapi's for data uploading?

    hello !
      pls give some ti[ps how to use bapi's for data uploading?
    regards,
    Arjun

    Hi,
    See the below report extract:
    where it_data is having uploaded data.
    LOOP AT<b> it_data</b> INTO wa_data.
        line_count = sy-tabix.
        "Date Validation
        CONCATENATE wa_data-uplft_date4(4) wa_data-uplft_date2(2) wa_data-uplft_date+0(2)
        INTO wa_data-uplft_date.
        "READ TABLE it_ekko INTO wa_ekko WITH KEY lifnr = wa_data-vendor.
        LOOP AT it_ekko_temp INTO wa_ekko_temp WHERE lifnr = wa_data-vendor.
          IF wa_ekko_temp-kdatb <= wa_data-uplft_date AND wa_ekko_temp-kdate >= wa_data-uplft_date.
            MOVE-CORRESPONDING wa_ekko_temp TO wa_ekko.
            APPEND wa_ekko TO it_ekko.
          ENDIF.
        ENDLOOP.
        "IF sy-subrc = 0 AND wa_ekko-kdatb <= wa_data-uplft_date AND wa_ekko-kdate >= wa_data-uplft_date.
        LOOP AT it_ekko INTO wa_ekko.
          wa_data_header-pstng_date = wa_data-uplft_date.
          wa_data_header-doc_date = sy-datum.
          wa_data_header-bill_of_lading = wa_data-bill_of_lad.
          wa_data_header-ref_doc_no = wa_data-del_no.
          CONCATENATE wa_data-header_text1 '-'
                      wa_data-header_text2 '-'
                      wa_data-header_text3 '-'
                      wa_data-header_text4
                      into wa_data_header-HEADER_TXT.
          IF wa_data-indicator = 'Y'.
            wa_data_item-material = '000000000000200568'.
          ELSE.
            wa_data_item-material = '000000000000200566'.
          ENDIF.
          LOOP AT it_ekpo INTO wa_ekpo WHERE ebeln = wa_ekko-ebeln AND matnr = wa_data_item-material.
            "Collect Item Level Data
            wa_data_item-plant = '1000'.
            wa_data_item-stge_loc = '1001'.
            wa_data_item-move_type = '101'.
            wa_data_item-vendor = wa_data-vendor.
            wa_data-qnty = wa_data-qnty / 1000.
            wa_data_item-entry_qnt = wa_data-qnty.
            wa_data_item-po_pr_qnt = wa_data-qnty.
            wa_data_item-entry_uom = 'KL'.
            wa_data_item-entry_uom_iso = 'KL'.
            wa_data_item-orderpr_un = 'KL'.
            wa_data_item-orderpr_un_iso = 'KL'.
            wa_data_item-no_more_gr = 'X'.
            wa_data_item-po_number = wa_ekpo-ebeln.
            wa_data_item-po_item = wa_ekpo-ebelp.
            wa_data_item-unload_pt = wa_data-unload_pt.
            wa_data_item-mvt_ind = 'B'.
            APPEND wa_data_item TO it_data_item.
            CLEAR wa_data_item.
          ENDLOOP.
          CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
            EXPORTING
              goodsmvt_header = wa_data_header
              goodsmvt_code   = goodsmvt_code
              testrun         = 'X'
            TABLES
              goodsmvt_item   = it_data_item
              return          = return.
          READ TABLE return INTO wa_return WITH KEY type = 'S'.
          IF sy-subrc <> 0.
            DESCRIBE TABLE return LINES sy-tfill.
            IF sy-tfill = 0.
              CALL FUNCTION <b>'BAPI_GOODSMVT_CREATE'</b>   
            EXPORTING
                  goodsmvt_header = wa_data_header
                  goodsmvt_code   = goodsmvt_code
                  testrun         = ' '
                TABLES
                  goodsmvt_item   = it_data_item
                  return          = return.
              CALL FUNCTION <b>'BAPI_TRANSACTION_COMMIT'</b>
               EXPORTING
                 WAIT          = 'X'
              IMPORTING
                RETURN        =
            ENDIF.
          ENDIF.
          LOOP AT return INTO wa_return.
            WRITE: 'Messsage TYPE  ', wa_return-type,
                  /,'ID  ', wa_return-id,
                  /, 'Number  ', wa_return-number,
                  /, 'Message  ', wa_return-message,
                  /, 'Long Text  ', wa_return-message_v1,
                                    wa_return-message_v2,
                                    wa_return-message_v3,
                                    wa_return-message_v4,
                 /, 'Failed at line', line_count.
          ENDLOOP.
          CLEAR: wa_ekko, wa_ekpo, wa_data, it_data_item[], wa_data_header.
        ENDLOOP.
    Reward if useful!

  • Surrogate key for fact

    Hi all,
    i don't know that in ETL update of existing records in fact can happen or not. IF it happen then how can i handle it? is it recommendable to implement surrogate key for fact tables to update the existing records of fact? That work like primary key for fact table. This doesn't have any relation with OWB. This is a general concept about ETL.
    Regards,
    Sumanta

    Yes, you can update a fact.
    You generally do this by adding a unique constraint to the fact table which comprises the identifying primary key columns from the source tables, but exclusive of the surrogate key. The surrogate key will be the actual primary key of the table.
    Now, when you make an insert/update mapping you include a sequence that generates your surrogate key, and then select the 'match by' on the fact table to match by the unique key (actual source table values which determine uniqueness) rather than the primary key. Then, on the surrogate key column on the fact table which is being populated by the sequence, you set its property to not update the surrogate key when an update is being applied to the row.
    This way the update statement will not update the surrogate key when updating the fact based upon the source identifiers that identify this fact.
    I'm sure I could explain this more clearly... but I'm very pressed for time right now.
    Cheers,
    Mike

  • How to Use "Hot Key" in the Search help

    Hi,
    Please explain how to use hot key with some example.

    TYPE-POOLS SLIS. DATA: BEGIN OF itab OCCURS 0,
            BUKRS LIKE T001-BUKRS,
            BUTXT LIKE T001-BUTXT,
          END   OF itab.
    PARAMETERS: P_BUKRS TYPE BUKRS.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_BUKRS. 
    PERFORM F4_FOR_BUKRS.
    FORM F4_FOR_BUKRS.   DATA: IT_FIELDCAT TYPE  SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
            ES_SELFIELD TYPE  SLIS_SELFIELD. * Get data
      SELECT BUKRS
             BUTXT
             FROM T001
             INTO TABLE itab
             up to 10 rows .
    Get field
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
           EXPORTING
                I_PROGRAM_NAME     = SY-REPID
                I_INTERNAL_TABNAME = 'ITAB'
           CHANGING
                CT_FIELDCAT        = IT_FIELDCAT[].   LOOP AT IT_FIELDCAT.
        IT_FIELDCAT-KEY = SPACE.
        IF IT_FIELDCAT-FIELDNAME = 'BUTXT'.
          IT_FIELDCAT-EMPHASIZE  = 'C710'.
          IT_FIELDCAT-HOTSPOT = X.
        ENDIF.
        IF IT_FIELDCAT-FIELDNAME = 'BUKRS'.
          IT_FIELDCAT-EMPHASIZE  = 'C610'.
        ENDIF.     MODIFY IT_FIELDCAT.
      ENDLOOP.   CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
        EXPORTING
    I_TITLE                       = 'THIS IS FOR F4 IN COLOR'
          I_TABNAME                     = 'ITAB'
          IT_FIELDCAT                   = IT_FIELDCAT[]
        IMPORTING
          ES_SELFIELD                   = ES_SELFIELD
        TABLES
          T_OUTTAB                      = ITAB . ENDFORM.                    " F4_FOR_BUKRS

  • How to use Synth LookAndFeel for scrollbar?

    Hello there,
    I read many articles on Synth ookAndFeel but in any article I could not find how to use Synth LookAndFeel for ScrollBar.
    How can use SynthLookAndFeel without using any extra LookAndFeel

    Hi,
    what u do is this:
      <style id="button">
        <state value="DEFAULT">
          <imagePainter path="Synth/testdown.png" sourceInsets="6 6 6 6" paintCenter="false" stretch="true"/>
          <color value="#3333FF" type="TEXT_FOREGROUND"/>
        </state> 
        <state value="SELECTED">
          <imagePainter path="Synth/test.png" sourceInsets="6 6 6 6" paintCenter="false" stretch="true"/>
          <color value="#0000FF" type="TEXT_FOREGROUND"/>
          </state>
        <state value="PRESSED">
          <color value="#0000FF" type="TEXT_FOREGROUND"/>
          <imagePainter path="Synth/test.png" sourceInsets="6 6 6 6" paintCenter="true" stretch="true"/>
        </state>
      </style>
      <bind style="button" type="region" key="BUTTON"/>the <bind> element applys the style 2 the object (JButton). It's actually a region, u can get all the regions at
    http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/plaf/synth/Region.html
    good luck!
    DirectXMan
    P.S. If u find more sites on Synth please post them.

  • By default, on a mac keyboard F3 lets you see all the open apps and the such. However, I changed it so that I use those keys for keyboard shortcuts; But i'd like the normal F3 key to still work without me having to press FN.

    By default, on a mac keyboard F3 lets you see all the open apps and the such. However, I changed it so that I use those keys for keyboard shortcuts; But i'd like the normal F3 key to still work without me having to press FN.

    rajlego,
    in the Keyboard pane of System Preferences, select the Shortcuts tab, and then select Mission Control on the left-hand side. On the right-hand side, make sure that the Mission Control checkbox is checked, double-click on its current key combination (by default “^↑”) so that the key combination is highlighted, and then press the F3 button — that will set its shortcut to be F3. You can now press F3 to bring up Mission Control without needing to also press the Fn button.

Maybe you are looking for

  • ASA Transparent mode multicast traffic in 8.2 and 8.4

    Hi, When i configure 8.2 in trasparent mode and deploy the a network that was wrok on EIGRP after that i found the neighborship was stop when i allow the mutlicast address and prtocol on outside interface it was start the working But when i deploy an

  • FlowLayout in JPanels, and Container

    I set the FlowLayout alignment to RIGHT justify on my Container. I also want to control individual FlowLayouts in JPanels that are added to the Container. I want some panels to be center, and others LEFT or LEADING alignments, etc. So far everything

  • Add menu after the plug-in has started

    Hello, I want to added a menu under 'File' menu after the plug-in has started. Through the shell example in SDK, i am able to add menus on plug-in startup but cant figure out how to add menus after the plug-in has started. Is it possible to do so? If

  • Activating Flash paper??

    Hi, I have Studio 8 and have tried repeatedly to get flash paper to work. Did I need to do a separate activation for this application? All the other Studio apps work fine. When I try to convert a small word doc to flash/swf or pdf the process looks l

  • Qmaster doesn't work as long as i'm connected to the internet

    Hi everybody, my problem is that Qmaster doesn't work for me as long as i'm connected to the internet (Ethernet-DSL-Connection). The renderjob is submitted to BatchMonitor but it doesn't start. As soon as i'm going offline it works fine. I don't know