Cascade Library
  • Introduction
    • Welcome to Cascade
    • Workspaces
  • Getting Started
    • Build Your First Workflow
    • Build Your First Data App
  • Workflows
    • Overview
      • Navigating the Canvas
      • Setting Up
      • Drag and Drop
      • Tools
    • Dynamic Workflows
    • Global Variables
    • Data Locker
    • Scheduling
    • Webhooks
    • Run Logs
    • Workflow Deployment
  • Integrations
    • Connecting Cascade to your database
    • Amazon S3
    • Azure Blob Storage
    • BigQuery
    • Google Sheets
    • MySQL
    • Postgres
    • Redshift
    • SQL Server
    • Snowflake
    • Tableau Server
  • Tools
    • Import
      • Import File
      • Import from Data Locker
      • Import from API
      • Import Sample Data
      • New Table
    • Clean
      • Validate Schema
      • Find/Replace
      • Text to Columns
      • Flatten Json
      • Sample
      • Standardize
      • Validate
    • Transform
      • Edit Columns
      • Select Columns
      • Filter
      • Sort
      • Pivot
      • Unpivot
      • Deduplicate
    • Merge
      • Append
      • Join
      • Multi Join
      • Fuzzy Join
    • Predictive Modeling
      • Build Model
      • Apply Model
      • Correlate
      • ARIMA Forecast
    • Flow
      • Conditional
    • Code
      • Python
      • SQL
    • Visualize
      • Chart
        • Bar
        • Line
        • Combo
        • Scatter
        • Histogram
        • Box
        • Pie
        • Area
        • Funnel
    • Publish
      • Publish to Data Locker
      • Publish via Email
      • Publish to URL
      • Embed
  • Functions & Expressions
    • Functions
      • Aggregate Functions
        • AVERAGE
        • CORR
        • COUNT
        • COUNTD
        • COUNTBY
        • COUNTIF
        • COUNTIFS
        • COVAR
        • COVARP
        • COVARS
        • MAX
        • MEDIAN
        • MIN
        • MAXBY
        • MINBY
        • PERCENTILE
        • STDEV
        • STDEVP
        • STDEVS
        • SUM
        • SUMBY
        • SUMIF
        • VAR
        • VARP
        • VARS
        • RUNNINGTOTALBY
          • SIGN
          • SIN
          • SQRT
          • SQUARE
          • TAN
          • ZN
      • Conversion Functions
        • TIMESTAMPTODATE
        • TODATE
        • TODECIMAL
        • TOINT
      • Date/Time Functions
        • DATEADD
        • DATEDIF
        • DATENAME
        • DATENORMALIZE
        • DATEPART
        • DATETRUNC
        • DAY
        • DAYS
        • HOUR
        • ISDATE
        • ISOWEEKDAY
        • ISOWEEK
        • ISOQUARTER
        • ISOYEAR
        • MAKEDATE
        • MAKEDATETIME
        • MINUTE
        • MONTH
        • NOW
        • QUARTER
        • SECOND
        • TODAY
        • WEEK
        • WEEKDAY
        • YEAR
      • Logical Functions
        • AND
        • BETWEEN
        • CASE
        • CHOOSE
        • CONTAINSWITHIN
        • IF
        • IFS
        • IIF
        • IN
        • IFNULL
        • ISBOOLEAN
        • ISDECIMAL
        • ISDURATION
        • ISINTEGER
        • ISNULL
        • ISNUMBER
        • ISSTRING
        • ISUNIQUE
        • NOT
        • NULL
        • OR
        • SWITCH
        • ALL
          • TOSTRING
        • ANY
      • Math Functions
        • ABS
        • ACOS
        • ASIN
        • ATAN
        • ATAN2
        • CEILING
        • COS
        • COT
        • COSEC
        • DEGREES
        • DIV
        • EVEN
        • EXPONENTIAL
        • FILLINFINITY
        • FLOOR
        • HAVERSINE
        • LOG
        • LN
        • ODD
        • MODULO
        • PERCENTILEOFVALUE
        • PERCENTILEVALUE
        • PI
        • POWER
        • RADIANS
        • RANDOM
        • ROUND
        • SEC
      • Table Functions
        • ENCODE
        • INDEX
        • INDEXBY
        • FILLNULL
        • FIRSTBY
        • GENERATEUNIQUEID
        • LASTBY
        • LOOKUP
        • MATCH
        • NTH
        • OFFSET
        • OFFSETBY
        • PREVIOUSVALUE
        • RANK
        • RANKBY
        • RECORDID
        • ROLLINGAVERAGE
        • ROW
        • RUNNINGAVERAGE
        • RUNNINGMAX
        • RUNNINGMIN
        • RUNNINGSTDEV
        • RUNNINGTOTAL
        • WINDOWAVERAGE
        • WINDOWMAX
        • WINDOWMIN
        • WINDOWCOUNT
        • WINDOWSUM
        • SEQUENCE
        • WINDOWMEDIAN
        • WINDOWSTDEV
        • WINDOWSTDEVP
        • WINDOWSTDEVS
        • WINDOWVAR
        • WINDOWVARP
        • WINDOWVARS
        • WINDOWCORR
        • WINDOWCOVAR
        • WINDOWCOVARP
        • WINDOWCOVARS
        • SMOOTHEDAVERAGE
      • Text Functions
        • ASCII
        • CHAR
        • CONCAT
        • CONTAINS
        • ENDSWITH
        • FIND
        • FINDNTH
        • ISEMPTY
        • JSONPARSE
        • LEFT
        • LENGTH
        • LOWER
        • LTRIM
        • MID
        • PROPER
        • RIGHT
        • RTRIM
        • SPACE
        • SPLIT
        • STARTSWITH
        • TRIM
        • SUBSTITUTE
        • UPPER
    • Building Expressions
      • Expression Operators
      • Guide to Window Functions
  • Cascade FAQs
    • Best Practices
      • 💬How to add a total row to a table
      • 💬How to leave comments on a workflow
      • 💬How to add new columns in the Edit Columns tool
      • 💬Setting up a New Table tool
      • 💬How to rename a tool
    • Knowledge Based
      • 💬How to change Data Types in Cascade
      • 💬How to remove columns from a table in Cascade
      • 💬How to rename columns in Cascade
      • 💬Understanding the Join options in the Cascade Join tool
      • 💬How to connect tools to each other
    • Import
      • 💬How to Import an Excel File into Cascade
      • 💬How to Import a CSV File into Cascade
      • 💬How to import a CSV file into the Data Locker
    • Functions and Expressions
      • 💬How to write an IN() statement with multiple variables
      • 💬How to Remove null Records with a Filter tool
      • 💬How to write an IF Statement in Cascade
      • 💬How to replace null values with 0
    • Troubleshooting
      • ⚠️What does it mean if my workflow won’t load?
      • ⚠️Why can’t I connect my tool to other tools?
      • ⚠️Why are there duplicate records after my Join tool?
  • Change Log
