Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Engine Works

Under the hood of Alteryx: tips, tricks and how-tos.
hli2007
Alteryx
Alteryx

by Henan Li (@hli2007), Philipp Maier (@pmaier1971), Minh Nguyen (@MinhLO)

 

In the realm of data analytics and workflow automation, citizen developers still need to adhere to compliance standards and best practices. Ensuring an organization’s Alteryx workflows align with compliance standards and best practices can be a daunting task, especially as workflows become increasingly complex. Wouldn’t it be great if there was a simple way for users themselves to check if their workflows adhere to best practices and meet Enterprise standards?

 

Inspired by a client conversation, this post proposed a way to implement automated check for workflows. The methodology is simple, extendable and usage scalable, and the resulting application can be run on a server and made accessible to all users. This provides a simple and efficient way to maintain compliance and mitigate potential risks of Alteryx workflows by implementing automated checks for Alteryx workflows.

 

What are Automated Checks for Workflows?

 

Best-practice guides or Alteryx standards are a series of guidelines, best practices and conventions that Alteryx workflow builders should follow. While likely exhibiting some commonality, they can vary by industry, or even with clients (e.g. HR may have different workflow standards than marketing).

 

Automated Checks allow users to validate their Alteryx workflows to ensure compliance and adherence to best practices. By designing a series of tests and checks, this application provides users with an ability to validate their workflow during the building and deployment phase. Because tests can be flexible and feedback can be customized, these tests also help Centers of Excellence to provide helpful context and guide users to take corrective actions if tests fail.

 

Why use Automated Checks?

 

The benefits of automated checks are manifold:

 

  • Risk Mitigation: Proactively identifying and addressing non-compliance issues within workflows mitigates the risk of errors, data breaches, and regulatory violations. Automated checks serve as an early warning system, alerting users to potential issues, and enabling timely corrective action.

 

  • Cost Reduction: Automation streamlines the validation process, saving time and effort that would otherwise be spent on manual inspection. By integrating automated checks into the workflow development lifecycle, organizations optimize resource utilization and accelerate time-to-insight.

 

  • Compliance Assurance: Automated checks provide a robust mechanism for verifying that Alteryx workflows comply with relevant regulations and internal policies. From ensuring the presence of essential metadata to validating data handling practices, these checks help mitigate compliance risks and maintain data integrity.

 

  • Best Practice Enforcement: By enforcing best practices within Alteryx workflows, automated checks promote consistency, maintainability, and efficiency. Users are guided to avoid deprecated tools, adhere to naming conventions, and adopt standardized practices, thereby enhancing workflow quality and reliability.

 

What are the Key Steps to Consider for Implementing Automated Checks?

 

Implementing automated checks for Alteryx workflows involves the following steps:

 

  1. Define Tests: Establish a set of audit tests based on compliance standards, best practices, and organizational requirements. These tests may include verifying the presence of workflow metadata, identifying deprecated tools, usage of specific data sources, or validating standardized practices.
  2. Develop a Validation Workflow: Develop a validation workflow tailored to execute audit tests and evaluate workflow compliance. This should assess workflows against predefined criteria and provide guidance on corrective actions for failed tests.
  3. Integrate with Workflow Development: Integrate automated validation checks into the workflow development process to ensure continuous compliance monitoring. Incorporating checks into development pipelines enables proactive validation of workflows before production deployment.
  4. Monitor and Improve: Continuously monitor the effectiveness of automated checks and refine audit tests as needed. Solicit feedback from users to identify areas for improvement and enhance compliance enforcement over time.

 

How can You Get Started?

 

We have attached a sample workflow for you to get started. In this workflow, we have predefined 4 audit tests (see below) can be customized – plus, the workflow is extendable, so it’s easy to define and add your own tests based your organizational requirements.

       

Blogpicture1.png

 

