April 25, 2013 at 2:39 am
Hi Everyone
I have the below problem,could anyone please suggest me a solution.
file 1 has below data
1.csv
A
B
C
2.csv
E
F
G
the data in the output file should be
A E
B F
C G
the separator in output file can be tab or ,
could any one help?
April 25, 2013 at 6:23 am
avinash.818 (4/25/2013)
Hi EveryoneI have the below problem,could anyone please suggest me a solution.
file 1 has below data
1.csv
A
B
C
2.csv
E
F
G
the data in the output file should be
A E
B F
C G
the separator in output file can be tab or ,
could any one help?
Use a Data Flow task with a MERGE connector to pull the files into the same data stream. Then output to a new file.
That's the best advice I can give you based on the information you've provided.
May 6, 2013 at 12:33 am
Hi Brandie,
If I add a Merge Transform and Pull the Data into Destination,Data from each file Merges as one column in the output,what I need is a separate column for each file
This is my requirement. I have Several files each with One-Column and Several Rows
what I need is all the data is multiple files should go into one file with multiple columns
one column for one file.....can you suggest?
May 6, 2013 at 1:17 am
avinash.818 (5/6/2013)
Hi Brandie,If I add a Merge Transform and Pull the Data into Destination,Data from each file Merges as one column in the output,what I need is a separate column for each file
This is my requirement. I have Several files each with One-Column and Several Rows
what I need is all the data is multiple files should go into one file with multiple columns
one column for one file.....can you suggest?
The problem here is you don't have an ID to join on, so you can't use the MERGE JOIN.
I think you'll need a script component as a transformation, where you read the two inputs and create one output row with two columns.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
May 6, 2013 at 1:56 am
an identity column against each row would serve the purpose.....
you can use merge join then
May 6, 2013 at 5:35 am
Koen Verbeeck (5/6/2013)
avinash.818 (5/6/2013)
Hi Brandie,If I add a Merge Transform and Pull the Data into Destination,Data from each file Merges as one column in the output,what I need is a separate column for each file
This is my requirement. I have Several files each with One-Column and Several Rows
what I need is all the data is multiple files should go into one file with multiple columns
one column for one file.....can you suggest?
The problem here is you don't have an ID to join on, so you can't use the MERGE JOIN.
I think you'll need a script component as a transformation, where you read the two inputs and create one output row with two columns.
EDITING my response because I remembered what I meant originally.
Not a MERGE Transform. I misspoke. It should be a UNION ALL transform.
May 6, 2013 at 6:27 am
Brandie Tarvin (5/6/2013)
Koen Verbeeck (5/6/2013)
avinash.818 (5/6/2013)
Hi Brandie,If I add a Merge Transform and Pull the Data into Destination,Data from each file Merges as one column in the output,what I need is a separate column for each file
This is my requirement. I have Several files each with One-Column and Several Rows
what I need is all the data is multiple files should go into one file with multiple columns
one column for one file.....can you suggest?
The problem here is you don't have an ID to join on, so you can't use the MERGE JOIN.
I think you'll need a script component as a transformation, where you read the two inputs and create one output row with two columns.
EDITING my response because I remembered what I meant originally.
Not a MERGE Transform. I misspoke. It should be a UNION ALL transform.
A UNION ALL is the same as the MERGE transform, but without the sorting.
It unions the data on a row basis, not a column basis (it's the same as in TSQL, you need to have the same columns).
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
May 6, 2013 at 6:29 am
Koen Verbeeck (5/6/2013)
Brandie Tarvin (5/6/2013)
Koen Verbeeck (5/6/2013)
avinash.818 (5/6/2013)
Hi Brandie,If I add a Merge Transform and Pull the Data into Destination,Data from each file Merges as one column in the output,what I need is a separate column for each file
This is my requirement. I have Several files each with One-Column and Several Rows
what I need is all the data is multiple files should go into one file with multiple columns
one column for one file.....can you suggest?
The problem here is you don't have an ID to join on, so you can't use the MERGE JOIN.
I think you'll need a script component as a transformation, where you read the two inputs and create one output row with two columns.
EDITING my response because I remembered what I meant originally.
Not a MERGE Transform. I misspoke. It should be a UNION ALL transform.
A UNION ALL is the same as the MERGE transform, but without the sorting.
It unions the data on a row basis, not a column basis (it's the same as in TSQL, you need to have the same columns).
Given what information the OP gave us, that's what he wants.
May 6, 2013 at 7:41 am
Brandie Tarvin (5/6/2013)
Given what information the OP gave us, that's what he wants.
File 1:
A
B
C
File 2:
E
F
G
Union All gives us:
A
B
C
E
F
G
Merge Join gives us:
A E
B F
C G
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
May 14, 2013 at 5:03 pm
Hi Can you Generate AutoIdentity Number(adding new ID columne/through Script Component) for Each File Seperately.
Then Apply Merge Join , Based on ID Column(this helps Join on RowNumber Position)
example:
File1
Id Col
1 A
2 B
3 C
File 2
Id Col
1 D
2 E
3 F
Merge Join On File1.ID = File2.ID
So Final out put will be
ID File1.Col File2.Col
1 A D
2 B E
3 C F
May 15, 2013 at 12:35 am
AutoGenrating Identity solves,but the data is in Text file and there are around 700 files which needs to be processed
May 15, 2013 at 8:29 am
In several other packages, here's what I did. I had to actually do a Multicast to do derived columns. Then I pulled those columns together with a UNION ALL. The UNION did not require an identity. I know this because I just replicated what I've previously done.
So you should be able to just put the multiple file sources into a Data Flow task and join them together with a UNION ALL. The trick is you need the same # of columns, in that order, and have the same metadata for each column.
Easy Peasy, no identitifier required.
Viewing 12 posts - 1 through 11 (of 11 total)
You must be logged in to reply to this topic. Login to reply