简体   繁体   English

如何在论文中理解表达逻辑

[英]how to make sense of expression logic in ssis

I am working on a SSIS project that involves unzipping a folder which when extracted contains multiple text files in the same directory using a ForEachLoop Container. 我正在研究一个SSIS项目,该项目涉及解压缩一个文件夹,该文件夹在使用ForEachLoop容器提取时在同一目录中包含多个文本文件。 each file will have a different Name. 每个文件将具有不同的名称。

I have two variables of which variable 2 has an expression 我有两个变量,其中变量2有一个表达式

Variable 1
name = zipfileName 
Value= sample.zip

variable 2
name = FileName 
value = *.* 
Expression = REPLACE(@[User::ZipFileName],".zip",".txt")

I need clarification concerning the expression part 我需要澄清表达部分

My thinking is that this expression means the name of the zipfile is replaced with .txt extension when extracted? 我的想法是,该表达式意味着提取时将zipfile的名称替换为.txt扩展名? I also would like to know how it dynamically changes fileNames in runtime seeing as there are multiple files 我也想知道它如何在运行时动态更改文件名,因为有多个文件

thanks 谢谢

From what I can see, the Expression is replacing .zip for .txt in [User::ZipFileName] 从我所看到的, Expression正在将[User::ZipFileName] .txt替换为.zip

If the value of [User::ZipFileName] is somefile.zip 如果[User::ZipFileName]的值是somefile.zip

the output would be: 输出将是:

somefile.txt

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM