transformations:importfixedwidthtext
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
transformations:importfixedwidthtext [2021/03/10 16:52] – craigt | transformations:importfixedwidthtext [2021/08/14 21:24] (current) – [Advanced options] craigt | ||
---|---|---|---|
Line 1: | Line 1: | ||
{{ transformations: | {{ transformations: | ||
- | ======IMPORT FIXED WIDTH TEXT FILE====== | + | ======IMPORT FIXED WIDTH TEXT====== |
- | Category: Import / File | + | Category: Import / File\\ |
+ | \\ | ||
=====Description===== | =====Description===== | ||
- | This transformation | + | This action |
+ | |||
+ | Use the preview pane (click the //Show preview// button) to visually split the text into columns. Click a character in the preview to create a splitter. Drag a column splitter left or right to adjust the column width.\\ | ||
+ | |||
+ | **Show preview: | ||
+ | |||
+ | \\ | ||
+ | =====Use cases===== | ||
+ | Use the //Import fixed width text file// action when you have text-based data in which the fields are defined by // | ||
+ | \\ | ||
+ | If your data has // | ||
- | Use the preview pane (click the //Show preview// button) to visually split text into columns. Click a character in the preview to create a splitter. Drag a column splitter left or right to adjust the column width.\\ | ||
\\ | \\ | ||
- | =====Action | + | =====Action |
^Setting^Description^ | ^Setting^Description^ | ||
- | |Load file|Fully-qualified file name of the dataset (includes relative or absolute path).| | + | |Load file< |
|Encoding|ASCII, | |Encoding|ASCII, | ||
|First loaded line contains headers|Check this " | |First loaded line contains headers|Check this " | ||
|New columns|Refer to the table below for //new column// settings.| | |New columns|Refer to the table below for //new column// settings.| | ||
|Put remaining symbols into column|Check " | |Put remaining symbols into column|Check " | ||
+ | < | ||
- | ====New columns// settings==== | + | ====New columns settings==== |
^Setting^Description^ | ^Setting^Description^ | ||
|Add more columns|This button will open a list where the columns in the imported file can be explicitly defined by Name and Width.\\ | |Add more columns|This button will open a list where the columns in the imported file can be explicitly defined by Name and Width.\\ | ||
Line 23: | Line 34: | ||
\\ | \\ | ||
- | =====Advanced options===== | + | ====Advanced options==== |
^Setting^Description^ | ^Setting^Description^ | ||
- | |Decimal|Select whether decimal points are represented by a point (.) or comma (,).| | + | |Decimal |
+ | |Thousand separator|Select what character thousands places are represented by. Options: // | ||
|Skip first lines|Defines the number of rows in the incoming dataset to skip before importing data. Use this in cases where\\ leading rows may contain blank rows or metadata not to be included in the dataset.| | |Skip first lines|Defines the number of rows in the incoming dataset to skip before importing data. Use this in cases where\\ leading rows may contain blank rows or metadata not to be included in the dataset.| | ||
|Maximum number of lines to load|The maximum number of rows to be imported. | |Maximum number of lines to load|The maximum number of rows to be imported. | ||
+ | |Treat numeric values|Select how EasyMorph should handle numeric values. | ||
{{transformations: | {{transformations: | ||
- | =====Importing | + | =====Importing |
This action can import multiple files. | This action can import multiple files. | ||
- | \\ | + | |
- | =====Use cases===== | + | |
- | Use the //Import fixed width text file// action when you have text-based data in which the fields are defined by //spacing// (spaces, tabs, leaders, etc.) rather than delimiting characters and you need to import them into columns.\\ | + | |
- | \\ | + | |
- | If your data has // | + | |
\\ | \\ | ||
=====Examples===== | =====Examples===== | ||
Line 45: | Line 54: | ||
*Column widths are known to be 20, 30, 15, 2, 5. | *Column widths are known to be 20, 30, 15, 2, 5. | ||
- | Input dataset: | + | **Input dataset:** |
< | < | ||
Name Address | Name Address | ||
Line 52: | Line 61: | ||
Rick Johanssen | Rick Johanssen | ||
</ | </ | ||
- | Use the following settings to import this dataset: | + | \\ |
+ | **Action parameters:** | ||
> Column settings: | > Column settings: | ||
> Column 1 Name is " | > Column 1 Name is " | ||
Line 62: | Line 72: | ||
For safety, we will add a column to capture overflow characters: | For safety, we will add a column to capture overflow characters: | ||
> Put remaining symbols into column (checked) This column will be named " | > Put remaining symbols into column (checked) This column will be named " | ||
- | Output dataset: | + | |
+ | \\ | ||
+ | **Result table:** | ||
^Name^Address^City^ST^Zip^ | ^Name^Address^City^ST^Zip^ | ||
- | |John Hardy|111 Any Street|Boston|MA|02110| | + | |John Hardy |111 Any Street |
- | |Amanda Smythe|16 East Valley Lane|Hanover|MD|21076| | + | |Amanda Smythe |
- | |Rick Johanssen|14 Sunset Ave, Apt 16B|Delaware City|DE|19706| | + | |Rick Johanssen |
\\ | \\ | ||
Line 73: | Line 85: | ||
*There are 5, single-digit responses, all combined | *There are 5, single-digit responses, all combined | ||
*The first row is a header row of question numbers (1-5) | *The first row is a header row of question numbers (1-5) | ||
- | Input dataset: | + | |
+ | **Input dataset:** | ||
< | < | ||
12345 | 12345 | ||
Line 82: | Line 95: | ||
55234 | 55234 | ||
</ | </ | ||
+ | \\ | ||
+ | **Action parameters: | ||
To expand these response values into their appropriate columns, use the following settings: | To expand these response values into their appropriate columns, use the following settings: | ||
> Column settings: | > Column settings: | ||
Line 90: | Line 105: | ||
> Column 5 Name is " | > Column 5 Name is " | ||
- | Output dataset: | + | \\ |
+ | **Result table:** | ||
^1^2^3^4^5^ | ^1^2^3^4^5^ | ||
- | |1|4|3|2|4| | + | | 1| 4| 3| 2| 4| |
- | |1|1|2|3|2| | + | | 1| 1| 2| 3| 2| |
- | |4|5|4|5|5| | + | | 4| 5| 4| 5| 5| |
- | |3|4|2|3|4| | + | | 3| 4| 2| 3| 4| |
- | |5|5|2|3|4| | + | | 5| 5| 2| 3| 4| |
In this case, you could also have used the [[transformations: | In this case, you could also have used the [[transformations: | ||
+ | |||
+ | \\ | ||
+ | =====Shortcuts===== | ||
+ | Fast ways to create the action: | ||
+ | * Press the "Add data" menu button. Pick " | ||
\\ | \\ |
transformations/importfixedwidthtext.txt · Last modified: 2021/08/14 21:24 by craigt