SCD2 mapping following the "scdwhitepaper", but my sequences are skipping
All,
I have created a mapping that follows the guidelines set in Oracle's "scdwhitepaper"
http://www.oracle.com/technology/sample_code/products/warehouse/files/SCDWhitePaper.zip
I have got the mapping to work but I am experiencing a problem where my Surrogate IDs, which are populated by a Sequence, are skipping. I would like the IDs to be sequential like 1,2,3,4,5 etc. But instead I get 1,2,3,4,8,12,etc.
I look at the generated code and here is the relevant part:
WHEN NOT MATCHED THEN
INSERT
("DIM_PROD_TEST"."TGT_OWB_SURROGATE_ID",
"DIM_PROD_TEST"."TGT_OWB_BUSINESS_ID",
"DIM_PROD_TEST"."TGT_PRODUCT_CODE",
"DIM_PROD_TEST"."TGT_PRODUCT_TYPE",
"DIM_PROD_TEST"."TGT_EFFECTIVE_DATE",
"DIM_PROD_TEST"."TGT_EXPIRATION_DATE")
VALUES
("DIM_PROD_TEST_SEQ".NEXTVAL,
"MERGE_SUBQUERY"."EXP_PRODUCT_ID",
"MERGE_SUBQUERY"."EXP_PRODUCT_CODE",
"MERGE_SUBQUERY"."EXP_PRODUCT_TYPE",
"MERGE_SUBQUERY"."EXP_EFFECTIVE_DATE",
"MERGE_SUBQUERY"."EXP_EXPIRATION_DATE")
I suspect Sequences are being generated for all records in the "open set" (inserts and updates of live records), even though I only need Sequences for records which are truly new/inserts.
Anyway ... has anyone experienced this behavior or know how to troubleshoot / fix?
Thanks!
Sammi
Yes, this is because of where the sequence is generated. No, there is no real fix. Well, unless you want to break up the mapping into two completely separate where you first identify all of the inserts and do them, then do all the updates as a totally separate path (or do it in the other order). Of course, then you are trading off efficiency for your sequence. Also, you will have to manage correlated commits or have some other strategy for how you deal with one of the two discrete operations failing.
Or, I suppose you could simply not load the surrogate key in the mapping but do it in a row-level insert trigger. That will definitely impact performance too!
Oracle has never intended sequences to be used to create a dense key. The simple nature of OLTP systems, for example, assumes that sometimes data will be deleted thus putting holes in a sequence even if you had managed to load it perfectly.
Frankly, you should take a hard look at why you think you need a perfect, gap-free surrogate key. In my experience, attempting such a thing is far more trouble than it ever would be worth as ensuring order implies that you are attaching some meaning to the surrogate key, and by definition they are supposed to be meaningless.
Mike
Similar Messages
-
I have a new Macbook Pro. Trying to migrate files etc from my Macbook Air using a Thunderbolt Cable between them.
I follow the directions but the two computers never "discover" each other - using a WiFi connection works but 70 hours is a rough deal.
(Mac OS 10.8.2 on both computers)Are you trying target disk mode?
http://support.apple.com/kb/PH10725
Ciao -
I have a new MacBook Pro and I'm having trouble with some of the Help sections. I want to rearrange the order of my photo's within an Event. I have followed the directions but it will not let me do it, what am I missing? Thanks for any tips.
Are you talking about iPhoto? If you are please post this in the iPhoto forum, thanks!
-
The iPhoto Library Upgrader tool doesn't work. I've downloaded it, and follow the directions, but iPhoto still won't open.
Your Library is damaged.
Option 1
Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Repair Database. If that doesn't help, then try again, this time using Rebuild Database.
If that fails:
Option 2
Download iPhoto Library Manager and use its rebuild function. (In early versions of Library Manager it's the File -> Rebuild command. In later versions it's under the Library menu.)
This will create an entirely new library. It will then copy (or try to) your photos and all the associated metadata and versions to this new Library, and arrange it as close as it can to what you had in the damaged Library. It does this based on information it finds in the iPhoto sharing mechanism - but that means that things not shared won't be there, so no slideshows, books or calendars, for instance - but it should get all your events, albums and keywords, faces and places back.
Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.
As for goign back: do you have an undamaged library?
Regards
TD -
my ipod is not reconised. i followed the instructions but it didn't work . what do i do now?
No
Read the user manual and the video tutorial on how to "restore" an iPod - iPod Manuals
and iPod Tutorials -
I have successfully deauthorised my old computer but a unable to authorise my new machine. I have followed the instructions but there is no option on the store menu to 'Authorise this computer'. Please help!
There's a couple of ways to get through to the authorisation controls in the 11.0.x versions.
The control is still in the Store menu, but first (if you're using iTunes versions 11.0.x) you might need to bring up the menu bar to see the Store menu.
If you're using 11.0.x, click on the wee boxy icon up in the top-left corner of your iTunes to see the "Show Menu Bar" control, as per the following screenshot:
Then you'll find the control in the Store menu:
Alternatively, if you don't want to bring up the menu bar, it's still possible to get into the authorise controls via nested menus accessible from the wee boxy icon. Here's a screenshot of where to find them: -
I purchased a sony 3d monitor and I am using it for my external display with my macbook pro. We have followed the instructions but no display!!?? What do I do now
We need more information if members of the forum are going to assist you.
What instructions did you follow?
How are you connecting your MBP to the Sony TV?
Which model MBP do you have? -
I followed the instructions, but once I turn on "Home Sharing", the word "Shared" disappears from the left hand column of the iTunes window. So, where can I link to my other computer so I can share my music??
Make sure that the iTunes version is updated on your computers that you are using for Home Sharing. Also, I think that all of the computers have to be on with iTunes pulled up while you are trying to transfer data.
You have to have Home Sharing turned on with both computers. If you do have Home Sharing turned on with all of your computers, are your 'Shared' computers all authorized under the same account? If not, they should be.
Have you checked 'Share my library on my local network' in preferences? You should have the box checked for both computers.
I hope this helps! -
i want to change my password, somebody is using my ID,i follow the rules but unfortunatly i forgot the answer of safety question what can i do?
i recieve a mail form apple team showing reset password link but its not openingI rang Apple and they could noy help me.
They are often pretty impatient with these questions.
You will need to contact iTunes Support for this. Be prepared to supply the answers that you do know, plus some additional personal information that only you will know.
Start here: https://expresslane.apple.com/
Click iTunes > iTunes Store > Other iTunes topics and questions. Eventually you get to a point at which you can compose a thoughtfully worded email. Apple will respond via email within a day. Be sure to check your spam folder for this reply.
Normal business hours apply, so you may have to wait until Monday. They will ask you for more personal information, and then you will have to wait for another reply which will provide instructions for resetting your password as well as answers to the security questions. Good luck! -
I want to cancel the creative cloud membership
and I follow the instruction but I didn't see the "cancel plan" option in my page. Pls help!! Thank you!Dear John T Smith,
Thank you but still , I can't find the ""cancel plan"" option in my Chinese
language edition page.
And I try to enter my account from English edition but it will transfer to
the Chinese edition page directly.
Pleas help :(((
Thank you so much!!
Cheers,
Alma Hsu
2014-08-03 21:58 GMT+08:00 John T Smith <[email protected]>:
I want to cancel the creative cloud membership and I follow the
instruction but I didn't see the "cancel plan" option. Pls help!! Thank
you! created by John T Smith
<https://forums.adobe.com/people/JohnTSmith> in Adobe Creative Cloud
- View the full discussion
<https://forums.adobe.com/message/6607924#6607924> -
Opened Safari and it has an open window that says "Congratulations you are the winner for April 11th. Please select your prize and enter your email" I did not follow the link but I can't quit safari. Can't shut down either Safari stops my request. How do I get Safari to be normal again?
Opened Safari and it has an open window that says "Congratulations you are the winner for April 11th. Please select your prize and enter your email" I did not follow the link but I can't quit safari. Can't shut down either Safari stops my request. How do I get Safari to be normal again?
-
Have followed the steps but still could not convert my Pdf to Word
Have followed the steps but still could not convert Pdf to Word
You need to update it from iTunes on a computer.
(73555) -
HT201269 I followed the steps But I did not get back all the aps?
I followed the steps But I did not get back all the aps?
Apps have never been included in the backup of the device.
Are the apps in the iTunes library on your computer? iTunes can only sync apps to a device that are in the iTunes library. -
Hello,I have downloaded photos from my ipod touch following the instructions but it doesn't download videos.Can you help please?
doesn't download videos
I seen so many of these post for windows users.
Try my little "trick" (must be running iOS 4.3 or better)
Download the app "Download Manager Lite" (FREE) or "Download Manager" Full ($ 1.99 USD)
After downloading, transfer it to iTunes
iTunes Store: Transferring purchases from your iOS device or iPod to a computer
After transferring, Go to your iDevice (on itunes), to the apps page, scroll down, you can add/save videos and/or files.
Click on "Add", find the folder of which your movies are being downloaded. Its much faster than syncing from itunes.
You can do the wi-fi transfer, the best part is that you don't have to be connected to the same wi-fi.
You will get 2 different URLs you need to type on your computer. Type the Web URL not the ftp URL. After that, you should have access to the app, without the need of itunes.
Click on Add, find the folder of where your movies are stored, faster than syncing with iTunes.
HOPE THIS HELPS. -
HELP ! why doesn't color picker select specific color ? i make secondary layer and use the tool but no colors are selected and the gray out menu shows nothing !
what am i missing ??!!Please add you system info and SpeedGrade version and build number if you actually want help.
Maybe you are looking for
-
Hi there I just upgrade to 10.8.5 (from snow leopard on an '08 iMac 2.4 GHz Intel Core 2 Duo with 4 GB memory) and I have a problem with Mail While during migration there was no problem and it looks like all my massages was transferred (more than 17.
-
Options to control display performance of CLOBs, etc. in Query Result view?
Whenever I attempt to query a table that contains LOBs (e.g. a CLOB or XMLTYPE), the lack of performance pretty much makes the "Query Result" view (from F9) unusable. Any time I attempt to scroll the results, SQL developer apparently continues to que
-
Hi everyone, We use Pay Scale Group and PS Level in our company (values are defaulted in IT0008); Sometimes we need to add new pay scale groups and levels, that is done in customizing client and transported to productive system using transport reques
-
Can i install mychat app in two ipad, which share same apple ID?
should be OK.
-
SUS Updates all error with NSURLErrorDomain error -1100
Hi My 10.8.1 server ran out of space for updates so I switched the storage to a different volume. Then the NSURLErrorDomain error -1100 errors starated appearing. Thinking it was a problem with my server I reinstalled it and upgraded to 10.8.2. I