The Transformation and Cleanse tool allows you to manipulate and change data from a table, a data grid, or a SQL query. Transform and Cleanse leaves the source table intact. A sampling of data, 1000 rows or less, displays in the window.
After transforming data, you can export the data as an Excel or .csv file, save it to Local Storage, publish it to Intelligence Central, or send it to Automation. You can also save your work as a Transform and Cleanse document (.tct).
Important: Legacy Transform and Cleanse (.tdc) and Data Browser (.tdb) file formats are no longer supported in Toad Data Point 3.8 or later. Please recreate the content of legacy files using this new Transform and Cleanse tool.
To publish the transformed data to Intelligence Central as a view or snapshot, or to send the underlying query to the Editor, all applied rules must support SQL generation. Currently, SQL generation is supported for Oracle and MySQL connections only.
Note: This feature is available in the Toad Data Point Professional Edition only.
To transform and cleanse data
To send data to the Transform and Cleanse window, do one of the following:
Use the rule editor to define a new rule. Review the following for additional information:
Find and Replace |
Find—Enter or select the value you want to replace.
Case Sensitive—Select to perform a case-sensitive search for the value. Replace—Enter the value you want to use (replacement value). |
Calculated Column |
Build a calculated column in the expression editor. Column Name
Use SQL Transforms
Expression Editor In the expression editor, create the expression to use to calculate the column. Select items in the left pane to display options in the right pane. Double-click an option to add it to the editor. Single-click an operator to add it to the editor. Use the Search box to filter available options. Using Internal Toad Functions in Expression Editor If you create an expression without selecting the Use SQL Transforms option, the following apply:
|
Filter Data |
Tip: To quickly filter a column, click in the row below the column header and enter a value. Create a filter condition by selecting a column, an operator, and a value. See Filter Data in Transform and Cleanse for more in-depth instructions.
Note: Click to the right of a condition statement to add another value to a list of values, for example, when using an operator such as Is any of. Load All Distinct Values—(Enabled for reduced sample sizes) Click to load all distinct values into the drop-down list of values. Preview—Click to preview filtered data in upper pane. Clear—Click to clear the filter and the rule editor. |
Format Data |
(Numeric and datetime columns only) Format—(Numeric) Select a numeric type. Format Options—(Datetime) Select one of the date-only, date/time, or time-only formats. Use English format instead of regional language setting—Select to quickly switch to English format options if you have a non-English regional setting. Custom—(Datetime) Select to create a custom date/time format. Caution: If you apply a Format rule to a numeric or datetime column, the column is converted to a String data type in the transformed data. |
Deduplicate |
Select the column or columns in which to find duplicates. Then for each column, select the method to use to match duplicates. Matching Methods:
Filter To: Select the method of filtering and displaying duplicates.
The Duplicates tab opens after the rule is applied if the Distinct Rows or Unique Rows filtering method is selected. Export Duplicates Separately—Select to export the duplicates when you export the transformed data. Then specify a file for the duplicates. When you click the Export button in the Wizard bar to export the transformed data to a .csv file, the duplicates are saved to the separate .csv file that you specified. |
Trim |
Specify how to trim values. Simplify Consecutive Spaces—Select to convert one or more consecutive Unicode whitespace characters (like tab, carriage return, space) into one ASCII 32 (space) character. Remove Control Characters—Select to remove ASCII control characters 0–31 (non-printing characters). |
Convert Datatype |
Select the data type to which you want to convert the column. Round value to nearest integer instead of truncating—Select to instruct Toad to round values when converting to an integer data type. The Problematic Rows tab opens if the data contains values that could not be converted. The problematic rows display in the tab and the problematic values are set to null in the converted column in the transformed data. |
Group Column |
Use this rule to group rows into categories or ranges using a group column.
|
Rename Column |
Use this rule to rename columns. You can rename one or more columns using a single rule. Enter a new name for each column you want to rename. If SQL generation is supported, the new name is applied as an alias. Tip: Place cursor over column name in grid to display original name. |
Remove Column |
Remove one or more columns from the transformed data set.
The columns you remove are not included in the SQL statement (when SQL generation is supported). |
Split Column |
(String columns only) Split At—Select the method to use to split the column. Select one of the following:
Split Into—(Separator method only) Select the number of new columns to create.
Notes:
|
Extract Date |
(Date/time columns only) Extract the individual date or time components from the date/time field. Extract—Select the components to extract. An individual column is created for each component selected.
Use Descriptive Names Instead of Numeric Values—Select to use names (string values) where possible, for example May instead of 5. Note: Toad uses the same definition for Week of Month as Excel. |
Steps tab. Select the Steps tab to view the list of currently-applied rules. For each rule in the Steps tab, a tool tip displays additional information. Review the following tool tip icons.
Indicates that the rule does not support SQL generation. The rule is shown in blue in the Steps tab. | |
Indicates that the rule produces errors/exceptions in the sample data. The rule is shown in red in the Steps tab. See Exception Handling. |
SQL tab. (Oracle and MySQL only) To review the SQL for all rules, select the SQL tab behind the rule editor (click a rule in Steps tab to display the rule editor). The SQL tab displays the SQL generated for the underlying query and all the applied rules, if all rules support SQL generation.
Rules that do not support SQL generation are shown in blue in the Steps tab for easy identification. This gives you the opportunity to modify or remove the rule if SQL generation is necessary.
Note: Currently, SQL generation is supported for Oracle and MySQL connections only. For other database types, SQL is not generated.
Use the Wizard bar to export or publish the transformed data, send the SQL to the Editor, or automate the task.
Send SQL to Editor. This action is enabled only when all currently-applied rules are supported for SQL generation. | |
Export the transformed data to a .csv or an Excel file. See Specify Excel Export Options for more information. If rules produce errors/exceptions in the data, see Exception Handling. | |
Save the data to local storage. See Save Data to Local Storage for more information. If rules produce errors/exceptions in the data, see Exception Handling. | |
Publish the transformed data to Toad Intelligence Central. Important: To publish transformed data to Intelligence Central as a view or snapshot, all applied rules must support SQL generation. Otherwise, data is published as a dataset. See Publish to Toad Intelligence Central for more information. If rules produce errors/exceptions in the data, see Exception Handling. | |
Publish the Transform and Cleanse file to Intelligence Central. | |
Automate the data transformation task. See Use Database Automation Activities for more information. | |
Save your work as a Transform and Cleanse document (.tct) and add it to the currently-open project in the Project Manager. |
Notes:
To help you transform and cleanse data, Toad reviews the data to be transformed and recommends rules to apply. If Toad recommends a rule for a column, when you select the column, the suggested rule is displayed in the Column tab (right pane).
Click Auto Transform in the toolbar to display the list of all the recommended rules for the data set.
Toad provides recommendations for the following rules: Trim and Convert Data Type.
To find and apply recommended rules (individually)
To apply all recommended rules (Auto Transform)
Click Auto Transform in the Transform and Cleanse toolbar.
Note: If there are no recommended rules to apply, the Auto Transform button is disabled.
The Auto Transform dialog opens displaying a list of recommended rules. Rules that will have the most impact are shown in green. Place the cursor over each rule to display the suggestion's justification. Select the rules you want to apply.
Toad provides the following features to help you identify and resolve errors/exceptions created when transforming data.
Rows with Exceptions tab—If you apply (or update) a rule that produces errors/exceptions in the sample data, the Rows with Exceptions tab displays in the rule editor pane. The tab shows the rows containing exceptions (from the sample data only) and provides a description of the error.
Error Zip File—When you attempt to export or publish transformed data that contains rows with exceptions, Toad generates an Error zip file (compressed folder). The zip contains one .csv file for each exception-generating rule. Each rule file lists the exception rows generated by that rule. When export/publishing is finished, a dialog opens providing links to the Error zip file and the individual rule files.
Review the following information about exception handling:
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. 利用規約 プライバシー Cookie Preference Center