File-based Recode Tables - trillium_discovery - trillium_quality - Latest

Trillium Control Center

Product type
Software
Portfolio
Verify
Product family
Trillium
Product
Trillium > Trillium Discovery
Version
Latest
Language
English
Product name
Trillium Quality and Discovery
Title
Trillium Control Center
Copyright
2024
First publish date
2008
Last updated
2024-10-18
Published on
2024-10-18T15:02:04.502478

A file-based recode table allows the user to use an external user-defined recode table. This method can be used if you created the recode table by exporting the recodes in data profiling, or if you have access to previously-created recode tables in the server or client. You can also create your tables manually.

Guidelines:
  • You can use a fixed length file or a delimited file with a schema (ddx) for your recode table.
  • If the first character is a comment character, then the line is ignored.
  • The maximum attribute length for table recodes is 2000 bytes (1000 characters in UCS2).

To use a file-based recode table

  1. From the Navigation or Project View, right-click the Transformer process and select Edit Process. You can also double-click the process to open it for editing.
  2. Select the Output Conditionals tab.
  3. Right-click within the Transformation Rules pane (right-hand side) and select Add > New > Table Recode.
  4. Enter a Description for this table recode operation. The description will be inserted in the Statistics File.
  5. Select File as the source of recodes.
  6. Do one of the following:

    a. If you have the recode table and ddx file on the server, or if you created the recode table and ddx file by doing a recodes export from Baseline Analysis, select these files by clicking Import from server.

    Note: If you exported your recodes, you must select from \export.

    In \tables\general_resources there are five special recode tables that you can select:

    • rcaugeo.tbl – casing table for Australian geography
    • rccageo.tbl – casing table for Canadian geography
    • rcusgeo.tbl – casing table for US geography
    • rcusnam.tbl – casing table for US names
    • rcusstr.tbl – casing table for US streets

    If you select one of these tables, the corresponding ddx file (rc.ddx) will automatically be selected.

    Note: These five casing tables replace the previously used STRSUB table. The STRSUB table is still supported for legacy projects.

    b. If your recode table and ddx file are on the client, select these files by clicking Upload from client.

    c. If you want to edit the recode table or ddx file on the server, select the file by clicking Import from server, and then click Copy to Client. After editing the file on the client, click Upload from client and select the file you edited.

  7. Select the Delimiter used in the recode table file. If your recode table is a fixed length file, select None. If the delimiter is not on the list, select Other and enter the character in the text box.
  8. (Optional) Select the Character to use as comment indicator. The Transformer will ignore any lines in the recode table that start with the character specified in this option. If you do not specify this option, the comment character is '#' by default. If your table has no comments, select Nonewhich turns off the default comment character of '#'.If the character is not on the list, select Otherand enter the character in the text box.
    Note: This option only applies to delimited tables.
  9. (Optional) Select Quotes if you want to use values enclosed with quotes in the table lookup. If you do not select this option, values enclosed with quotes are ignored as lookup values.
  10. (Optional) Click Preview to display the recode table.
  11. (Optional) If you want to lookup only part of the attribute, select Use phrase separator. See Using a Phrase Separator for File-based Recode Tables for details. If you do not use this option, click Next.
  12. Select the attribute from the Match attribute list. This is the Transformer output attribute which will be matched against the original value in the recode file specified in Step 6.
    Note: You can match up to five attributes. Specifying multiple attributes creates an AND condition for the table recode operation. See Recoding Data Using Multiple Attributes.
  13. Select the attribute from the to recode attribute list. This is the attribute in the recode file where the original values are described.
  14. Select the recode type (literal or mask) and click Next.
  15. Select the attribute from the Copy recode attribute list. This is the attribute in the recode file that contains the new values.
  16. Select the destination attribute from the to attribute list. This is the Transformer output attribute which will store the recoded value.
  17. Select the recode type (literal or mask).
  18. (Optional) Select Case sensitive matching to use case-sensitive matching. By default, matching is case-insensitive. The case sensitive option does not apply to masks, only to values.
  19. Click Finish.

    The recode table and its ddx file will be created in path\repository_name\projectN\tables, where path is the path to the repository directory (specified during installation), repository_name is the name of your repository and N is the number of your project. For example, C:/ProgramData/Trillium Software/.../repository1/project1/tables.

    When the Transformer is run, it will apply the recodes to the output attributes.