On this page
  • How to Create a Dynamic Workflow
  • Example: Cryptocurrency Prices

Was this helpful?

  1. Workflows

Dynamic Workflows

Isolate and reuse workflow logic with Dynamic Workflows

PreviousToolsNextGlobal Variables

Last updated 2 years ago

Was this helpful?

Building new Cascade workflows can be even easier with Dynamic Workflows. Sometimes workflow tool steps can be repetitive or convoluted within the Canvas. Dynamic Workflows allow you to clean up your canvas by isolating groups of tool steps and placing them in a separate, reusable workflow.

How to Create a Dynamic Workflow

Creating a Dynamic workflow couldn't be easier. Simply scroll to the "Dynamic Workflows" section of your right navigation bar and drag the "Add Dynamic Input" tool onto the canvas. Then connect the dynamic input tool to a sample dataset that looks like the expected datasets for Dynamic workflow.

Pro tip: For your sample dataset, you can use the tool to define the schema and data types that you want in your dynamic workflow.

Once your dynamic input is on the canvas, you can build out the workflow with as many tool steps as necessary. Use any tools available on the canvas after your dynamic input, including additional dynamic workflows. Dynamic workflows can be nested within each other to create multiple levels of dynamic logic.

Note: Be careful not to create circular dependencies within Dynamic Workflows, as they will create never ending loops and your workflow with fail.

When you're done building out the steps of the Dynamic Workflow, drag the "Add Dynamic Output" tool onto the canvas and connect it to your final step. Everything in between the square input and output tools will be run when this Dynamic Workflow is used.

Example: Cryptocurrency Prices

Dynamic Workflows can be valuable in many different use cases, but are especially helpful when trying to cleanup and transform multiple datasets with the same schema.

Below we have an example Dynamic Workflow called "Crypto Avgs". We can see that the Dynamic Input takes in an example cryptocurrency_prices dataset, executes a Validate Schema tool against a template file, transforms the data with a Pivot tool, and finally outputs our new data with the Dynamic Output.

Then, in a New Workflow, we can use the "Crypto Avgs" Dynamic Workflow to transform multiple Crypto_Prices files in just one step each. To access the Dynamic Workflows, scroll down to the "Dynamic Workflows" section in the right navigation bar and click on "Link to Workflow". All deployed Dynamic Workflows will show up in that list. Simply drag out the Dynamic Workflow you want to use and connect it to tool nodes as if it were any other tool.

If you don't see your Dynamic Workflow in the "Link to Workflow" list, it likely has not been deployed yet. Jump back into your Dynamic Workflow and deploy the most recent version and then refresh your New Workflow to see it in the list.

Dynamic Workflows are extremely powerful, but can only be put to use if . When creating or updating workflows while working in "Draft" mode, don't forget to click the orange "Deploy" button in the top right corner of your canvas so that dependent workflows have the most up-to-date logic. If you are working in "Live" mode, your work will automatically be deployed.

Deployed
New Table
Don't forget to Deploy your workflow!
Dynamic Workflow that validates and pivots data
Workflows can use a Dynamic Workflow to complete repetitive transformations in one step