Alteryx Metrics Store

Learn best practices, ask questions, and hear the latest about Alteryx Metrics Store.

How to write a Designer Cloud workflow so it imports cleanly to Metrics Store

JohnPelletier
Alteryx Alumni (Retired)

Hi folks,

 

While most people are having fun with Metrics Store and are excited about its value, we have gotten some feedback from a few of our early adopters that when trying to import a Designer Cloud workflow into Metrics Store, they see a 422 error status message in a UI snack bar and also in the diagnostics window, and the workflow won't import.

 

That's actually by design! Metrics Store requires a writing convention in order to properly import a Designer Cloud workflow. It's very simple once you know it, so if you're getting a 422, we'll have you smoothly importing within a few minutes. 

 

When importing a workflow into Metrics Store, there's a certain parsing algorithm that runs and converts your Designer Cloud workflow into a more abstract but more flexible Metrics Store template. During that process, there are a few key conventions we're looking for in the workflow that help us configure the template:

 

  • We need each input tool to have some kind of annotation that distinguishes it from its peer input tools. That's because we want to present it to you in the template format in such a way that you can differentiate one input from the other. So put a clear annotation on your input tool to give yourself and your peers a strong hint about what dataset they should match to it when configuring the next step.
  • We need at least one Summarize tool, with an annotation that begins with "ams://aggregates". That's so we know where to find your metrics and dimensions. You can have more than one, but you must have at least one.
  • We need each special aggregates summarize tool to have at least one GroupBy summarization and at least one arithmetic summarization such as "Average", "Sum", "Mean", "Min", "Max", etc.
    • The columns listed as GroupBy columns becomes your dimensions and the columns listed as arithmetic aggregates become your metrics.
  • We need one output tool configured, even though we will report directly back to our Metrics Store interface at runtime.

 

Pretty simple, once you know it's needed. You might have some of these requirements without even trying.

 

If you see a 422 snack bar message on your screen, open the diagnostics window in your browser and look at the network traffic.

 

You'll see a POST /templates line show up in red and the 422 status shown on that line.

 

If you take a look at the response Preview tab for that POST, you'll see a response that looks like this:

 

JohnPelletier_3-1682465008292.png

In this example the 422 status calls out two errors. 

  1.  There is no summarize tool with an annotation that begins with "ams://aggregates". This is required.
  2.  There are no dimensions found. 

The error message you get might vary depending on how you wrote the workflow. 

 

In the future, we'll be weaving these errors right into the UI to make it easier to know what you were missing in your workflow. Until then, we hope this helps!

 

 

 

 

 

 

0 REPLIES 0