Skip to main content

Replacing Alteryx with Savant expressions

Savant offers a powerful cloud native data pipeline, analytics flow, and ETL in one solution. Replacing Alteryx with Savant has been a great experience so far, in particular when I have to obtain, transform and move files from many third party source. It handles files like CSV, JSON, and Excel from file shares better than anything I have used to date. In this article I highlight common expression conversions when porting Alteryx to Savant. Get started with Savant

Replacing Alteryx with Savant

Conversion Guidelines: Replacing Alteryx with Savant Expressions

1. String Functions

  • Contains:
    • Alteryx: Contains([Field], "substring")
    • Savant: Field LIKE "%substring%"
    • Example: IF Contains([Name], "test") THEN "Yes" ELSE "No" ENDIF becomes CASE WHEN Name LIKE "%test%" THEN "Yes" ELSE "No" END.
  • ReplaceChar:
    • Alteryx: ReplaceChar([Field], "search", "replace")
    • Savant: REPLACE(Field, "search", "replace")
    • Example: ReplaceChar([Name], ":", "") becomes REPLACE(Name, ":", "").

2. Date and Time Functions

  • DateTimeParse & DateTimeFormat:
    • Alteryx: DateTimeParse(DateTimeFormat([Field], "format"), "format")
    • Savant: Use TO_DATE(TO_TEXT(Field, "format"), "format") for similar functionality.
    • Example: DateTimeParse([Date], "%Y-%m-%d") becomes TO_DATE(Field, '%Y-%m-%d').
  • DateTimeAdd:
    • Alteryx: DateTimeAdd([Date], n, "unit")
    • Savant: DATE_ADD([Date], n, "unit")
    • Example: DateTimeAdd([Date], -1, "months") becomes DATE_ADD([Date], -1, 'month').

3. Conditional Statements

  • IF-THEN-ELSEIF:
    • Alteryx: IF [Field] = "value" THEN "result" ELSEIF [Field] = "value" THEN "result" ELSE "result" ENDIF
    • Savant: CASE WHEN Field = "value" THEN "result" WHEN Field = "value" THEN "result" ELSE "result" END
    • Example: IF [Status] = "Active" THEN "Yes" ELSE "No" ENDIF becomes CASE WHEN Status = "Active" THEN "Yes" ELSE "No" END.
  • ISNULL & IS_EMPTY:
    • Alteryx: ISNULL([Field])
    • Savant: Field IS NULL
    • Example: IF ISNULL([Name]) THEN "Unknown" ENDIF becomes CASE WHEN Name IS NULL THEN "Unknown" END.

4. Arithmetic Operations

  • Simple Addition:
    • Alteryx: [Field1] + [Field2]
    • Savant: [Field1] + [Field2]
    • Example: [A] + [B] remains [A] + [B].
  • Rounding:
    • Alteryx: ROUND([Field], 0.0001)
    • Savant: ROUND(Field, 4) (For four decimal places)

5. Null and Empty Checks

  • Combining Null and Empty Checks:
    • Alteryx: IF IsNull([Field]) OR IsEmpty([Field]) THEN "Unknown" ENDIF
    • Savant: CASE WHEN Field IS NULL OR IS_EMPTY(Field) THEN "Unknown" END
    • Example: IF IsNull([Name]) THEN "Unknown" ENDIF becomes CASE WHEN Name IS NULL THEN "Unknown" END.

6. Concatenation

  • String Concatenation:
    • Alteryx: [Field1] + "--" + [Field2]
    • Savant: CONCAT(Field1, "--", Field2)
    • Example: [FirstName] + " " + [LastName] becomes CONCAT(FirstName, " ", LastName).

Summary

These instructions provide a clear pathway for converting Alteryx functions and logic into Savant. Focus on using CASE for conditional logic, and replace Alteryx-specific functions with Savant equivalents as detailed above. When dealing with strings and dates, ensure that formats and function names align with Savant’s supported operations, documented on the Savant website