text

Load data from a text file.

This guide explains how to configure the text instruction. To learn about another instruction, go back to the Available custom script instructions overview.

Introduction

Use the text instruction to load data from a text file into a data extract.

Creating a custom script transformation using the text instruction

To create and configure a custom script using the text instruction, follow these steps:

  1. Create a custom script transformation.

  2. In the Instructions step, select the text instruction.

  3. To configure the custom script instruction, fill in the following fields. Required fields are marked with an asterisk (*).

Encoding*

Select the format in which the text file is encoded. Select one of the following:

  • cp437

  • iso-8859-1

  • iso-8859-15

  • iso-8859-9

  • utf-16

  • utf-16le

  • utf-8

  • utf-8-sig

Errors

Choose how the transformation handles errors. Select one of the following:

  • Select strict to return the value None if an error is found.

  • Select ignore to ignore errors.

  • Select raise to raise a notification if an error is found.

Subtable

Enter the name for a subtable that you want to use within this custom script.

A subtable is a temporary table that only exists for this custom script. You can apply additional instructions within the same custom script to the subtable. However, the subtable cannot be used in any other custom scripts.

If a subtable does not exist for the current custom script, the transformation is applied to the data extract, and the enriched data is output into the subtable. If the subtable already exists for the custom script, the subtable is used as the input for the transformation and optionally as the output.