Study guide

4.4 Sample, Select Records & Unique Tools

Alteryx Designer Core Certification Exam

Track your progress as you read

Finished sections get a check mark.

1 Chapter 1: Exam Overview, Designer Interface & Optimization

1.1 Exam Overview, Format & Strategy 1.2 Designer Interface, Canvas & Navigation 1.3 Alteryx Native File Formats & Workflow Packaging 1.4 Workflow Optimization, Caching & Performance

2 Chapter 2: In/Out Tools & Data Inspection

2.1 Input Data Tool Configuration & Formats 2.2 Text Input & Directory Tools 2.3 Output Data Tool Configuration & Options 2.4 Browse Tool & Data Profiling

3 Chapter 3: Core Preparation Tools & Data Types

3.1 Alteryx Data Types & Conversion Rules 3.2 Select Tool Configuration & Unknown Fields 3.3 Filter Tool & True/False Anchors 3.4 Data Cleansing Tool

4 Chapter 4: Advanced Preparation & Record Sampling

4.1 Formula Tool: Syntax, Operators & Conditional Logic 4.2 Formula Tool: Date/Time Functions & Type Casting 4.3 Sort Tool & Dictionary Sorting 4.4 Sample, Select Records & Unique Tools

5 Chapter 5: Blending Data: Join, Union & Append

5.1 Join Tool & Anchor Mechanics 5.2 Union Tool & Output Configurations 5.3 Find Replace Tool: Lookup & Text Substitution 5.4 Append Fields Tool & Cartesian Joins

6 Chapter 6: Parsing Data: Text, Dates & Regular Expressions

6.1 Text to Columns Tool 6.2 DateTime Tool 6.3 RegEx Tool: Methods & Syntax

7 Chapter 7: Transforming Data & Workflow Documentation

7.1 Summarize Tool & Aggregation Functions 7.2 Transpose Tool: Pivoting Wide to Long 7.3 Cross Tab Tool: Pivoting Long to Wide 7.4 Documentation Tools & Workflow Best Practices

8 Chapter 8: Practical Exam Scenarios & Troubleshooting

8.1 Troubleshooting Common Workflow Errors & Data Truncation 8.2 Practical Exam Question Walkthroughs & Modeling 8.3 Comprehensive Exam Strategy & Core Review

4.4 Sample, Select Records & Unique Tools

Key Takeaways Explain This Topic AI

The Sample tool extracts record subsets using six configurable methods: First N rows, Last N rows, Skip 1st N rows, 1 of every N rows, 1 in N chance to include each row, and First N% of rows.

Enabling Grouping Fields in the Sample tool causes the sampling operation to reset its counter per unique group, extracting the specified sample independently from each category.

The Select Records tool extracts specific row positions and numeric ranges using concise syntax (e.g., '1-10', '100+', '-5', '1, 3, 5'), preserving schema without altering data types.

The Unique tool features one input anchor and two output anchors: 'U' (Unique) for the first occurrence of each distinct key and 'D' (Duplicate) for all subsequent identical records.

The Unique tool is strictly case-sensitive and routes the first encountered [Null] value to the Unique (U) anchor and subsequent [Null] values to the Duplicate (D) anchor.

Last updated: August 2026

4.4 Sample, Select Records & Unique Tools

Core Concept: Record sampling, index-based row selection, and deduplication are foundational data preparation workflows in Alteryx Designer. The Sample , Select Records , and Unique tools (all located in the Preparation palette) allow analysts to isolate representative test samples, extract specific row ranges, and isolate or remove duplicate records.

1. The Sample Tool: Modes & Grouping Mechanics

The Sample tool limits incoming data streams to a specified number, percentage, or frequency of records. ┌────────────────────────────────────────────────────────────────────────────────────────┐

  • │ Sample (24) - Configuration │
  • ├────────────────────────────────────────────────────────────────────────────────────────┤
  • │ Select Sample Type: │
  • │ ( ) First N rows N = [ 10 ] │
  • │ ( ) Last N rows │
  • │ ( ) Skip 1st N rows │
  • │ (•) 1 of every N rows │
  • │ ( ) 1 in N chance to include each row │
  • │ ( ) First N% of rows │
  • ├────────────────────────────────────────────────────────────────────────────────────────┤
  • │ Grouping Fields (Optional): │
  • │ [✓] Store_Region │
  • │ [ ] Department │
  • └────────────────────────────────────────────────────────────────────────────────────────┘
  • The 6 Sampling Methods

Sampling Method Configuration Value ( N N N ) Behavior / Formula Primary Use Case

First N rows Integer (e.g., 100 ) Extracts rows 1 1 1 through N N N from the top of the stream Rapid testing, inspecting top ranked records

Last N rows Integer (e.g., 50 ) Extracts the final N N N rows from the bottom of the stream Inspecting recent log entries, totals rows

Skip 1st N rows Integer (e.g., 3 ) Drops rows 1 1 1 through N N N ; passes row N + 1 N+1 N + 1 to the end Stripping multi-line metadata headers

1 of every N rows Integer (e.g., 5 ) Returns the first row of every group of N N N rows — rows 1, N N N +1, 2 N N N +1, ... (with N N N =5: rows 1, 6, 11) Systematic interval sampling, thinning dense series

