Primary key in Dimension

Dear Colleague,
We have SAP BPC 7.5 NW, SP10.
In any dimension primary key is ID. So dimension members can't repeated with same ID.
Our requrement is set our property RNN unique. We mean our dimension members can't repeated with same RNN.
Is it possible in SAP BPC 7.5 NW. If no, could we solved it in BW side?
Thanks,
Kadraliyev Yerlan
Edited by: Erlan Kadraliev on Feb 7, 2012 4:19 PM

Dear Colleague
Thanks for your answer Siva Namuduri .
This solution can be usefull for us and at the moment we looking advantages and disadvantages.
But do we have any other solution to make Property unique? Is it possible in BW side or FrontEnd(BPC)
Thanks,
Kadraliyev Yerlan

Similar Messages

  • 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

  • Primary Key & Logical Key in Hierarchy

    Am a bit confused with the primary key in Dimensions.....
    1. Can anyone explain the use of Primary key and the criteria to define the primary key for a level if the level has more than one level keys....
    2. If a level has more than 2 logical keys and both of them are used for drilldown (use for drilldown checked) then what will happen.... lets say we have 2 keys key1 & key2 then which key is used for drilldown in answers.....

    1. Can anyone explain the use of Primary key and the criteria to define the primary key for a level if the level has more than one level keys....The level key defines the unique elements in each logical level. The dimension table logical key has to be associated with the lowest level of a dimension and has to be the level key for that level.A logical level can have multiple level keys. When that is the case, specify the key that is the primary key of that level.
    2. If a level has more than 2 logical keys and both of them are used for drilldown (use for drilldown checked) then what will happen.... lets say we have 2 keys key1 & key2 then which key is used for drilldown in answers.....With "use for drilldown" checked for 2 logical keys , when you drill form the parent level both the keys will be displayed in the report.
    Rgds,
    Dpka

  • How to use AttributeHierarchyOptimizedState property with Primary Key of the Dimension?

    I'm reading the article about increasing SSAS performance. http://www.mssqltips.com/sqlservertip/2567/ssas--best-practices-and-performance-optimization--part-3-of-4/
    I would like to increase processing performance of Customer Dimension with CustomerID as the primary key. It is a good practice to set AttributeHierarchyOptimizedState to NotOptimized to CustomerID attribute. What are the implications to the query
    performance?
    Please advise.

    Hi,
       Since the CustomerID is the primary key (surrogate key) and the usual practice is to hide the surrogate keys in client tools. It is the best practice to set the AttributeHierarchyOptimizedState to NotOptimized to CustomerID attribute. As specified
    in the article SSAS will not create Bitmap indexes on top of that attribute and it saves a lot of processing time and decreases the cube size.
    Regards,
    Venkata Koppula

  • Mapping Dimension with a composite primary key in AWM

    Hi, I have a dimension with 3 levels in a snowflake scheme. The Primary key (PK) of one of them is a composite pk.
    Let's say: table1 (code_t1 (pk), desc_t1), table2 (code_t2 (pk), code_t1 (pk+fk), desc_t2)) and table3 (code_t3 (pk), code_t2 (fk), code_t1 (fk), desc_t3), being table3 the base level table.
    I am using AWM 11.2.0.1.0A
    My questions are:
    1) can I have a level with a composite PK?
    2) if yes, how should I do the mappings using AWM? It seems like you only can have one filed for the source column in the Mapping pane.
    3) if no, is there any workaround?
    Thank you.

    I just tried this in AWM and it is clearly buggy in this area, in part because it is trying to change the underlying representation.
    If you export the dimension to XML you should find an entry that looks like this for each level
    <HierarchyLevelMap
    KeyExpression="..."
    Query="..."
    JoinCondition="...">
    </HierarchyLevelMap>
    The 'Query' is the name of the table you are selecting from. For example, your level2 should have
    Query="TABLE2"
    The 'KeyExpression' is the expression that defines the AW dimension member for that level. For example, your level2 should have
    KeyExpression= '(TABLE2.CODE_T2 || TABLE2.CODE_T1)'
    The 'JoinCondition' defines how to join the table for a child level to that of its parent. For example, your level3 would ideally look like this
    JoinCondition='(TABLE3.CODE_T2 = TABLE2.CODE_T2) AND (TABLE3.CODE_T1 = TABLE2.CODE_T1)'
    But in your case it must be something different, probably 'TABLE3.CODE_T2 = (TABLE2.CODE_T2 || TABLE2.CODE_T1)'.
    AWM must derive its Parent field from this JoinCondition in some way, and it appears to mess it up when you use concatenated key expressions. The workaround is to hand edit the XML to specify the JoinCondition correctly for your case and recreate the dimension from that XML. I would then avoid editing this particular mapping in AWM since it will mangle it.

  • Primary Key and Chronological Key for Time Dimension

    Could someone please shed light whether it's better to use normal PK or Calendar Date (which is a chronological key on the most detailed level). I tried both and haven't noticed any difference. But my understanding is that I still need to have the PK key on the most detailed level in time hierarchy.
    Thanks

    Matt,
    the PK of the Time Dimension is a regular sequence numeric key. I have it defined as a logical PK for the dimension. However, I guess I was talking about hierarchy key. I tested it either way and the query time is the same. So I guess it doesn't really matter.
    --------Year
    Year (chronological key and primary key)
    ------------------Quarter
    Quarter (key)
    Quarter+Year (primary key, chronological key)
    ---------------------------------Day Detail
    PK (key)
    Date (primary key , chronological key)
    I hope it makes sense.

  • Primary Key Data type in Time Dimension????

    I have to create a Time dimension with day grain in a Datawarehouse system and I don’t know what is the best data type for the primary key...
    For example
    1) I could put Number(8) datatype, then the dates will be: 20050114, 20050115, 20050116.... Then in the fact tables I put the Number(8) datatype in the date fields... But in my reporting tools I have to put the to_date function to show the dates in the right format.
    2) Or I could put Date datatype, then the dates will be: 01/14/2005, 01/15/2005, 01/16/2005.... Then in the fact tables I put the Date datatype in the date fields...
    It’s the Date primary key a bad datatype? (Very slow)
    What is the best Primary Key Data type in Time Dimension???
    Thanks!

    <quote>I have to create a Time dimension with day grain</quote>
    OK.
    <quote>But in my reporting tools I have to put the to_date function to show the dates in the right format</quote>
    Why? ... if you’ve decided to have a Day dimension table what is stopping you from having the day represented as a DATE column in there? (plus all the other "right formats" you may need). The join keys should only be used for … joining.
    <quote> It’s the Date primary key a bad datatype? (Very slow)</quote>
    No … DATE or NUMBER won’t make any noticeable difference when used as the join key between the time dimension and the fact table.
    Some see advantages in having the DATE FK in the fact table …
    1. One can have range partitioning in the fact using real DATEs
    2. One can get Day-derived info right from the fact table … that is, the join to the Day dimension is not needed
    I don’t (see them as advantages) … for #1, range partitioning by some measure of time is still achievable as long as the PK values on the Day dimension are immutable (as they should) … and I don’t see #2 as an advantage for the DW end-users.
    Personally, I prefer a surrogate numeric PK … but not things like 20050129.
    <William>If you need dates then use dates. They are more robust, you can never accidentally have November 43rd</William>
    Of course this can not be about the fact table … since there the column is constrained … so this is about accidentally getting "November 43rd, 2004" into the Day dimensions when the PK is numeric 20041143; true, but is a DATE PK more robust in this case? … No … one could accidentally insert to_date('29-Jan-2005','DD-Mon-YYYY') and to_date('29-Jan-2005 00:00:01','DD-Mon-YYYY HH24:MI:SS') and that won't be very good, would it? In both cases, one would need something extra to 100% protect the integrity of the Day dimension (mind you, loading the Day dimension probably happens once a year under the supervision of the most technical people on the project).
    There is no best PK data type for the Day dimension (between NUMBER and DATE) … they are both workable solutions ... go with what you’re comfortable.

  • Materialized View - does not contain a primary key constraint

    I am trying to create materialized view. I gone through the MV wizard creation. Added 2 columns (foo_column, foo_pk) of the table and have a simple select statement (Select foo_column from foo_dim). Also created a primary key contrainst and refencing the primary key (FOO_PK) of the dimension.
    I am getting the following error:
    ORA-12014: table 'FOO_DIM' does not contain a primary key constraint

    It was solved. The table that I am querying has to have a primary key defined before creating a materialized view.

  • Diff b/w surragate keys and primary keys

    Can any one of u pls explain the difference between primary key and surragate keys,pls explain me with simple example

    Hi rajesh,
    surrogate key: For every master data record, system create a SID (Surrogate ID). If that particular master data record is used in infocube, system store the SID corresponding to that master data in dimension table and the dimension id of the dimension table is stored in infocube Fact 'F' table.
    Primary key: while creating a table we will select unique field and create as primary key..for eg empid acts as a unique key (primary key) for emp table. through this primary key we can identify the table to get the data from the table.
    i hope this helps u.
    regards
    anil

  • Primary key in Fact table

    Hi ,
    I have a question usually fact table consists of all primary keys from different dimensional tables but i have a requirement like this:
    Fact table consists of non-dimensional columns and one primary key Amount_ID(PK) aand this amount_ID is a FK in another table which records day to day transactions. My question is can a fact table have a PK ?
    Thanks,
    ch

    Yes Fact Table can have a Primary key
    But in your case it looks like the Other Table which is storing Day to Day transaction should be made FACT , and the one you are calling FACT should be made Dimension..
    Well depends again, how you are analysing data and against which attributes
    Thanks
    Ashish

  • Problem in universe while joining as the primary key is NUMBER

    Hi,
    I'm trying to join TEST.SUMMARY.NUMBER to TEST.RESPONSE.FOREIGN_KEY. The problem arises from the first of these, as the primary key is in a column NUMBER. Stupid? Definitely. Rename? Not an option.
    I think NUMBER is seen as a magic word (type), and once parsing (for example in "edit join", I get the message "Exception: DBD, ORA-01747: invalid user.table.column, table.column, or column specification State: N/A" .
    Normally putting " around the word would do the trick ("NUMBER"), but is seems universe designer removes those during the parsing (?). I come to this conclusion, because if I choose the join line from the graphical menu, and then write to the function line TEST.SUMMARY."NUMBER"=TEST.RESPONSE.FOREIGN_KEY (and press enter), the " are removed. (To get the NUMBER's to the report is good, though, by creating a variable with TEST.SUMMARY."NUMBER")
    The database is oracle, and universe is on BusinessObjecs XI 3.1.  I've tried to join in the edit join, create a derived table and use ANSI92. No good so far. I also tried to join the fields on report (WebI), but the result was always too many or not enough data from one of the tables. Merging dimensions leads to other problems. I was checking on JOIN_BY_SQL as well as PARSE_SELECT_IN_JOIN in universe parameters, but at glance I didn't find how to solve this with them.
    Any ways to force the join, or achieve the data from the both tables in one report table otherwise?

    Well, I managed to sort this out somehow by using custom SQL in the Web Intelligence report, and joining the tables there with
    LEFT JOIN TEST.RESPONSE
    ON TEST.SUMMARY."NUMBER"=TEST.RESPONSE.FOREIGN_KEY
    Smells like duck tape, but it's  working at least somehow. I guess the custom SQL is passed to some lower level, and so the universe-automatic-whatever doesn't handle it in the fly.
    Any other ideas?

  • What is the best practice for creating primary key on fact table?

    what is the best practice for primary key on fact table?
    1. Using composite key
    2. Create a surrogate key
    3. No primary key
    In document, i can only find "From a modeling standpoint, the primary key of the fact table is usually a composite key that is made up of all of its foreign keys."
    http://download.oracle.com/docs/cd/E11882_01/server.112/e16579/logical.htm#i1006423
    I also found a relevant thread states that primary key on fact table is necessary.
    Primary Key on Fact Table.
    But, if no business requires the uniqueness of the records and there is no materilized view, do we still need primary key? is there any other bad affect if there is no primary key on fact table? and any benifits from not creating primary key?

    Well, natural combination of dimensions connected to the fact would be a natural primary key and it would be composite.
    Having an artificial PK might simplify things a bit.
    Having no PK leads to a major mess. Fact should represent a business transaction, or some general event. If you're loading data you want to be able to identify the records that are processed. Also without PK if you forget to make an unique key the access to this fact table will be slow. Plus, having no PK will mean that if you want to used different tools, like Data Modeller in Jbuilder or OWB insert / update functionality it won't function, since there's no PK. Defining a PK for every table is a good practice. Not defining PK is asking for a load of problems, from performance to functionality and data quality.
    Edited by: Cortanamo on 16.12.2010 07:12

  • Attachment Table - Primary Key in CO

    How can I add dynamically the primary key VALUE to an attachment table in CO processRequest??
    Thanks!
    Edited by: user12190100 on Apr 12, 2010 1:43 PM

    Yes Fact Table can have a Primary key
    But in your case it looks like the Other Table which is storing Day to Day transaction should be made FACT , and the one you are calling FACT should be made Dimension..
    Well depends again, how you are analysing data and against which attributes
    Thanks
    Ashish

  • Primary key in BM&M layer

    Hi all,
    I'm using OBIEE 11g. I have a simple question - what's the point and meaning of the primary key for a dimension table in the BM&M layer? What is the purpose of it? I tried to change it whit different columns but no different effect. For hierarchical tables - i think there is a big difference, but in non- hierarchical?
    Thanks in advance,
    Alexander.

    Hi Srini,
    Thanks for quick reply.
    A logical level may have more than one level key. When that is the case, specify the key that is the primary key of that level. All dimension sources which have an aggregate content at a specified level need to contain the column that is the primary key of that level. Each logical level should have one level key that will be displayed when an Answers or Intelligence Dashboard user clicks to drill down. This may or may not be the primary key of the level. To set the level key to display, select the Use for drill down check box on the Level Key dialog box.What about the dimensions which doesn't have hierarchical structure - they aren't level-based or parent-child hierarchies? If i use them to just filter by them the fact tables?
    If i check the consistency i will receive an error that the dimension has to have a properly defined primary key.
    Thanks in advance,
    Alexander.

  • How to avoid primary key insert error and pipe those would-be error rows to a separate table?

    Hi All,
    Question: How can I ID duplicate values in a particular column before generating a "Violation of PRIMARY KEY constraint" error?
    Background: this SSIS package pulls rows from a remote server table for an insert to a local table.  The local table is truncated in step 1 of this package.  One of the source columns, "ProductName," is a varchar(50) NOT NULL, with no
    constraints at all.  In the destination table, that column has a primary key constraint.  Even so, we don't expect duplicate primary key inserts due to the source data query.  Nevertheless, I've been
    tasked with identifying any duplicate ProductName values that may try to get inserted, piping them all to a "DuplicateInsertAttempt_ProductName" table, and sending an email to the interested parties.  Since I have no way of knowing which row
    should be imported and which should not, I assume the best method is to pipe all rows with a duplicate ProductName out so somebody else can determine which is right and which is wrong, at which point we'll need to improve the query of the source table.
    What's the proper way to do this?  I assume the "DuplicateInsertAttempt_ProductName" table needs identical schema to the import target table, but without any constraints.  I also assume I must ID the duplicate values before attempting
    the import so that no error is generated, but I'm not sure how to do this.
    Any help would be greatly appreciated.
    Thanks,
    Eric

    agree about preventing a dupe or other error on some inconsequential dimension from killing a data mart load that takes a few hrs to run and is an important reporting system.
    I looked into using the error output before, but i think it came up a bit short...
    This is going from memory from a few years ago, but the columnid that comes out of the error data flow is an internal id for the column in the buffer that can't be easily used to get the column name.
    No 'in flight'/in-process way exists to get the column name via something like thisbuffer.column[columnid].name unfortunately
    In theory, the only way to get the column name was to initialise another version of the package (via loading the .dtsx xml) using the SMO .net libraries. I say in theory because I stopped considering it an option at that point
    And the error code is fairly generic as well if i remember correctly. It's not the error that comes out of the db (Violation of UNIQUE KEY constraint 'x'. Cannot insert duplicate key in object 'dbo.y'. The duplicate key value is (y).)  It's a generic
    'insert failed'/'a constraint failed' type msg.
    I usually leave the default ssis logging to handle all errors (and log them in the sysssislog table), and then I explicitly handle specific exceptions like dupes that I don't want to fail package/parent on error
    Jakub @ Adelaide, Australia Blog

Maybe you are looking for

  • Reading Null Values From Request Object

    For a proof-of-concept, I wrote a mini program that has 2 files. File #1 is main.html. There's a javascript function called addNewRowToThisTable that isn't displayed but it basically allows the user to create as many rows in the table as user desires

  • HP Deskjet 970cxi two sided printing

    I've got an HP Deskjet 970cxi printer connected to a print server on my LAN. I'm able to print to it from Leopard with no problems. Just works with the Leopard "HP Deskjet 970C - Gutenprint v5.1.3 drivers". However, I can't figure out how to enable t

  • Official Orange UK 3Gs unlock. Help please!

    Hi, I just paid for an official unlock on my Orange 3Gs. I was told that if I connect to iTunes, it would automatically unlock once it had been authorised. Day 3 and the "incompatible SIM" dialogue is still showing. Anyone know how long this official

  • What is best solution for backup ?

    Our environment consisted of RAC (2 nodes). we are trying to back up our database using RMAN with NetBackup. we also have other different databases need to be backed up. In RAC case, what is best solution for backing up the database ? As I mentioned

  • DDE problem

    Hi friends. I am using DDE for writing data to Excel Sheet from WHEN-BUTTON-PRESSED. It works fine on some clients PC, but on some others it returns DDE.DMLERR_NO_CONV_ESTABLISHED Error, that meens'Could not establish DDE communication channel'. I re