ssis中出现原始目的地的动态文件名错误



Am使用少量变量将csv文件值加载到原始目标,并使用相同的变量从原始源加载到oledb目标。

变量列表

 1. CurrentFileName--> FX Accrued Income_20120111_161019.CSV     
2. FilenamePrefix--> it has expression ( ((DT_STR, 4, 1252)DATEPART("yyyy", (DT_DATE) @[User::AsOfDate] ) + RIGHT("0" + (DT_STR, 2, 1252)DATEPART("mm", (DT_DATE)@[User::AsOfDate]), 2) + RIGHT("0" + (DT_STR, 2, 1252)DATEPART("dd", (DT_DATE)@[User::AsOfDate]) ,2))  )    
3. AsOfDate--> 01/20/2012    
4. Sample Output --> C:satishNew Folder     
5. stagingouputpath-->  it has expression ((RIGHT( @[User::sampleoutput] ,1) == "\" ? @[User::sampleoutput] : @[User::sampleoutput] + "\")  + SUBSTRING( @[User::CurrentFileName] ,1, FINDSTRING( @[User::CurrentFileName],".", 1) ) + "RAW"    )   

现在在原始目的地--->我已经给出了访问模式,从变量和变量名称作为stagingoutputpath

<b> raw destination   
acess mode--> from variable  
filename--> stagingouputpath  
write option--> create always </b>

下一级,我需要使用这个outputdestination作为原始源的输入变量,并将其加载到sqldestination中。。

destinaton table contains fields like  
report_dir, reportpatternname, processtype,
now i need to insert this raw source file name to reportpatternnname   
example   
reportdir--C:satishNew Folder  
reportname--FX Accrued Income

在目标表中

SSIS正在报告但您没有在问题中说明的错误是,步骤2失败,因为它是无效的原始文件/不存在。这是有意义的,因为该文件不存在,并且在运行包之前不会存在。我认为,由于您之前的问题要求使用您熟悉的原始文件。

  • http://www.jasonstrate.com/2011/01/31-days-of-ssis-raw-files-are-awesome-131/

运行初始化原始文件步骤,然后下一个数据流应该可以工作了。您可能希望将延迟验证设置为true。

最新更新