1 in N chance to include each row Integer (e.g., 10 ) Independent Bernoulli trial per row, so N N N is only an approximation: 1,000 rows at N N N =10 may return anywhere from ~75 to ~150 records, not exactly 100 Statistical auditing, unbiased test datasets

First N% of rows Number (e.g., 25 ) Extracts top N% of total dataset rows Proportional sampling across entire dataset

Grouping Fields in the Sample Tool (High-Yield Core Concept)

When one or more Grouping Fields are checked in the configuration window:

The Sample tool resets its counter for each unique group in the data stream.

Example : A dataset contains 1,000 sales transactions across 5 distinct Store_Region values (200 rows per region). If the Sample tool is configured for First 3 rows with Store_Region selected as a grouping field, the tool outputs exactly 3 × 5 = 15 records (the first 3 records of Region 1, the first 3 records of Region 2, etc.).

2. The Select Records Tool: Range Syntax & Positioning

The Select Records tool outputs specific individual records or contiguous/non-contiguous ranges of records based on their vertical row index. ┌────────────────────────────────────────────────────────────────────────────────────────┐

  • │ Select Records (31) - Configuration │
  • ├────────────────────────────────────────────────────────────────────────────────────────┤
  • │ Ranges: [ 1-10, 25, 50-75, 100+ ] │
  • └────────────────────────────────────────────────────────────────────────────────────────┘
  • Range Syntax Reference
  • Syntax Pattern Meaning Example Records Returned
  • 5 Single row number Only record 5
  • 1-10 Contiguous range from row A A A to row B B B Records 1 through 10 inclusive
  • 5 Open-ended range from start to row N N N (same as 1-5 ) Records 1, 2, 3, 4, 5
  • 100+ Open-ended range from row N N N through the end of dataset Record 100 through the last record
  • 1, 3, 5, 7 Comma-separated list of individual records Records 1, 3, 5, 7

1-5, 20-25, 50+ Mixed combination of ranges and open-ended bounds Records 1-5 , records 20-25 , and record 50 onward

Architectural Characteristics

Single Input / Single Output Anchor : Unlike the Filter or Unique tools, Select Records has only one output anchor. Unselected records are discarded and cannot be routed to a secondary stream.

Zero Schema Alteration : Preserves all existing column names, data types, and sizes without modifications.

3. The Unique Tool: Dual Anchors & Deduplication Mechanics

The Unique Tool checks for duplicate records based on one or more designated key columns, separating unique records from duplicate records. ┌────────────────────────────────────────────────────────────────────────────────────────┐

  • │ Unique (15) - Configuration │
  • ├────────────────────────────────────────────────────────────────────────────────────────┤
  • │ Unique Fields: │
  • │ [✓] Customer_ID │
  • │ [✓] Order_Date │
  • │ [ ] Transaction_Amount │
  • └────────────────────────────────────────────────────────────────────────────────────────┘
  • Dual Output Anchor Routing ( U vs. D )

Input Anchor ( I ) : Accepts the incoming data stream.

Unique Output Anchor ( U ) : Receives the very first occurrence of each unique key value or key combination.

Duplicate Output Anchor ( D ) : Receives all subsequent occurrences (the 2nd, 3rd, 4th, etc.) that match an already-encountered key. Incoming Stream (I) Unique Anchor (U) Output Duplicate Anchor (D) Output

  • ──────────────────── ──────────────────────── ───────────────────────────
  • Row 1: [ID: 101, "TX"] ────► Row 1: [ID: 101, "TX"] (1st seen)
  • Row 2: [ID: 102, "CA"] ────► Row 2: [ID: 102, "CA"] (1st seen)
  • Row 3: [ID: 101, "NY"] ───────────────────────────────────────► Row 3: [ID: 101, "NY"] (2nd seen)
  • Row 4: [ID: 103, "FL"] ────► Row 4: [ID: 103, "FL"] (1st seen)
  • Row 5: [ID: 101, "WA"] ───────────────────────────────────────► Row 5: [ID: 101, "WA"] (3rd seen)
  • Key Operational Rules of the Unique Tool

Composite Multi-Field Keys : If multiple fields are checked (e.g., Customer_ID and Order_Date ), a record is only treated as a duplicate if both field values match an earlier record.

Case Sensitivity : The Unique tool is strictly case-sensitive . The values "Alteryx" , "ALTERYX" , and "alteryx" are treated as three distinct unique values and will all pass to the U anchor.

Null Handling : The very first record containing [Null] in the key field passes to the U anchor. Every subsequent record containing [Null] passes to the D anchor.

4. Comparison Matrix: Sample vs. Select Records vs. Unique vs. Filter

  • Feature Sample Tool Select Records Tool Unique Tool Filter Tool
  • Output Anchors 1 ( O ) 1 ( O ) 2 ( U , D ) 2 ( T , F )

Selection Criteria Sampling algorithm ( N N N , %, frequency) Explicit row index / range Distinct key values Value-based boolean condition

  • Supports Grouping? Yes (Resets sample per group) No Yes (Composite key selection) No
  • Captures Discards? No No Yes (Via D anchor) Yes (Via F anchor)
  • Case Sensitivity N/A N/A Yes (Case-sensitive) Based on expression / operator

Loading diagram... Unique Tool Anchor Routing and Deduplication Pipeline