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/03/10 14:06] – [IMPORT FROM DELIMITED TEXT FILE] dmitry | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Import from delimited text file ===== | + | {{ transformations: |
+ | ======IMPORT FROM 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.\\ |
+ | \\ | ||
+ | =====Action Settings===== | ||
+ | ^ Setting | ||
+ | |Load file| Fully-qualified file name of the dataset (includes relative or absolute path). | ||
+ | |Encoding|ASCII, | ||
+ | |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 comma or dot as decimal separator.| | ||
+ | |Skip first lines|This option specifies how many lines to skip from the beginning of a file. It can be helpful in cases where first rows contain\\ some metadata (file header) and actual tabular data starts only after that metadata. This setting can be specified using a parameter as well.| | ||
+ | |Columns don't have headers|Check this if data doesn' | ||
+ | \\ | ||
+ | =====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 character and line breaks. Check this option if wrapping double quotes should be treated as regular characters.| | ||
+ | |Maximum number of lines to load|Limits the number of rows loaded from the file. This setting is applied after //Skip first lines//. Use " | ||
- | **Options** | + | \\ |
+ | =====Importing Multiple Files===== | ||
+ | This action can import multiple files. | ||
+ | \\ | ||
+ | =====Use cases===== | ||
+ | Use the '' | ||
+ | \\ | ||
+ | =====Examples===== | ||
+ | A __pipe-delimited__ .txt file to be imported __starts with 3 rows of metadata__ and has __no header rows__. | ||
+ | < | ||
+ | ... | ||
+ | Data to import | ||
+ | --- | ||
+ | 1|12|3.5|red|265 | ||
+ | 2|47|4.55|teal|354 | ||
+ | 3|4|8.1|burgundy|380 | ||
+ | </ | ||
- | // | + | Use the following settings: |
+ | > Separator = " | ||
+ | > Skip first lines = " | ||
+ | > Columns don't have headers = [X] (checked) | ||
- | // | + | Output: |
- | + | |1|12|3.5|red|265 | |
- | //Decimal// - when a text value looks like a number, EasyMorph converts it into a number. The decimal character specifies whether such numbers should have comma or dot as decimal separator. | + | |2|47|4.55|teal|354 |
- | + | |3|4|8.1|burgundy|380 | |
- | //Skip first lines// - this option specifies how many lines to skip from the beginning of a file. It can be helpful in case when first rows contain some metadata (file header) and actual tabular data starts only after that metadata. This setting can be specified using a parameter as well. | + | |
- | + | ||
- | //Columns don't have headers// - check this if data doesn' | + | |
- | + | ||
- | **Advanced options** | + | |
- | + | ||
- | //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 character and line breaks. Check this option if wrapping double quotes should be treated as regular characters. | + | |
- | + | ||
- | //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. | + | |
+ | \\ | ||
+ | =====See Also===== | ||
+ | * [[transformations: | ||
+ | * [[transformations: | ||
+ | * [[transformations: | ||
transformations/importtext.txt · Last modified: 2023/10/11 20:48 by craigt