Define a file data source

You can define a text file as a data source for a process.

About this task

The file you use as a data source must be a delimited text file. It can have any file extension.

Microsoft Excel (.xls/.xlsx) files cannot be used as a data source, nor can fixed-width text files.

Define a file data source in Planning Analytics Workspace

Procedure

  1. Open the process in the process editor.
  2. Click the Data Source tab on the process editor.
  3. Click the Data source menu, then click File.
  4. Click the File menu, then click the file you want to use as a data source.
    If the file you want to use as a data source is not available in the list , click Upload file and upload the file you want to use. After the file is uploaded, it is available in the File menu.

    The process editor identifies the delimiter character, as well as the quote character, decimal separator, and thousand separator, and number of header records in your source. If the process editor incorrectly identifies any of these items, you can modify the settings.

    Important: Your data source file might contain one header record, multiple header records, or zero header records. You need to know how many header records your source contains and set the Header records accordingly to ensure that all data in the source file is processed correctly.
  5. Click Preview to view the variables in your data source.
    You can click View more if you want to review additional rows in your data source.
  6. Click Set variables to initially set variable names and types based on a review of the data source.

    If the variable names that are assigned are not meaningful or familiar to you, you can click a variable name and type a new name. Variable names can contain only letters, numbers, and underscore and must start with a letter.

    It's good practice to give the variables a meaningful name. Having meaningful names makes the process scripts easier to read and troubleshoot.

    Similarly, if the data type for any variable is misidentified, you can click the data type and pick a different type.

  7. Click Save to save the process.

Define a file data source in Planning Analytics Workspace Classic

Procedure

  1. Click Data Source on the process editor.
  2. Click File.
  3. Click the file that you want to use as a data source.

    The File menu lists the files that have previously been used as process data sources on your TM1 database.

    If the file you want to use as a data source is not available in the list, drag and drop the new source file onto the Drag and drop file here region of the process editor. You can also click on the Drag and drop file here region to browse to the file you want to use as a data source.

    The file is uploaded to the TM1 database and is set as the process data source. It also becomes available as a data source for future processes.

  4. Click Next.

    The process editor identifies the delimiter character, as well as the quote character, decimal separator, and thousand separator, and number of header records in your source. If the process editor incorrectly identifies any of these items, you can modify the settings.

    Important: Your data source file might contain one header record, multiple header records, or zero header records. You need to know how many header records your source contains and set the Header records accordingly to ensure that all data in the source file is processed correctly.
  5. Click Load Preview.

    The preview region of the process editor reveals the structure of your source file.

    data source preview showing several records
    1
    variable name
    2
    data type

    If your source file includes one or more header records, the assigned names for string variables generally coincide with the values in the header records. but can also be a combination of the letter V and a number, such as V1 or V6. Assigned numeric variable names use the V1 convention. If the variable names that are assigned are not familiar to you, you can click a variable name and type a new name. It's good practice to give the variables a meaningful name; this makes the process scripts easier to read and troubleshoot. Variable names can contain only letters, numbers, and underscore and must start with a letter.

    Similarly, if the data type for any column is misidentified, you can click the data type and pick a different type.

  6. Click Save.