transformations:importfixedwidthtext
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
transformations:importfixedwidthtext [2018/01/11 20:43] – created dmitry | transformations:importfixedwidthtext [2021/08/14 21:24] (current) – [Advanced options] craigt | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Import fixed width text file ===== | + | {{ transformations: |
+ | ======IMPORT FIXED WIDTH TEXT====== | ||
+ | Category: Import / File\\ | ||
- | This transformation | + | \\ |
+ | =====Description===== | ||
+ | This action | ||
- | Use the preview pane to visually split text into columns. Click a character in preview to create a splitter. Drag a column splitter left or right to adjust column width. | + | Use the preview pane (click the //Show preview// button) |
+ | |||
+ | **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 // | ||
+ | |||
+ | \\ | ||
+ | =====Action settings===== | ||
+ | ^Setting^Description^ | ||
+ | |Load file< | ||
+ | |Encoding|ASCII, | ||
+ | |First loaded line contains headers|Check this " | ||
+ | |New columns|Refer to the table below for //new column// settings.| | ||
+ | |Put remaining symbols into column|Check " | ||
+ | < | ||
+ | |||
+ | ====New columns settings==== | ||
+ | ^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.\\ | ||
+ | |Name|The names to be assigned to the incoming columns.| | ||
+ | |Width|The size, in characters, of the column. | ||
+ | |||
+ | \\ | ||
+ | ====Advanced options==== | ||
+ | ^Setting^Description^ | ||
+ | |Decimal separator|Select whether decimal points are represented by a point (.) or comma (,).| | ||
+ | |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.| | ||
+ | |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: | ||
+ | |||
+ | =====Importing multiple files===== | ||
+ | This action can import multiple files. | ||
+ | |||
+ | \\ | ||
+ | =====Examples===== | ||
+ | **Example 1:** You are importing data from a legacy system containing name/ | ||
+ | *Fixed-width output | ||
+ | *The first row contains header information | ||
+ | *Column widths are known to be 20, 30, 15, 2, 5. | ||
+ | |||
+ | **Input dataset: | ||
+ | < | ||
+ | Name Address | ||
+ | John Hardy 111 Any Street | ||
+ | Amanda Smythe | ||
+ | Rick Johanssen | ||
+ | </ | ||
+ | \\ | ||
+ | **Action parameters: | ||
+ | > Column settings: | ||
+ | > Column 1 Name is " | ||
+ | > Column 2 Name is " | ||
+ | > Column 3 Name is " | ||
+ | > Column 4 Name is " | ||
+ | > Column 5 Name is " | ||
+ | > First loaded line contains headers (checked) | ||
+ | For safety, we will add a column to capture overflow characters: | ||
+ | > Put remaining symbols into column (checked) This column will be named " | ||
+ | |||
+ | \\ | ||
+ | **Result table:** | ||
+ | ^Name^Address^City^ST^Zip^ | ||
+ | |John Hardy |111 Any Street | ||
+ | |Amanda Smythe | ||
+ | |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 | ||
+ | *The first row is a header row of question numbers (1-5) | ||
+ | |||
+ | **Input dataset: | ||
+ | < | ||
+ | 12345 | ||
+ | 14324 | ||
+ | 11232 | ||
+ | 45455 | ||
+ | 34234 | ||
+ | 55234 | ||
+ | </ | ||
+ | \\ | ||
+ | **Action parameters: | ||
+ | To expand these response values into their appropriate columns, use the following settings: | ||
+ | > Column settings: | ||
+ | > Column 1 Name is " | ||
+ | > Column 2 Name is " | ||
+ | > Column 3 Name is " | ||
+ | > Column 4 Name is " | ||
+ | > Column 5 Name is " | ||
+ | |||
+ | \\ | ||
+ | **Result table:** | ||
+ | ^1^2^3^4^5^ | ||
+ | | 1| 4| 3| 2| 4| | ||
+ | | 1| 1| 2| 3| 2| | ||
+ | | 4| 5| 4| 5| 5| | ||
+ | | 3| 4| 2| 3| 4| | ||
+ | | 5| 5| 2| 3| 4| | ||
+ | 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 also===== | ||
+ | |||
+ | * [[transformations: | ||
+ | * [[transformations: | ||
+ | * [[transformations: |
transformations/importfixedwidthtext.1515721380.txt.gz · Last modified: 2018/01/11 20:43 by dmitry