Import From CSV

Import the contents of a CSV file into a Table.

Once the file contents are imported, you can process the data in a variety of ways, including using the Search Rows function to retrieve a single row, a subset of rows, or all the rows, and process the rows one by one using a List function such as For Each.

Options

Field Definition Type Required
Table Table into which CSV content will be imported.

To select a table:

  1. Click Choose Table, select a table in the dialog box, or click New Table to create a new table, then click Choose.

  2. Click Save on the card.

If this card will be included in flows that will operate on different tables, choose the provide table at runtime option. See Provide a table ID at runtime.

Dialog box TRUE

Input

Field Definition Type Required
Destination
Table ID (if the provide table at runtime option was selected) ID for table into which CSV data will be imported. To obtain the table ID, see Provide a table ID at runtime. String TRUE
Source
File Content
  • File ID of the source CSV file. Must be a correctly-formatted CSV file.
  • File TRUE
    Options
    Select A list of column names to directly import into a table. Use this input when the CSV column names are exact matches of their counterparts inside of the destination table.

    Example:

    If a CSV file has a column header Column 1, and if the destination column in the table is also named Column 1, enter Column 1 in this list. However, if the mappings between the CSV and the table are more complex, use the Mapping input below, and don't add any values to this Select input field.

    Text FALSE
    Mapping An object describing the mapping between a CSV file's column names and and the column names of the destination table.

    To build this object, make sure all keys are the name of the column header in the CSV file and the destination table's column names are its corresponding value.

    If a CSV column header is not mapped, it will not be imported into the destination table

    Example:

    The source is a CSV file with two column headers named Column 1 and Column 2. I would like all data in Column 1 to be mapped to the destination table column Column A. I do not want to include any information from Column 2 in the destination table. The mapping object will be {"Column 1" : "Column A"}, and would omit Column 2 entirely.

    Object FALSE
    Delimiter A custom delimiter for the source CSV file. For example, if you want to create a pipe delimited CSV, then enter | as your delimiter. Defaults to ,. String FALSE
    Clear Destination If all existing rows in the destination table must be deleted before importing data from a CSV file, set to True; otherwise, if False is selected, imported data will be appended at the end of the destination table. Boolean FALSE

    Output

    Field Definition Type
    New Rows Total number of rows that were imported from the source CSV file. Number

    Related topics

    Functions in Workflows

    About the elements of Okta Workflows