sql - How to create conditional destinations in SSIS Data Flow? -
goal: have db source. depending on variable, need store fixed width file or delimited file.
how do in data flow? tried creating conditional split, 2 conditions. 1 condition going fixed width destination, , 1 delimited condition. problem conditional split executed both conditions if no data comes in 1 condition. becuase filename same, errors out.
i keep solution folowing tweeks.
write out 2 filename-fixed.txt , filename-delim.txt. before steps add row count tasks.
then in control flow have 2 success paths. edit success paths both success , expression. add expression checks count new row count tasks in dataflow. if have file system tasks end point have them rename fixed or delim file correct file name.
note: didn't try , pics have red x's because find helpful have picture figure out logic not because coded solution.
Comments
Post a Comment