ODBC Source - Browse file for SQL - Dynamic

Gopinath Desai 46 Reputation points
2021-01-24T00:27:16.167+00:00

Hi All,
In a ODBC source we have option to pass the query from file (Browse option) which static .But i want to make dynamic.
Meaning i want to generate a file every day with time stamp and use that exact file with time stamp as passing query into ODBC source.
Attached the snapshot plz check.

Hope you understand my question.

59854-odbc-browse.png

SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,468 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Monalv-MSFT 5,896 Reputation points
    2021-01-25T06:58:23.647+00:00

    Hi @Gopinath Desai ,

    1.Please check the file directory in your ODBC data source;
    2.Use Foreach Loop Container to foreach files in the directory;
    3.Drag a Data Flow Task in Foreach Loop and then drag ODBC source in DFT.
    4.Specify expression for ODBC Sql Command in the properties of DFT.

    Please refer to the following pictures:
    60124-odbcdatasource-directory.png
    60115-flc-collection.png
    60039-flc-variablemappings.png
    60040-df.png
    60151-odbcsource.png
    60116-cf.png
    60095-specifyexpression-odbcsqlcommand.png

    Best Regards,
    Mona


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread. 7: https://learn.microsoft.com/en-us/answers/articles/67444/email-notifications.html