Skip to content

Importing with Regular Expressions#

You can use regular expressions to process a text file. Below is a short sample text file that uses the regular expression to parse the data.

  1. Review your file for how columns are arranged. In this case we can note that the column names are contained in the first row and the columns are separated by a comma.
  2. Open Spectrum and create a new import job.
  3. Select the connector where the data is stored and then select "Regex Parsable Text" as the file type.
  4. Type in the name of the file, then select that the file contains headers in the first row (if needed), and enter the regular expression under "Pattern" to parse your data.

    INFO: It is important to note that only a single line can be parsed using the regular expression import job. All lines must fit the same column rules set by the parse pattern. The exception for this are headers being defined in the first row.

  5. Check to make sure the data was defined correctly with the regular expression.

  6. Set the desired schedule for the import job.
  7. Add a description for the import job and click "Save" to run.

Additional Information for Regular Expressions#

Depending on how the text file is structured, construct an expression for the data. If you aren't familiar with regular expressions, here are some resources to help you learn more. Spectrum uses regular expressions supported by Java.