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 14:26] – [See Also] dmitry | 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: |
+ | \\ | ||
=====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 |
- | ^Settings^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==== |
- | ^Settings^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.\\ |
|Name|The names to be assigned to the incoming columns.| | |Name|The names to be assigned to the incoming columns.| | ||
- | |Width|The size, in characters, of the column. | + | |Width|The size, in characters, of the column. |
\\ | \\ | ||
- | =====Advanced options===== | + | ====Advanced options==== |
- | ^Settings^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 '' | + | |
- | \\ | + | |
- | If your data has __delimeters__, | + | |
\\ | \\ | ||
=====Examples===== | =====Examples===== | ||
- | **Example 1:** You are importing data from a legacy system's fixed-width output | + | **Example 1:** You are importing data from a legacy system |
+ | *Fixed-width output | ||
+ | *The first row contains header information | ||
+ | *Column | ||
+ | |||
+ | **Input dataset:** | ||
< | < | ||
Name Address | Name Address | ||
Line 47: | Line 61: | ||
Rick Johanssen | Rick Johanssen | ||
</ | </ | ||
- | //Use the following settings to import this dataset:// | + | \\ |
+ | **Action parameters:** | ||
> Column settings: | > Column settings: | ||
- | > | + | > |
- | > | + | > |
- | > | + | > |
- | > | + | > |
- | > | + | > |
- | > First loaded line contains headers | + | > First loaded line contains headers |
- | //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 | + | > Put remaining symbols into column |
- | //Ouput 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 |
\\ | \\ | ||
- | **Example 2:** You are presented with survey data that has been captured incorrectly - all values have been compressed into a single field. There are 5, single-digit responses, all combined | + | \\ |
+ | **Example 2:** You are presented with survey data that has been captured incorrectly - all values have been compressed into a single field: | ||
+ | *There are 5, single-digit responses, all combined | ||
+ | *The first row is a header row of question numbers (1-5) | ||
+ | |||
+ | **Input dataset:** | ||
< | < | ||
12345 | 12345 | ||
Line 74: | Line 95: | ||
55234 | 55234 | ||
</ | </ | ||
- | //To expand these response values into their appropriate columns:// | + | \\ |
+ | **Action parameters: | ||
+ | To expand these response values into their appropriate columns, use the following settings: | ||
> Column settings: | > Column settings: | ||
- | > | + | > |
- | > | + | > |
- | > | + | > |
- | > | + | > |
- | > | + | > |
- | //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// '' | + | In this case, you could also have used the [[transformations: |
+ | |||
+ | \\ | ||
+ | =====Shortcuts===== | ||
+ | Fast ways to create the action: | ||
+ | * Press the "Add data" menu button. Pick " | ||
\\ | \\ | ||
- | =====See | + | =====See |
* [[transformations: | * [[transformations: | ||
* [[transformations: | * [[transformations: | ||
* [[transformations: | * [[transformations: |
transformations/importfixedwidthtext.txt · Last modified: 2021/08/14 21:24 by craigt