Need help regarding ssis dataflow task
I need to create a ssis package. I want to import the data from a flat file to a table.
Lets say, the table has 5 columns -- col1, col2, col3, col4 , col5.(Assume that all columns can be NULLABLE) The datafile contains the data related to only three columns say col1, col2, col3. So when I use dataflow task to import the data from the file to the table, I will only get three columns, col1, col2, col3. Columns col4, col5 will be NULL.
However, I want to populate columns col4, col5 with some values which are stored in the variable.
IS there any way to do this?
Any help would be appreciated.
Thanks
vjai wrote:
Need help regarding ssis dataflow task
I need to create a ssis package. I want to import the data from a flat file to a table.
Lets say, the table has 5 columns -- col1, col2, col3, col4 , col5.(Assume that all columns can be NULLABLE) The datafile contains the data related to only three columns say col1, col2, col3. So when I use dataflow task to import the data from the file to the table, I will only get three columns, col1, col2, col3. Columns col4, col5 will be NULL.
However, I want to populate columns col4, col5 with some values which are stored in the variable.IS there any way to do this?
Any help would be appreciated.
Thanks
What variable?
-Jamie
|||
Nullable flat file columns is a bit of a strange one, how do you tell the difference between null and an empty string? Having no column is not a valid way to represent null, that is an invalid file format! I suspect what you are asking cannot be done, certainly not if the format of the file changes.
if the format is static, but sometimes values are empty then you could use a Derived Column transform to test for this and substitute a variable value in place.
|||hi Vijai
You can do this!! and its very simple
Steps
I assume that u have a source with 3 cols.
Now add a drived column transformation task create two new columns and in expression give corresponding variable .
Now if ur output will have 5 columns, 3 from ur source and 2 new columns having values from the variables.Do the necessary mapping with destination.
Thanks and Regards
Rahul Kumar, Software Engineer, India
No comments:
Post a Comment