Below are the steps to set up the workflow.

 

  1. Download and install the Workflow XML Parser Macro (https://marketplace.alteryx.com/en-US/apps/444941)
  2. Identify the location of DefaultSetting.xml file to configure the list of deprecated tools (refer to this link for more information)

 

updated.png

 

 

  1. Run the workflow as an analytics app and select a workflow to perform automated checks. blogpicture3.png

     

  2. Run the workflow to get a workflow assessment

 

The report below shows a list of failed tests. Feedback on the list can be customized in the workflow.

 

blogpicture4.png

 

How Can Add I My Own Tests?

 

At the core of the workflow is the “Convert to XML” container. This is where workflows are dynamically read in and parsed. The resulting output breaks down the tool configuration, connections and annotations. Most of the columns are self-explanatory and can easily be parsed.

 

This is the basis for designing tests. As an example, let’s look at the test if the workflow contains a “Select *” statement in SQL (which is likely a sign that the workflow is not selective in retrieving data). This is the 4th test in the sample workflow; found in workflow container “#4”. The test parses the data and filters the “DesignerToolName” column on all data ingestion (and output) tools, as well as the “ToolValue” column – which contains the configuration details – on “select *”. Rows that match the filter are retained, and a new “Test” column is added to the output to classify the failed test. Then, the rest of the workflow is some basic report building and preparing a report.

 

How does this integrate into the end-to-end process?

 

Automated Checks can easily be integrated into the end-to-end Alteryx Governance lifecycle. The key to success is to provide users with easy options to perform automated checks and remediate findings before pushing the workflow to a production environment. We can think of several models:

 

  • One option is for business team or center of excellence to design the tests centrally and making them available as application to all. This way Alteryx users to test their own workflow during the final stages for the development process or before they flag them as ready for a production environment. Additional tests can be added based on observed user behavior; for instance, if new best practices emerge, they can be added to the test suite.
  • An alternative option is to run the test on the server automatically when a new workflow is uploaded to the server. This would require turning the application into an Alteryx workflow to monitoring the server, download the workflow and then run the tests.

 

By systematically evaluating workflows against predefined criteria and guiding users to take corrective actions, automated checks enable organizations to mitigate risks, enhance operational efficiency, and maintain compliance with confidence. Embracing automation empowers data professionals to unlock the full potential of Alteryx while upholding the highest standards of data integrity and governance.

 

Have ideas for additional tests? Please post them in the comments below!

Comments
KGT
11 - Bolide

This is great! Any resource that assists with governance is something I click on. A lot of the checks in this article are around governance of workflow development and the ones I have below are probably one level down, in workflow process checks and more designated to a process, rather than all workflows.

 

  • In one of our processes, we build manually created transformations for client data that then feed into the next set of workflows (which are mostly standard). One test that I set up is a macro to put at the end of those transformation workflows to report on the fields. It has a list of standard fields (about 60 of them) and we know that different clients are going to need extra fields at times. The macro just reports which fields are non-standard and which standard fields are missing. It could be configured to stop everything if it doesn't match, but I just have a report output to inform the developer. It could also be configured to output a log file to our network drive so that I could collate the extra fields and work out if standards need to change...
  • I will also often parse the XML's on our network drive to see if there are tools that need to be replaced, such as Data Cleansing tools in production. (Very heavy processing and often used to just trim spaces).
  • Record Count checks are also often used on our workflows, with CountRecords/Union/Test. I'll sometimes put these on Joins to make sure L Input = L Output + Join if there are no expected duplicates. I've built macros for that join test several times but then lose them as it's an ad-hoc test.
hli2007
Alteryx
Alteryx

@KGT Thanks for your feedback and great to hear that you have implemented checks within workflows. 

ruhiparveen03
5 - Atom

Thanks for sharing this

jreineck01
6 - Meteoroid

(@hli2007);  (@pmaier1971),

 

Henan, when I read the article I had flash backs from our 2020 Autodocumentation project. We've taken this same concept a bit further by building out two versions: one version that builds a comprehensive PDF file with metadata information on every tool in the workflow (including expressions, selection fields, etc.) and a second version similar to the one posted here.

 

I recommend for folks to take this version one step further and automate the authentication so the workflow runs on the Gallery. You can use the Admin Key and Secret Key to authenticate then based on user running the workflow, perform the review on all of the workbooks they own or allow them to pick a specific workbook of theirs from a dropdown list (self-serve).

 

I have won two automation awards as a result of that 2020 project (I work at one of the largest banks in the nation). Henan, you share in the project success as you were the one who challenged me to work on the solution (it was a great COVID project).

hli2007
Alteryx
Alteryx

@jreineck01 John - it was great to hear from you.:)