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
Similar Messages
-
How we generate Surrogate Keys without using identify column
Hi All,
How we generate Surrogate Keys without using identify column.
Regards,
ManishThere 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 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,
ManishHi 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 -
Consider cross references for comparison
Hi All,
I am using EMFCompare.createDefaultScope(EObject, EObject) for comparing a tree structure. That tree structure contains cross references as the least child node. These cross references are not considered within the scope of matching phase so all the cross references will be considered as differences.
How to consider cross references for comparison and make them behave in the same way as other EObjects?"cross references" don't help define what you are trying to do; but I guess your "two trees" are actually more than two, referencing other trees elsewhere.
"EMFCompare.createDefaultScope" is deprecated. you should simply be instantiating the DefaultComparisonScope. It takes not only "EObject" instances, but accepts "Notifiers". This means you can and should be using "Resource"s as in your case, or better yet, "ResourceSet"s.
What you need to do is properly load your resources in separate resourceSets (one for right, one for left, one for the common ancestor if there is one) and use that as the comparison scope.
Laurent Goubet
Obeo -
How to maintain alternative material in a BOM for a component.
how to maintain alternative material in a BOM for a component.if stock for existing bom component is less then it should consider other alternative material in the same BOM
HI,
You can maintain alternate material for BOM Component by specifying Alternate Item group as below;
Go to CS03/CS02--> Items-> Select Component and go to details->Basic Data Tab--> General Data
Pls. find more details about Alternate Item group maintainance as below:
Alternative item: group
Consolidation of alternative items within a BOM. Every material in the assembly can be included in the alternative item group.
Use
As soon as you enter an alternative item group, you see an additional dialog box with the following data: ranking order, strategy, usage probability.
You can maintain alternative items in the following situations:
Alternative positions with specific usage probability
These alternative items are incorporated with a specific usage probability. Enter the usage probability for each alternative item in the group, so that:
dependent requirements are determined in requirements planning
dependent requirements are changed to a reservation in the production order
Alternative positions as information
You can enter an alternative item for information purposes. This item would then, for example, only be taken into account in situations involving missing parts.
As there should be neither dependent requirements nor a reservation for this item, enter no usage probability.
Procedure
Enter the same character string to denote the alternative items of an alternative item group.
Enter the same strategy for all alternative items in the alternative item group.
Dependencies
Alternative items are valuated in the following way:
Dependent requirements determination
Requirements planning determines the dependent requirements according to the usage probabilities that have been entered.
If the usage probability is 0%, then no procurement is planned for the item. For information purposes, however, dependent requirements with 0 as quantity are created.
Withdrawal posting
You can control the withdrawal posting for the resevation in the production order in the following way:
Withdrawal according to usage probability (manual change is possible)
Withdrawal if there is 100% availability
(Check ranking order and strategy)
Example: See Strategy for alternative position
Further you can also maintain alternate material if you want to stop using this material at certain time as below:
In material master of the material ,
Go to MRP-4 View----> Under Discongtinued parts specify
Discontinuation Indicator
Eff-out.
Follow-up matl
So system will automatically consider follow up material in BOM as per the settings you have maintained for the material to be replaced.
Hope this helps.
Regards,
Tejas -
How to get the data from pcl2 cluster for TCRT table.
Hi frndz,
How to get the data from pcl2 cluster for tcrt table for us payroll.
Thanks in advance.
Harisumanth.ChPL take a look at the sample Program EXAMPLE_PNP_GET_PAYROLL in your system. There are numerous other ways to read payroll results.. Pl use the search forum option & you sure will get a lot of hits..
~Suresh -
How to find block free space and PCTUSED FOR THE TABLE
HI all,
Due to performance issues for my database , my management ask me to reset the PCTUSED and PCTFREE values , and my doubt is
1)How to find the current PCTUSED and PCTFREE values.
2)How to find block free space and PCTUSED FOR THE TABLE.
Please help me out regarding this.
Regards,
Vamsi.1)version is 10.2.0.4
2)output of query
tablespace extent_management allocation_type segment_space_management
SYSTEM LOCAL SYSTEM MANUAL
UNDOTBS1 LOCAL SYSTEM MANUAL
SYSAUX LOCAL SYSTEM AUTO
TEMP LOCAL UNIFORM MANUAL
USERS LOCAL SYSTEM AUTO
UNDOTBS2 LOCAL SYSTEM MANUAL
INS LOCAL SYSTEM AUTO
CONFTBS LOCAL SYSTEM AUTO
REINS LOCAL SYSTEM AUTO
ANALYST LOCAL SYSTEM AUTO
BI LOCAL SYSTEM AUTO
INTRFC LOCAL SYSTEM AUTO
COGNOS LOCAL SYSTEM AUTO
TS_INDX LOCAL SYSTEM AUTO
TS_CHOLAWEB LOCAL SYSTEM AUTO
TS_DASBOARD LOCAL SYSTEM AUTO -
How to find the TCODE that is created for the table maintanance generator
Hi ,
How to find the TCODE that is created for the table maintanance generator of particular table,if we only know the table name.
Regards
Ramakrishna LHello,
I try it this way
1. Goto SE16 --> enter table TSTCP.
2. In the selection-screen displayed, enter
PARAM = *<ZTABNAME>*
You will get the t-code for the TMG.
BR,
Suhas
PS: Are you sure a t-code has been created for this TMG ? -
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 -
Hi,
I try to generate a report using a template. In my template I use some cross-reference to refer to one bookmark. For exemple in the first page I created a bookmark for my name and in the header I created a cross-reference refer to my name. The problems is when I run my VI the bookmark actualise perfectly but the cross-reference refer to the bookmark can't actualise with the same value and generates an error : "Error! Reference source not found".
Can somebody help me please!
Nki
Solved!
Go to Solution.
Attachments:
01.jpg 72 KBHi,
When i create the word template, the bookmaks and the cross-reference referred to the bookmark update correctely. The problem is when I try to change the bookmark using "report generation from template vi" the bookmark change but not the cross-reference and the error generated is "Error! Reference source not found".
I make coople reasherch and i think they have no solution for this because : "if the text in a heading referred to in a cross-reference is revised, the cross-reference to the heading may no longer work" (http://office.microsoft.com/en-us/word-help/troubleshoot-cross-references-HP005189368.aspx).
To "resolved" this problem I create an other bookmark in the template who have the same value white the principle bookmark.
I use Labview 2011 and Micosoft office 2010. -
How to find broken links or cross-references in a PDF file?
Hi,
Recently I have been trying to figure out if there is a way to find out any broken link(s) in a PDF file. I'm aware that in FrameMaker we can search for Unresolved Cross-references and fix them, but is there such feature in Acrobat?
Any suggestions on this would be highly appreciated.
Thanks.There's nothing in Acrobat itself, but there are 3rd-party program plug-ins that do the job. I use 'Autobookmark' (http://www.evermap.com/autobookmark.asp) which does a very good job of finding and marking broken links and allows keyboard-entry editing without having to re-browse the link if you already know the correct path. It also facilitates a lot of other useful functions that Acrobat makes rather tedious (like changing the zoom setting on all links or bookmarks).
-
dear all,
please give me some steps to creating and implementation of Surrogate keys in ODI .
thanks in advance
sriHi 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 to undo a key mapping?
My daughter's 15" Macbook Pro has a strange key mapping to "Shift-C". It won't show the letter "C" but will show "c" (lowercase) and if you hit the caps lock, you can then press "c" and have an uppercase "C" appear... but not with Shift-C. I've looked through the System Preferences for the Keyboard and "Language & Text" but not found any entries that show "Shift-C". I rebooted (good 'ole reboot) but that didn't work either.
Anyone have any suggestions?
ThanksDid you try to start with shift (Start Items are disabled). Or create a new account, switch to it and see whether the problem persists. This is an indicator, whether this problem is due to a software conflict.
Try to start the keyboard viewer. If you don't find it, enter the following command into the Terminal and hit <enter>
open -a KeyboardViewer
and see whether the Shift-C is wrong.
marek -
Key mapping during the transportation (lookup tables)
Hello,
For look up tables with key mapping during the transportation from DEV-> QA -> Prod it is asked to copy development repository with "out master data" How can we do it? and also how are workflows and matching stragetits transported ?
ThanksHi
For look up tables with key mapping during the transportation from DEV-> QA -> Prod it is asked to copy development repository with "out master data" How can we do it? and also how are workflows and matching stragetits transported ?
When we are moving from dev to QA to prod normally the remote system to which MDM is interacting also moves to similar environments. In different environments the reference table data may not match and hence it is advised not to move with same data. You can do this by simply exporting the schema of the repository from dev to QA and so on. That is create a new repository in QA and Prod by using option of "Export from Schema".
Matching strategies and workflows are not supported in this schema transport for MDM 5.5
These has to be created manually once the repository has been created.
Good news is MDM 7.1 supports this.
regards
Ravi -
How about use partial key to loop at a hashed table?
Such as I want to loop a Internal table of BSID according to BKPF.
data itab_bsid type hashed table of BSID with unique key bukrs belnr gjahr buzid.
Loop at itab_bsid where bukrs = wa_bkpf-bukrs
and belnr = wa_bkpf-belnr
and gjahr = wa_bkpf-gjahr.
endloop.
I know if you use all key to access this hashed table ,it is certainly quick, and my question is when i use partial key of this internal hashed table to loop it, how about its performance.
Another question is in this case(BSID have many many record) , Sorted table and Hashed table , Which is better in performance.You can't cast b/w data reference which l_tax is and object reference which l_o_tax_code is.
osref is a generic object type and you store a reference to some object in it, right? So the question is: what kind of object you store there? Please note - this must be an object reference , not data reference .
i.e
"here goes some class
class zcl_spfli definition.
endclass.
class zcl_spfli implementation.
endclass.
"here is an OBJECT REFERENCE for it, (so I refer to a class) i.e persistent object to table SPFLI
data oref_spfli type ref to zcl_spfli.
"but here I have a DATA REFERENCE (so I refer to some data object) i.e DDIC structure SPFLI
data dref_spfli type ref to spfli.
So my OSREF can hold only oref_spfli but it not intended for dref_spfli . That's why you get this syntax error. Once you have stored reference to zcl_spfli in osref then you will be able to dereference it and access this object's attributes.
data: osref type osref.
create object osref_spfli.
osref = osref_spfli.
"now osref holds reference to object, you can deference it
oref_spfli ?= osref.
osref_spfli->some_attribute = ....
OSREFTAB is just a table whose line is of type OSREF (so can hold multiple object references - one in each line).
Regards
Marcin
Maybe you are looking for
-
Unable to complete download for iTunes 10.6.1
I updated to 10.6.1 and suddenly it took 15 hours to download a TV show to my desktop! Now not even apps download (error 3253) so I uninstalled iTunes and tried to install a fresh download and got a further surprise " this download cannot be read(no
-
How do I transfer TV shows I purchased on my Apple TV to my computer?
-
Connection Error in Browser, Not in Terminal
Hi all. Using PHP 5 to connect to an oracle XE 10G database using the OCI-8 module. I'm using the following code to connect (login credentials have been changed): <code> $conn = oci_connect("user", "pass", "DB"); \\ if (!$conn) { bq. print("Failed");
-
Text missing in BA00 output for languages FR and IT
Hello Friends, We have configured the output type BA00 for the languages FR (French) and IT (Italian) and it is working fine. But while taking the print out for the BA00 we found some characters like à, 'ê, are not printed on the print out. Say for
-
Is it possible to play BF3 in macbook MC700LL/A (13 inch i5 intel 3000)
is it possible to play BF3 in macbook MC700LL/A (13 inch i5 intel 3000)