Why Prophecy is more efficient
Prophecy enables pipeline performance optimization in the following ways:- You can fine-tune pipeline performance by changing elements that result in SQL queries. To minimize resource usage, reduce unnecessary joins, filter early, and use window functions strategically. These techniques help improve execution speed and lower computing costs.
- Prophecy runs on scalable cloud infrastructure. This allows you to take advantage of distributed computing and built-in optimizations that aren’t available in local Alteryx environments, and results in faster processing and better resource utilization.
Compute dates
Assume your Alteryx workflow contains a Formula tool that computes the beginning and end dates of a quarter:Solution
If you use Databricks as your SQL provider, you can use thedate_tunc function to simplify your date calculation. Update the expression in your Reformat gem with the following:
Calculate row value
Assume your Alteryx workflow contains a Multi-Row Formula tool that calculates the value of theid field by adding 10 to the previous row’s id value:
Solution
To make this more efficient, use a WindowFunction and Reformat gem for SQL can execute the partitions in parallel:-
Insert a WindowFunction gem.
- Open the gem.
- Navigate to the Order By tab.
- In the Order Columns field, type
lit(1). - Navigate to the Window Use tab.
- In the Target Column, enter
row_number. - In the Source Expression, enter
row_number().
-
Insert a Reformat gem.
- Open the gem.
- In the Target Column, enter
id. - In the Expression, enter
lit("row_number") * 10.

