Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
SQL Server 2017 Integration Services Cookbook

You're reading from  SQL Server 2017 Integration Services Cookbook

Product type Book
Published in Jun 2017
Publisher Packt
ISBN-13 9781786461827
Pages 558 pages
Edition 1st Edition
Languages
Authors (6):
Christian Cote Christian Cote
Profile icon Christian Cote
Dejan Sarka Dejan Sarka
Profile icon Dejan Sarka
David Peter Hansen David Peter Hansen
Profile icon David Peter Hansen
Matija Lah Matija Lah
Profile icon Matija Lah
Samuel Lester Samuel Lester
Profile icon Samuel Lester
Christo Olivier Christo Olivier
Profile icon Christo Olivier
View More author details
Toc

Table of Contents (18) Chapters close

Title Page
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Customer Feedback
Preface
1. SSIS Setup 2. What Is New in SSIS 2016 3. Key Components of a Modern ETL Solution 4. Data Warehouse Loading Techniques 5. Dealing with Data Quality 6. SSIS Performance and Scalability 7. Unleash the Power of SSIS Script Task and Component 8. SSIS and Advanced Analytics 9. On-Premises and Azure Big Data Integration 10. Extending SSIS Custom Tasks and Transformations 11. Scale Out with SSIS 2017

Execute complex filesystem operations with the Script task


In the previous recipe, you retrieved filenames filtered by name and extension using the Foreach File enumerator of the Foreach Loop container. Sometimes you need more precise filters. For example, you might need to retrieve files with a larger size than a predefined value. You can get the collection of the filenames that satisfy your custom criteria with the Script task.

Getting ready

There are no special prerequisites for this recipe, except, of course, SSIS 2016. In addition, you can use either your own text files for testing, or the three text files provided with the code for this chapter (Ch07_03.txt, Ch07_08.txt, and Ch07_10.txt). Note that the length of the Ch07_03.txt file is 3 bytes, the Ch07_08.txt file is 8 bytes, and the Ch07_10.txt file is 10 bytes.

How to do it...

  1. In File Explorer, right-click the Ch07_08.txt file and select Properties, as shown in the following screenshot:

  1. Note the file size, 8 bytes. Click OK.
  2. In SSDT...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime