SSIS newbie easy data type question

  • I apalogize this may seem like a repost, but I was to ask in a broader way. In the tasks, derived column and conditional split, I always get hung on errors like "data type needs to be DT_whatever" sometimes it tells me to cast sometimes just the error. I have used the data conversion step to change to the data type SSIS wants and still get similiar errors. AM I the only one who struggles with this. I have googled this till fingers blue. I am sure the answer is easy, I just can't see the forest through the trees.

  • Sometime the easiest thing to do is delete the pipeline between the components and reconnect them or delete the one complaining and rebuild it.

    It doesn't do a lot of implicit conversions and wants the types in the format it wants. That just is SSIS..

    CEWII

  • Thanks, I will try that. So its not me, its SSIS.

    so as a whole, do SSIS users like SSIS ?

    I want to think so, I am excited to master it for my job and my personal skillset. But its a bumby road so far.Or maybe I am the bumpy road! haha!

    There is this very important project at work that would really make me shine if I can learn the hurdles SSIS and start getting something done.

  • If you are using a Data Conversion transformation in SSIS, a new column is created. So if you have a "col1" which is a non-unicode string (DT__STR), and you are using a Data Conversion Transformation to convert it into Unicode (DT_WSTR), a new column called "Copy of col1" by default will be created, but you can call it whatever you want. You will now have 2 columns, 1 non-unicode and 1 unicode. In the tranformations further down the data flow, you would have to choose the "Copy of col1" in order to use the unicode column.

    Additionally, if you no longer need the non-unicode column you can drop it using a Union All transformation.

    On a side note, if your source is a database, you would be better off using a query instead of a table as a source and casting to the data types you need there. By doing this, you can reduce the conversions you have to do in a dataflow task.

    This will also ensure you are only selecting the rows and columns into memory that you need, and that they already have the proper datatypes. The smaller your rows are, the faster your package will perform.

  • adam spencer (9/10/2009)


    Thanks, I will try that. So its not me, its SSIS.

    so as a whole, do SSIS users like SSIS ?

    I want to think so, I am excited to master it for my job and my personal skillset. But its a bumby road so far.Or maybe I am the bumpy road! haha!

    When I was learning SSIS, data types and conversion were the biggest obstacles for me. There were times when it seemed that no matter what I tried, it just wasn't working. But once you get the hang of it and understand what SSIS is trying to do, creating data flows will be a breeze.

    SSIS is a great tool and a great skill to have. Once you understand what it's capable of, you'll find its application to be quite vast. I am one of those who has looked like a superstar at work by using SSIS packages to do work that was either previously impossible or done manually.

  • Thanks u all for your steps and encouragement!

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply