December 24, 2001 at 3:44 pm
Okay- here's the deal. I have a database which will use FTP to access and download 5 files a day from a remote server.
Every day the file names will change, as they are named with a convention which uses the date. An example of the five file names from 12/19/01 is:
SUMMARY.2001.12.19.txt
G32.2001.12.19.txt
G31.2001.12.19.txt
G22.2001.12.19.txt
G21.2001.12.19.txt
You can see how the names will change every day.
Does anybody know how to use the Dynamic Properties Task to create a name reference which will pull the appropriate files every day, using wildcards or variables of some sort?
Thanks!
deek
December 24, 2001 at 7:40 pm
A few things. If the first part is sequential, you can store this in a global variable and retrieve it before the task and update it after (2 dyn tasks).
Also you can use a SQL statement in the dynamic properties task to get the date and manipulate it.
Steve Jones
December 26, 2001 at 2:20 pm
The problem I'm having is- How do I specify my manipulated string so that it is recognized as the name of the file that I want to connect to?
December 26, 2001 at 2:32 pm
December 26, 2001 at 2:53 pm
My whole point is that I don't know how to use that task. It's new, and none of my SQL coworkers are familiar with it. I need guidance on how to use it.
December 26, 2001 at 3:06 pm
Ahhh, sorry.
Add the task to your package. Then "set" a new value and you can basically pick any property of the package, including properties of any task already there. Select the property and then you can choose how the value is set in the right pane, from INI, query, etc.
Not sure if you can change a global and then use that to change the ftp task in the same dynamic properties task. I assume it processes top to bottom, but you need to test it.
If not, string 2 dynamic properties tasks together using the workflow, then link the 2nd task to your ftp task.
At home today and have to go, but I'll try to mock something later and post it for you. Ask more questions if you need to, not sure if I'll be here later, but Andy might.
Steve
Steve Jones
December 26, 2001 at 4:02 pm
I appreciate your attention to this matter.
From the start I have been able to get to the point where I pick the source for my dynamic properties task. I have failed in all of my attempts, though, so far, to define any kind of global variable that works to pick my file, and it's definitely because I have no idea how to define this variable in a useful, "dynamic" way. That's what I'm trying to find out.
If you can show me how to do this, then I'd be in business. Thanks, again.
January 2, 2002 at 3:52 pm
I have approached a similar problem differently (due to my lack of knowledge about any other way). I need to get a different file each day to import the correct data into various databases. Each day the date in the filename changes. I created a table called scripts. Each row in the table corresponds to a row in a batch file. The rows are numbered. I then find the file names in the scripts table and change them appropriately (such as if all the file names are based on the date). Then I export the rows (in proper order) into a text file with a .bat extension. Then I execute the batch file. After that the import part of the DTS package begins.
Robert Marda
SQL Programmer
bigdough.com
Robert W. Marda
Billing and OSS Specialist - SQL Programmer
MCL Systems
January 2, 2002 at 4:52 pm
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply