• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 383
  • Last Modified:

dynamic change the IIS Flat file connection manager property

Hello experts,
I am setting up a package to impoert text files into db, the file name was changing according to date, today's file name is AMD20081116.txt and tommorrow's file name would be AMD20081117.txt. I think I need to use expression for the connection manager property but could not find where to configure it. Or should I use a script task for this purpose? any sample I can use? Thanks for your help.
I used to accomplish this through DTS dynamic property for the datasource, can not figure out how to do it in SSIS.
0
tomcattyy
Asked:
tomcattyy
  • 7
  • 4
1 Solution
 
PedroCGDCommented:
dear Friend,
I made a SSIS project for you.
Create a new project, add the attached packaged, update the SSIS Variable with the path of the textfile folder, and see the results.
Helped?
regards!

Pedro
www.pedrocgd.blogspot.com
Package-EE48-dtsx.txt
SSISExpression.JPG
SSISExpression0.JPG
AMD20081117.txt
AMD20081118.txt
0
 
HoggZillaCommented:
Is it possible you could have more than one file? Possible that you are processing mulitiple days of files on a single day?
If so, use a Foreach Loop Container and look for files to process.
0
 
tomcattyyAuthor Commented:
Thanks guys for quick response. thanks Pedro for complete pkg, I won't have to process multiple day files in a day, however I have files like Intel20081117.txt , Cisco20081117.txt  as well as AMD20081117.txt . They have the same format. Can I use a union all component to import them first then into the db?
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
PedroCGDCommented:
Hi Tom,
You can do a Union to get data from several sources. But you do it better using a pre-defined list (AMD, CISCO, INTEL, MSFT...) that generate files with the format based on current date.
what you do in each file?

Can I know what you are doing with these stock data? :-) I'm doing my master dissertation on DataMining and StockMarkets...
Regards!
Pedro
0
 
tomcattyyAuthor Commented:
Hello Pedro, I am importing data from different source for threshold stock files. They come from NYSD, Nasdaq, AMX ... etc
After importing, these list will be used to check against customer positions and raise warning.
I am now ok with the union all, What is that pre-dedine list you mentioned? Thanks
0
 
PedroCGDCommented:
ok... just a moment, that I will made the project for you... is more easy to explain

Do you have interestrates and commodities historical prices? and Gold andn Brent?
Regards!
0
 
PedroCGDCommented:
Ok Tom,
Check the attached packaged and image.
Update excel connection and SSIS variables paths.
Helped?
Regards!
Pedro
Package-EE48b-dtsx.txt
SSIS-Progress.JPG
0
 
PedroCGDCommented:
Sorry, I forgot the excel file... here you have!
regards!
Pedro
TICKET-LIST.xls
0
 
tomcattyyAuthor Commented:
Thanks Pedro for all you did. The company I woked for only deal with back end stock transaction, so I have historial stock price but no what so ever, There is a site provide web service for such data, they have a free trial period, you can check it out. xignite.com
I will accept the answer now, if anything I can help please email me tomcattyy at msn dot com
0
 
PedroCGDCommented:
Thanks Tom!!!
You cen visit me in my blog, and see my email on my profile.
If you have some doubts tell me!
Regards!
0
 
tomcattyyAuthor Commented:
Thanks Pedro,

You are one intelligent guru.

Regards
0
 
PedroCGDCommented:
Thanks a lot Tom!!!
You are welcome to my blog and to send me emails!
regards!
Pedro
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

  • 7
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now