An experiment in streaming data into Alteryx
This and the related codebases contain experimental code to prove whether the idea works. The code is ugly and may contain many unhandled edge cases. Don't use in production. If I were to someday put these tools into production, I would rebuild the codebases from the ground up using proper coding techniques.
- Clone this repository to your local machine
- Navigate to the repository root folder.
- Run makeStreamerLinks.bat as an administrator. This creates symbolic links in C:\ProgramData\Alteryx\Tools that point to the cloned repository. This allows Alteryx to load the tools normally while at the same time allowing the code to remain packaged in the repository.
- The streamer tools require 5 non-standard Python packages. I installed them directly into Alteryx's Miniconda installation. They are listed in the requirements.txt file in the root of the repository.
- Download and install RabbitMQ using standard ports.
- Download the Avocado webserver and unzip to a folder of your choosing.
- Run alteryx_streams_server.exe
- Download the Avocado workflow
- Run the Avocado workflow
- Open your browser and navigate to http://localhost:35014
- Type in any valid query and click 'Query Alteryx'. The result should appear between the query and the button. See the 'Things you should know about the Avocado query' section below.
- Conquer the Avocado industry
- Because this is a proof-of-concept, I did not re-create all of the functions available in Alteryx. The normal operators are available, as are the Min, Max, and POW functions.
- Function and field names are case sensitive (Min, not MIN, and POW, not pow)
- You can use
IF THEN ELSE ENDIF
andIF THEN ELSEIF ELSE ENDIF
statements, just like in Alteryx. - Use the
[Calc]
field to refer to the prior calculated value.
Calculate the total sales volume in the file:
[Calc] + [Total Volume]
Calculate the total sales value in the file:
[Calc] + ([Total Volume] * [AveragePrice])
Calculate the total sales value for 2018:
IF [year] = '2018' THEN [Calc] + ([Total Volume] * [AveragePrice]) ELSE [Calc] ENDIF
Calculate max price:
Max([Calc], [AveragePrice])