Use a variable for a file connection manager

  • How do I tell a file connection manager that the file in question is not a static name and will change daily?

    I have a string variable that builds the daily expected filename but can't see how to use this.

    SSDT wants me to enter the name of an existing file... which I can do as a placeholder but will need to overwrite at run time

     

  • You would set the expression of the FileName property or the ConnectionString property which ever you are building to be that of the parameter either at package or project level depending where the parameter is defined.

    As you say it will need to be a static file initially to build the validation and workflow correctly, but at runtime it will execute dynamically and build and swap in the required value.

  • Assuming, this question is regarding SSIS, you can follow below steps -

    1.      Right click file connection Manager and select Properties. Alternatively, you can select file connection manager and press F4.

    2.      Select browse button (three dots) against “Expressions” property.

    3.      Select “ConnectionString” under Property and click on browse button, it will open expression builder.

    4.      In the Expression box, drag the variable which contains complete file path.

    Anand

  • Hi, Thank you Anand929.

    can you send me any tutorials for understanding  SSIS. black friday vpn deals

    • This reply was modified 5 months, 3 weeks ago by  adamedge.

    I am a designer.

  • adamedge wrote:

    Hi, Thank you Anand929.

    can you send me any tutorials for understanding  SSIS.

    You could try this.

    If the answer to your question can be found with a brief Google search, please perform the search yourself, rather than expecting one of the SSC members to do it for you.
    See https://www.sqlservercentral.com/articles/forum-etiquette-how-to-post-datacode-on-a-forum-to-get-the-best-help/ for details of how to post T-SQL code-related questions.

  • Perfect thanks anthony.green and anand929

  • adamedge wrote:

    Hi, Thank you Anand929.

    can you send me any tutorials for understanding  SSIS.

    Hi Adamedge, Thanks for asking. There are many good tutorials available for SSIS. One of them shared by Phil Parklin. I also like and many times refer - https://www.tutorialgateway.org. Hope that helps.

    Anand

Viewing 7 posts - 1 through 7 (of 7 total)

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