Uncompress File Task
- 1 Uncompress File Task
Uncompress File Task extracts the contents of a given input compressed file into a specified folder.
The compressed file that will be used in this Tutorial is shown in Figure 1.
Configuring Uncompress File Task
Similarly to adding other SQL Server Integration Services (SSIS) tasks, the Uncompress File Task shown in Figure 2 can be added into the Control Flow pane in the following manner;
- Drag-and-drop the Uncompress File Task into the Control Flow, or
- Double clicking the Uncompress File Task
By default the Uncompress File Task will throw validation errors shown in Figure 3.
To resolve the validation errors, we need to configure the Uncompress File Task by using its editor (Uncompress File Task Editor).
There are two ways of configuring the textbox values in the editor:
Set Absolute Values
Providing absolute values for the two parameters refers to hardcoding the values into the two textboxes typing them in or by clicking the ellipsis buttons (…) to browse for required files/folders, as shown in Figures 5.
Dynamically Set Values using Expressions
Expressions reads data from package variables at runtime. To configure expressions, click the Ex button. This will open up a Choose Variable dialog box. You can then select the variable you want to use and click the OK button.
Once you have clicked the OK button, you will be redirected back to the Uncompress File Task Editor with textboxes set to variable names.
Executing Uncompress File Task
The execution of the Uncompress File Task is usually quick. Similarly to executing other SSIS tasks, the simplest way of executing Uncompress File Task is to right-click your mouse button, navigate to and click Execute Task option as shown in Figure 8.
If the configuration is done correctly, the Uncompress File Task execution should be successful as shown in Figure 9.
Additional Informational Events
As the Uncompress File Task is being executed, it is important to take notes of two additional information events that will appear in the Execution Results tab in the designer. As indicated in Figure 10, these two informational events basically describe the parameter values that are being used in during task execution. This information could be useful during troubleshooting, especially in cases where Expressions are used to set parameter values.
Existing File Error
The execution of Uncompress File Task will fail when the file being uncompressed already exists in target location.