Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SSIS 2012- Pass filename to SSIS Package Expand / Collapse
Author
Message
Posted Tuesday, December 17, 2013 1:02 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Today @ 3:30 AM
Points: 1,059, Visits: 692
Hi,

I have to schedule job as follows.

Step 1. Will trigger a job on another Server by CMD. and generates .dat/.csv file with timestamp.
Step 2. Execute SSIS Package for extracted file in Step1

My question is, i have to pass the file name(created in Step1) to execute the SSIS package.

Thanks,
SP
Post #1523557
Posted Tuesday, December 17, 2013 1:11 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 6:51 AM
Points: 13,252, Visits: 10,135
Can't you put the generated files in specific folder and use a for each loop in the SSIS package to pick up the files?



How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1523559
Posted Tuesday, December 17, 2013 5:04 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Today @ 3:30 AM
Points: 1,059, Visits: 692
Thanks for Info...
But in mycase, the Job generates Single file only as Filename_YYMMDD_HHMMSS.csv

How my SSIS package read this file as YYMMDD_HHMMSS[ This will differ at the time of generatio and at the time of reading by SSIS]......If passing Filename as parameter to SSIS package , i can proceed with implementation.

I am looking for passing Filename as parameter to SSIS Package, based on which SSIS will import data......
Post #1523609
Posted Tuesday, December 17, 2013 5:15 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Today @ 3:30 AM
Points: 1,059, Visits: 692
http://technet.microsoft.com/en-us/library/ff877990.aspx


http://technet.microsoft.com/en-us/library/ff878152.aspx

These helped from executing SSIS with parameter from SSIS Engine.....

Can i use same commands for scheduling in SQL Agent...

Will those "catalog." directly use in Database Engine?
Post #1523612
Posted Tuesday, December 17, 2013 5:29 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 6:51 AM
Points: 13,252, Visits: 10,135
Pulivarthi Sasidhar (12/17/2013)
Thanks for Info...
But in mycase, the Job generates Single file only as Filename_YYMMDD_HHMMSS.csv

How my SSIS package read this file as YYMMDD_HHMMSS[ This will differ at the time of generatio and at the time of reading by SSIS]......If passing Filename as parameter to SSIS package , i can proceed with implementation.

I am looking for passing Filename as parameter to SSIS Package, based on which SSIS will import data......


Use a wildcard in your for each loop: Filename_*.csv




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1523623
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse