2.2 Text Input & Directory Tools
Key Takeaways
The Text Input tool allows manual creation of static data tables directly on the workflow canvas without any external file or database dependencies.
Text Input data is embedded directly into the workflow's XML (.yxmd), ensuring 100% portability when sharing workflows across machines or servers.
The Text Input tool automatically infers data types and sizes string columns to the exact character length of the longest value entered in each column.
The Directory tool scans a file system path and outputs a standardized dataset of file metadata, including FullPath, Directory, FileName, CreationTime, LastWriteTime, and SizeBytes.
Combining the Directory tool with a Sort tool (LastWriteTime Descending) and Sample tool (First 1) is the standard pattern for dynamically grabbing the latest file in a directory.
2.2 Text Input & Directory Tools
Core Certification Focus: Understand when to use Text Input versus external files, how Text Input auto-assigns data types and string lengths, and the exact metadata fields generated by the Directory tool (especially
FullPath,FileName,CreationTime,LastWriteTime, andSizeBytes).
1. Text Input Tool Architecture & Capabilities
The Text Input tool (In/Out palette) allows you to manually type or paste small datasets directly onto the canvas. It requires no external connection, making it ideal for self-contained workflows.
Primary Use Cases
- Lookup & Mapping Tables: Creating static reference tables (e.g., State Code → State Name, Department ID → Department Head) for Join or Find Replace tools.
- Testing & Prototyping: Providing isolated test data to validate complex Formula expressions or RegEx parsing logic without relying on massive production files.
- Dynamic Configuration Streams: Supplying control parameters or file paths into iterative macros and Dynamic Input tools.
+-----------------------------------------------------------------------------+
| TEXT INPUT TOOL ON CANVAS |
| |
| (No Input) ---> [ Text Input ] ---> (1 Output Anchor: Output Data)|
| (Green) |
+-----------------------------------------------------------------------------+
2. Text Input Data Entry & Type Inference
You can populate a Text Input tool by:
- Direct Cell Entry: Clicking into cells to type values, using
Tabto navigate columns andEnterto create new rows. - Copy / Paste: Copying cell ranges from Microsoft Excel, Google Sheets, or delimited text and pressing
Ctrl + Vinside the Text Input configuration window. - Context Menu Operations: Right-clicking cells to Insert Row, Delete Row, Insert Column, or Delete Column.
+-----------------------------------------------------------------------------+
| TEXT INPUT CONFIGURATION WINDOW |
+-----------------------------------------------------------------------------+
| | Region_ID | Region_Name | Target_Sales | Active | Launch_Date |
|----+-----------+--------------+--------------+--------+---------------------|
| 1 | 101 | Northeast | 500000.00 | True | 2026-01-15 |
| 2 | 102 | Southeast | 450000.00 | True | 2026-02-01 |
| 3 | 103 | Midwest | 380000.00 | False | 2026-03-10 |
| 4 | 104 | West | 620000.00 | True | 2026-04-05 |
+-----------------------------------------------------------------------------+
Automatic Type Inference Rules & Traps
When you run a workflow, Alteryx examines the data entered in the Text Input tool and automatically assigns field types:
- Whole Numbers: Assigned as
Byte,Int16,Int32, orInt64depending on magnitude. - Decimal Numbers: Assigned as
DoubleorFixedDecimal. - Booleans: Text entries of
TrueorFalseare inferred asBool. - Dates: Strings formatted strictly as
yyyy-mm-ddare inferred asDate. - Strings: Inferred as
StringorV_String.
Warning
Critical Exam Trap: Exact String Auto-Sizing
The Text Input tool sets the byte size of a String column to the exact length of the longest value in that column at configuration time. In the table above, the longest Region_Name is "Northeast" (9 characters). Alteryx assigns Region_Name a type of String with size 9. If you later join or union this stream with external data containing "Pacific Northwest" (17 characters), the downstream data will be truncated to 9 characters unless you insert a Select Tool to increase the field size!
3. Directory Tool Overview & Configuration
The Directory tool (In/Out palette) scans a specified directory on a local or network file system and returns a list of all matching files along with their file system metadata.
+-----------------------------------------------------------------------------+
| DIRECTORY TOOL CONFIGURATION |
+-----------------------------------------------------------------------------+
| Directory: [ C:\EnterpriseData\FinancialReports\ ] |
| File Specification: [ Monthly_*.xlsx ] |
| [X] Include SubDirectories |
+-----------------------------------------------------------------------------+
Configuration Options
- Directory: The folder path to search (e.g.,
C:\EnterpriseData\FinancialReports\). - File Specification (Filter): Wildcard pattern defining which files to return. Defaults to
*.*(all files). Examples:*.csv→ Returns all CSV files.Sales_202?.xlsx→ Returns Excel files matching specific single-character years.
- Include SubDirectories: When checked, recursively searches all subfolders within the target directory.
4. Directory Tool Output Schema Deep Dive
The Directory tool outputs a standardized tabular schema containing 10+ metadata fields for every matching file found:
| Output Field Name | Data Type | Description & Example Content |
|---|---|---|
FullPath | V_WString | Complete absolute path including drive, directories, filename, and extension.; (e.g., C:\Data\Reports\Q1_Sales.xlsx) |
Directory | V_WString | Path of the containing folder without the filename.; (e.g., C:\Data\Reports\) |
FileName | V_WString | Filename and extension only.; (e.g., Q1_Sales.xlsx) |
ShortFileName | V_WString | 8.3 DOS-compatible shortened filename.; (e.g., Q1_SAL~1.XLS) |
CreationTime | DateTime | File creation timestamp (yyyy-mm-dd hh:mm:ss). |
LastWriteTime | DateTime | Last modified/saved timestamp (yyyy-mm-dd hh:mm:ss). |
LastAccessTime | DateTime | Last accessed/opened timestamp. |
SizeBytes | Int64 | File size on disk measured in bytes. (e.g., 1048576 for 1MB). |
AttributeArchive | Bool | True if Windows Archive flag is active. |
AttributeReadOnly | Bool | True if file is marked read-only. |
AttributeHidden | Bool | True if file is marked hidden. |
AttributeSystem | Bool | True if designated as an operating system file. |
5. Practical Design Pattern: Ingesting the Most Recent File
A classic scenario tested on the Core exam is dynamically identifying and processing the single most recently updated file in a folder.
Step-by-Step Tool Pipeline:
- Directory Tool: Set Directory to
C:\Incoming\and File Specification to*.csv. - Sort Tool: Sort
LastWriteTimein Descending order (places newest file at Row 1). - Sample Tool: Select First 1 Records (isolates the latest file).
- Dynamic Input Tool (or Macro): Reads the
FullPathfield to load the file contents.
+-------------+ +-------------+ +-------------+ +-----------------+
| Directory | ---> | Sort | ---> | Sample | ---> | Dynamic Input |
| (*.csv) | | (LastWrite | | (First 1) | | (Reads FullPath)|
| | | Descending)| | | | |
+-------------+ +-------------+ +-------------+ +-----------------+
6. Summary Comparison: Text Input vs. Input Data vs. Directory
| Feature | Text Input Tool | Input Data Tool | Directory Tool |
|---|---|---|---|
| Data Origin | Workflow XML (.yxmd) | External File or DB | File System Metadata |
| Portability | 100% portable (Self-contained) | Requires external file access | Scans local/network paths |
| Dynamic Changes | Static; requires manual edit | Updates when source file updates | Updates when directory changes |
| Primary Output | Tabular user data | Tabular source data | File metadata (paths, sizes, dates) |
A user creates a static mapping table using the Text Input tool. The longest entry in the 'Department' field is 'HR' (2 characters). Later in the workflow, a Join tool joins this stream with an employee table containing department names like 'Engineering' (11 characters). What will happen to the 'Department' field if no Select tool is used?
Alteryx will dynamically widen the field to 11 characters at runtime with no data loss.
Values from the employee stream exceeding 2 characters will be truncated to 2 characters.
The workflow will halt execution with a critical fatal error.
The field type will convert to a Double automatically and set mismatched values to Null.
Which field generated by the Directory tool provides the complete path to a file, including the drive letter, directory path, file name, and file extension?
Directory
FileName
FullPath
ShortFileName
An automated workflow must identify and ingest only the single newest file in a network folder where new files arrive daily. What sequence of tools correctly identifies this file?
Input Data tool (*.xlsx) -> Select Records (Record 1) -> Browse tool
Text Input tool -> Dynamic Rename tool -> Sample tool (Last 1)
Directory tool -> Filter tool ([CreationTime] == Max([CreationTime])) -> Output Data
Directory tool -> Sort tool (LastWriteTime Descending) -> Sample tool (First 1 Record)
What is the primary advantage of using a Text Input tool rather than an Input Data tool pointing to a local CSV file when building a small reference table of tax rates?
The Text Input data is embedded directly in the workflow's XML (.yxmd), ensuring the workflow runs seamlessly without external file path dependencies.
The Text Input tool can process millions of rows faster than an Input Data tool reading a native .yxdb file.
The Text Input tool has both an input and an output anchor, allowing dynamic in-memory updates.
The Text Input tool automatically encrypts data using AES-256 standards.
Sections you finish are checked off in the contents.