October 13, 2010 at 1:18 pm
Hello all,
i have a staging table loaded from a flatfile source. This works well. The problem I run into is to split the data over two tables (problem of some more people 😉 ) I can make the selection on the columnnames cause they are different, but I don;t know how. With columnnames I mean the columnnames of the columns in the stagingtable. Does anyone know how to achieve this? an expresion based on the columnname?
Furthermore I want to keep a relation between the sepearated record, I think a kind of 'join" table should be made, but i am not sure how to implement this, any tips are more than welcome.
Thanks,
Peter
October 13, 2010 at 2:26 pm
Soulfly73 (10/13/2010)
I can make the selection on the columnnames cause they are different, but I don;t know how. With columnnames I mean the columnnames of the columns in the stagingtable. Does anyone know how to achieve this? an expresion based on the columnname?
Peter,
Can you clarify what you're looking for here a little more? I'm afraid I'm just not understanding what you're trying to get to.
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
October 13, 2010 at 2:34 pm
Hello Graig,
Sorry if i didn't made myself clear. I try to explain a little more and better 😉
I have a flatfile import
this import goes into the table 'staging'
The columnnames in this table are:
cust_name fot customersnames
cust_adres for customeradres
cust_zip for customers zipcodes
and so on
Then i have, in the same tables
prod_name for productsnames
prod_weight for the weight of the product
and so on.
Now I want to split the data over two tables customers and product, this could be done (i hope) on base of the columnnames, all the data in the columns with prod_ in the lead should be going to de products table, als the data in the columns with cust_ in the lead should go to the customers table.
Then a third table should havr the relation between them, so product X belongs to customer X, and so on.
I hope you understand my problem?
Thank you,
regards,
Peter
October 13, 2010 at 2:52 pm
First, I would do is add a multicast component after my data source. You can use one output per destination from this component, so you can send any column to any destination you want. Configure each destination to only include the columns you want.
In each output from the multicast, if required, add a conditional split component if you want to filter which rows go to which destination.
For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]
October 13, 2010 at 2:55 pm
Hi alvin, sounds like it's going to be a bit towards the solution of my problem 🙂 I will try it immediately..
thank you,
Peter
October 13, 2010 at 3:54 pm
Hi Alvin,
I have implemented a multicast, but the strangest thing happens.
I have PK in the destination table, I have cleand the input from double data, but yet still (after running the package) it says that it are all primary key constraint violations. Checked the destination table and it is al empty.. any idea what this could be?>
October 13, 2010 at 4:00 pm
Soulfly73 (10/13/2010)
Hi Alvin,I have implemented a multicast, but the strangest thing happens.
I have PK in the destination table, I have cleand the input from double data, but yet still (after running the package) it says that it are all primary key constraint violations. Checked the destination table and it is al empty.. any idea what this could be?>
There's duplicates, based on PK values, in your data. If there's no duplicates in the source data then you're creating duplicates in the data flow.
For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]
Viewing 7 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply