Using Custom File Delimiters

Using Custom File Delimiters

book

Article ID: KB0082621

calendar_today

Updated On:

Products Versions
Spotfire Data Science 6.x

Description

How to use Custom File Delimiters

Issue/Introduction

How to use Custom File Delimiters

Resolution

Database
  1. Choose the file that you want to import. 
  2. Choose the DB data source into which you want to import this data. 
  3. Find a workflow that has this data source associated.
  4. Navigate to the proper schema/table into which you want to import this data.
  5. Use the 'Import a dataset' button to start the import wizard.
  6. Use 'Choose File' to select the file you want to import. You can also choose whether to import all rows or a sample of the rows.
  7. You should see that the file does not look good. Alpine uses ',' as the delimiter and " as the quote character. To change this, click 'Show additional formatting options'.
  8. Use the dropdown menu to select 'Other' as your delimiter type. After selecting 'Other', use the space next to the dropdown to type in your custom delimiter. 
  9. Once you select your custom delimiter, your data should reappear in its correct format. 
  10. When finished importing, the file will appear in the data menu of the schema/table you selected. You are now free to drag that dataset to the workspace and use it in your workflows.

Hadoop

To customize delimiters for files on HDFS, you first need to upload the file onto your cluster. Instead of determining the delimiters on import, you do it when you drag the dataset to the canvas and configure it.
  1. Navigate to the file you want to customize in the data explorer within the workflow editor.
  2. Drag it to the workflow canvas.
  3. Double-click the operator to bring up the operator properties. Select 'Hadoop File Structure'.
  4. Here you can define the Escape character, the Quote character, and the Delimiter. Confirm that the columns have the correct name and type, then select 'OK'. 
  5. The dataset can now be used in your workflows and connected to other operators.