Transcript - Manually Entering Data
Transcript - Manually Entering Data
It's not uncommon to enter data on the fly in a workflow to serve as a test dataset for validating a
workflow process or as a lookup table to add meaning to otherwise unclear data values or
codes. While using manually entered data runs the risk of introducing errors into an analytic process,
it also expands the flexibility and accessibility of data that can be used in a workflow.
Dataset Exploration
Our workflow contains three Input Data tools, each of which is used to read in a file containing data on
trees in New York City. For the most part, the columns in these input datasets contain clear and
intuitive values. All, except for one: "Borough Code", which contains the values 1 through 5, each
representing a borough in New York City. However, aside from the fact that a tree is assigned a
borough number, and that these numbers correspond to a borough, a general understanding of this
information is limited. Our analysis would greatly benefit from understanding the significance of these
values to understand where, in more accessible terms, trees are located.
Lookup Tables
To clarify the meaning of these codes, create a simple lookup table directly in Designer to associate
each borough code with its name. Because the number of values to define (5) is small and only two
columns are necessary, one for the Borough Code and another for the Borough Name, it's no trouble
to enter this data manually using a Text Input tool.
The Text Input tool's configuration provides a blank table that can be used to customize an input
dataset with columns and rows.
© 2022 Alteryx
Manually Entering Data
First, create a column of data values to match those that currently exist in our inputs. In the header of
the first column, type "Borough Code" to name the column.
Code 1
This column will contain the code values for the five boroughs in New York: the numbers 1, 2, 3 4 and
5. Enter a "1" in the empty cell in the column "Borough Code".
Code 2
Once a cell is populated, another empty cell in the column "Borough Code" appears directly below the
typed value 1. In this new empty cell, enter the value "2".
Code 3
Continue entering the rest of the borough codes into the empty cells as they appear.
Borough Names
The boroughs are defined, from 1 to 5, as Manhattan, Bronx, Brooklyn, Queens and Staten
Island. Enter each borough name into the cell next to the associated code.
Like the Input Data tool, the Text Input tool can also read in existing data sets in the form of a file or
database, and even paste in data that has been copied from another source. This is handy for quickly
editing the contents of an input. Select a method below to import data into the Text Input tool.
Copy and paste the contents of an existing file, such as an Alteryx database, into a Text Input
tool. Click the icon to copy the file's contents to the clipboard, and select "All records with headers"
from the menu.
In the Text Input tool's configuration, click the Paste icon to populate the Text Input with the copied
data.
In the Text Input tool's configuration, click the icon to import a file.
© 2022 Alteryx
This dialog is the same as that in the Input Data tool's configuration. Use this to navigate to and select
an input file to import into the the Text Input tool. Once the file's contents populate the Text Input
tool, its contents can be manually edited.
This particular input file contains extra columns, namely the columns "Land Area Sq Km" and "Pop
Density", that are not necessary for this analysis and should be removed.
Highlight the columns Land Area Sq Mile and Pop Density. Then, click the Delete button and select
"columns" from the menu
This input also contains a duplicate row for Borough Code 2, the Bronx. Click a row that contains this
value. Then, click the Delete button and select "Rows".
Insert Row
A value is missing from this input: the borough code 3 for Brooklyn. Manually add it to the table by
clicking the row containing the Borough Code 4. Then, click "Insert" and select “row" from the menu.
Enter the borough code 3 and the name Brooklyn into the appropriate cells to complete the lookup
table.
Completed Table
Now, this table can be used for data blending processes that will be implemented further downstream
in the workflow. Unlike data that is read into the workflow with the Input Data tool and is externally
linked to a file or data connection on a machine or network, data entered into a Text Input tool "lives"
within the workflow. This means that data values are not only static but also accessible to anyone with
whom you might choose to share this workflow.
There is one important difference in how input data is handled in the Text Input tool as opposed to an
Input Data Tool. When using the Text Input tool, data is automatically categorized to the smallest
possible field type and size. How have the manually entered values been affected by this
functionality?
Data Types
© 2022 Alteryx
The Text Input tool has assigned the datatype "Byte", which is numeric, with a size of 1 to the column
Borough Code. In other Input Data tools, this same column of values is input as a string. As such,
changes to this data type will be necessary to match that in other inputs, especially if this column is
used for any data blending later on in the workflow. The column Borough Name has been assigned a
string data type, which is appropriate for the values it contains. However, the string data type does not
have any built-in flexibility when it comes to the length of data values. Luckily, this data is static no
other values will be introduced into this table, so this data type can remain unchanged. Any empty
values in a Text Input tool will be assigned a Null Value.
© 2022 Alteryx