Kimball Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

load a table without unique indentifier

4 posters

Go down

load a table without unique indentifier Empty load a table without unique indentifier

Post  kepb Mon May 30, 2011 6:30 pm

Hi i got a doubt.

i try to load a table to a staging area.

so my problem is that that table doesnt have a primary key if i try to create one put together fields to get a unique identifier i cant either. so i need an advice to know how load that table in order to make incrementals load of it .

thanks
kepb
kepb

Posts : 8
Join date : 2011-05-05
Age : 37
Location : PERU

Back to top Go down

load a table without unique indentifier Empty Re: load a table without unique indentifier

Post  ngalemmo Tue May 31, 2011 9:50 am

Why do you need a primary key?
ngalemmo
ngalemmo

Posts : 3000
Join date : 2009-05-15
Location : Los Angeles

http://aginity.com

Back to top Go down

load a table without unique indentifier Empty LOAD A TABLE WITHOUT UNIQUE INDENTIFIER

Post  kepb Tue May 31, 2011 10:00 am

Hi thanks for answer.

i need a primary key in order to make a incremental load. i work in sql server. so to do incremental load i use the lookup control and it need at least one column to compare the row and determine if the row if already load.

to find out if the row exist i can compare all columns. but is complicated when i try to find the updates load.

or maybe can make it in other way ....

thanks
kepb
kepb

Posts : 8
Join date : 2011-05-05
Age : 37
Location : PERU

Back to top Go down

load a table without unique indentifier Empty Re: load a table without unique indentifier

Post  ngalemmo Tue May 31, 2011 11:51 am

You answered your own question.

If you have nothing from which you can identify two things to compare, you can't very well compare them. This is true in databases and life in general...

You may need to rethink your source or how you load the DW.

ngalemmo
ngalemmo

Posts : 3000
Join date : 2009-05-15
Location : Los Angeles

http://aginity.com

Back to top Go down

load a table without unique indentifier Empty LOAD A TABLE WITHOUT UNIQUE INDENTIFIER

Post  kepb Tue May 31, 2011 11:58 am

Hi yes you right i guess i complicated myseft. now i rethink the problem and figure it out that joining that table whith other (s) i find some kind of relation
thanks your tour time I really appreciate your support
kepb
kepb

Posts : 8
Join date : 2011-05-05
Age : 37
Location : PERU

Back to top Go down

load a table without unique indentifier Empty Re: load a table without unique indentifier

Post  BoxesAndLines Tue May 31, 2011 6:29 pm

Create a check sum based on all of the columns.
BoxesAndLines
BoxesAndLines

Posts : 1212
Join date : 2009-02-03
Location : USA

Back to top Go down

load a table without unique indentifier Empty [quote="BoxesAndLines"]Create a check sum based on all of the columns.[/quote]

Post  kepb Wed Jun 01, 2011 10:40 am

Hi mm but maybe im wrong in that case any change in one row its gonna be identified as a new row?
kepb
kepb

Posts : 8
Join date : 2011-05-05
Age : 37
Location : PERU

Back to top Go down

load a table without unique indentifier Empty Re: load a table without unique indentifier

Post  VHF Wed Jun 01, 2011 11:41 am

You should try to identify a compound primary key--some combination of fields that uniquely identifies a row. Once you can uniquely identify a row, then you can do inserts or updates as needed.

If your incoming data really doesn't have a key--that is, you might get multiple records with the exact same values in every field, and these records represent different events/occurrences--then it is impossible to do updates; you would need to treat each new occurrence of a record as an insert.


VHF

Posts : 236
Join date : 2009-04-28
Location : Wisconsin, US

Back to top Go down

load a table without unique indentifier Empty by VHF on Wed Jun 01, 2011 10:41 am

Post  kepb Wed Jun 01, 2011 6:10 pm

Hi yes i really try to fing a compound primary key but is dificult and i allready thought about threat each occurrence like a new record but i guess is not secure because the table i try to load is about Historical payments. i allready try to valide by dates like.

i run de load today but before delete all records of today. im thinking about it.........
kepb
kepb

Posts : 8
Join date : 2011-05-05
Age : 37
Location : PERU

Back to top Go down

load a table without unique indentifier Empty Re: load a table without unique indentifier

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum