Quantcast
Channel: CodeSection,代码区,SQL Server(mssql)数据库 技术分享 - CodeSec
Viewing all articles
Browse latest Browse all 3160

SSIS Appetizer: Cache Transformation is Raw File

$
0
0

SSIS Appetizer

I'm not sure I have a purpose for this, but did you know that you can use the cache file of the Cache Transformation (introduced in SSIS 2008)as asource file in the Raw File Source.


Demo

For this demo I use two Data Flow Tasks. The first creates the cache file and the second one uses it as a source.


SSIS Appetizer: Cache Transformation is Raw File
Two Data Flow Task
1) Create Cache

The first Data Flow has a random source (a flat file in this case) and a Cache Transformation named "CTR -Create Cache"as a destination. When you create the Cache Connection Manager, make sure to check "Use file cache" to provide a file path for the cache file. Copy the path for the next step.


SSIS Appetizer: Cache Transformation is Raw File
The Cache Transformation and Connection Manager
2) Read Cache

The second Data Flow Task uses a Raw File Source. In the editor you canspecify the location of the Raw File. Paste the path from the Cache Connection Manager (a .caw file). For demonstration purposes I added a dummy Derived Column behind it with a Data Viewer on the path between them. Now run the package a see the result. You will get some hash columns 'for free'.


SSIS Appetizer: Cache Transformation is Raw File
Raw File Source

Please let me know in the commentsif you found a good purpose for this.

Note: you can't use a raw file as a cache file unless you're able to add the extrahash columns as well.


Viewing all articles
Browse latest Browse all 3160

Trending Articles