INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

How to make SSIS packages automatically read the input file from a path?

How to make SSIS packages automatically read the input file from a path?

(OP)
Currently I am using a SSIS package to read data from a .dat file and load it into SQL Server tables.

I am placing the input .dat file on the desktop. In the connection manager -> Browse option, I am pointing this file to create connection.

The file naming convention is like - aSNAP_Data_20140926_P-2014-09-26_07.02.36

However, I need the SSIS package to automatically read the input file from a folder which is located in a remote server. This folder has lots of files where input files are added on a daily basis with the date value in the file name as mentioned above.

I want to schedule the SSIS package to run daily and take the latest file in the folder based on the date.

Please let me know how to do it. Any help would be highly appreciated.....

Thanks in advance.

RE: How to make SSIS packages automatically read the input file from a path?

this is what you need
1. create variable from file name.
2. create script task to read directory where file located and find file name you need and assign to your variable from 1
(on c# or vb)
3. with file connection manager selected open properties panel/Expressions and add expression to combine pass to source file folder with filename from variable from 1

RE: How to make SSIS packages automatically read the input file from a path?

(OP)
Hello gk53,

Thanks for the heads up. However, I have no idea as to how to start doing it. I mean like, where to create a variable?, using what (tool/editor/etc)?, etc

Could you please have some patience and let me know the steps to do it?

Thank you.

RE: How to make SSIS packages automatically read the input file from a path?

to create a variable click SSIS/variables on top menu
it will open variables window on top of that window "add variable" button

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close