Flat File Destination Data Flow Component

  • I am trying to set the value of the custom property header. The documentation states that you can use variables and expressions to set the value. I have not been able to do it and was wondering if someone else has had any luck. I hope we are not in the same situation as with SQL 2000 when it comes to writing a header record.

  • They did a good job hiding this one!

    If you look at the Properties window of the Data Flow -- not the flat file destination -- you will see the "Expressions" property. Click the ellipsis button to open a window where you can choose a property ([Flat File Destination.Header]) and set it equal to a variable or expression.

    Aunt Kathi Data Platform MVP
    Author of Expert T-SQL Window Functions
    Simple-Talk Editor

  • I finally found it. Great. Thanks. I had posted a post to the MSDN feed back and they kept telling me the same thing. I was playing around with their sample package Calculated Columns, and the property from the flat file destination was not showing up. Last night I decided to drag out another flat file destination and took another look and it was there. Who knows.. unless the sample package was created with a prior release that did not have that functionality.

     

    Thanks again for replying.

     

  • So you were having trouble finding the actual property? That I found pretty quickly in the Sept. CTP. You're right it might not be there in a previous release. I thought your question was how to set the property with a variable or expression.

    So, for anyone with this same problem, you can hardcode the value by double-clicking the flat file destination component. But to set the value using an expression (for example using the current date) look at the expressions property of the data flow object.

    Aunt Kathi Data Platform MVP
    Author of Expert T-SQL Window Functions
    Simple-Talk Editor

  • No you were right to begin with, the property was not showing up in the expression property editor list of properties. It was there back on the flat file destination property list but not in the expression property editor list. That was untill I dragged the new one out, then it showed up in the expression property editor list. So their sample might have been from a prior build, that they've included in the Sept CTP.

    Thanks again

     

  • Yah, I was the one that kept telling you it was there.

    It all come clear to me now that there is a bit more context.

    The reason it wasn't showing up with older packages is because it wasn't in older versions. The sample was written with an older version before the feature was available. Pipeline components add their properties and they are persisted and depersisted by the pipeline. Since it wasn't added before, it wasn't available to the pipeline to depersist.

    Thanks,

    K

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

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