transformations:importtext
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
transformations:importtext [2018/08/15 08:18] – dmitry | transformations:importtext [2021/07/19 01:54] – [Examples] craigt | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Import from delimited text file ===== | + | {{ transformations: |
+ | ======IMPORT DELIMITED TEXT FILE====== | ||
+ | Category: Import / File\\ | ||
+ | \\ | ||
+ | =====Description===== | ||
This action loads data from one or multiple delimited text files. | This action loads data from one or multiple delimited text files. | ||
- | The number of columns in the resulting dataset is defined by the 1st row of imported data. | + | The number of columns in the resulting dataset is defined by the first row of imported data.\\ |
- | **Options** | + | \\ |
+ | =====Use cases===== | ||
+ | Use the //Import from a delimited text file// action when you have a plain text, structured, data file with fields that are separated by a delimiting character. | ||
- | // | + | \\ |
+ | =====Action settings===== | ||
+ | ^ Setting | ||
+ | |Load file< | ||
+ | |Encoding|ASCII, ANSI (with code page), and other types of encoding. If you're not sure what to choose, try UTF-8 as it's the most common Unicode encoding.| | ||
+ | |Separator|The delimiter character that separates one value from another. For instance, for CSV files it should be a comma.\\ A custom separator consisting of up to 8 characters can also be specified. | ||
+ | |Decimal|When a text value looks like a number, EasyMorph converts it into a number. The decimal character specifies whether such numbers should have a comma or a dot as the decimal separator.| | ||
+ | |Skip first lines< | ||
+ | |Columns don't have headers|Check this if data doesn' | ||
- | // | + | < |
- | //Decimal// - when a text value looks like a number, EasyMorph converts it into a number. The decimal | + | \\ |
+ | ====Advanced options==== | ||
+ | ^ Setting | ||
+ | |Show parsing errors|Check this to add a column that contains parsing errors (if any) for each line. It can help detect rows that have too few values, or too many values.| | ||
+ | |Ignore quoting|By default, values wrapped in double quotes can contain the separator | ||
+ | |Maximum number of lines to load< | ||
+ | < | ||
- | //Skip first lines// - this option specifies how many lines to skip from the beginning | + | \\ |
+ | =====Remarks===== | ||
+ | Preview the raw and imported versions of the dataset using the //Show preview// button at the top of the action settings window.\\ | ||
- | //Columns don't have headers// - check this if data doesn' | + | This action can import multiple files. See [[import: |
- | **Advanced options** | + | \\ |
+ | =====Examples===== | ||
+ | **Input:** | ||
+ | < | ||
+ | ... | ||
+ | Data to import | ||
+ | --- | ||
+ | 1|12|3.5|red|265 | ||
+ | 2|47|4.55|teal|354 | ||
+ | 3|4|8.1|burgundy|380 | ||
+ | </ | ||
- | //Show parsing errors// | + | The input text has the following properties: |
+ | * pipe-delimited | ||
+ | * starts with 3 rows of metadata | ||
+ | * has no header rows | ||
+ | \\ | ||
+ | **Action parameters: | ||
+ | > Separator is Pipe | ||
+ | > Skip the 3 first lines | ||
+ | > Columns don' | ||
- | //Ignore quoting// - by default, values wrapped in double quotes can contain the separator character and line breaks. Check this option if wrapping double quotes should be treated as regular characters. | + | \\ |
+ | **Result table:** | ||
+ | | 1| 12| 3.5|red| | ||
+ | | 2| 47| 4.55|teal| | ||
+ | | 3| 4| 8.1|burgundy| | ||
- | //Maximum number of lines to load// - limits the number of rows loaded from the file. This setting is applied after //Skip first lines//. Use 0 to load all rows. | + | \\ |
+ | ====Community examples==== | ||
+ | * [[https://community.easymorph.com/ | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | ]] ([[https:// | ||
+ | * [[https:// | ||
+ | \\ | ||
+ | =====Shortcuts===== | ||
+ | Fast ways to create the action: | ||
+ | * Press the "Add data" menu button. Pick " | ||
+ | * Drag a text file into the application window. Supported file extensions: csv, psv, tsv. | ||
+ | * Drag a folder with text files into the application window. | ||
+ | |||
+ | \\ | ||
+ | =====See also===== | ||
+ | * [[transformations: | ||
+ | * [[transformations: | ||
+ | * [[transformations: | ||
+ | * [[transformations: | ||
+ | * [[transformations: | ||
transformations/importtext.txt · Last modified: 2023/10/11 20:48 by craigt