Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Alteryx Designer Cookbook
Alteryx Designer Cookbook

Alteryx Designer Cookbook: Over 60 recipes to transform your data into insights and take your productivity to a new level

eBook
₱1714.98 ₱2449.99
Paperback
₱3061.99
Subscription
Free Trial

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Alteryx Designer Cookbook

Working with Databases

Accessing databases from Alteryx is very simple and fast. And the methods we use for files can apply to databases as well.

But databases have more peculiarities, many of which we, as analysts, cannot change (such as response speed, availability, and design).

Also, we’ll be addressing the basics of Data Connection Manager (DCM), a very useful and powerful feature introduced by Alteryx in version 2021.4, but highly improved in version 2022.1.

DCM is a secure, centralized, single-source administration, storage, and connection-sharing capability for database and cloud interoperability, offering enhanced security improvements (credentials linked to data sources and resolved at runtime).

If you are an administrator within your company, you have probably already identified the huge benefits DCM brings to your job. If you’re not, you’ll realize how easy it is to administer your credentials and connections using DCM once you start using it.

Another powerful feature of Alteryx Designer is the In-Database (In-DB) tools. These tools allow us to perform blending and analysis against large sets of data without moving the data out of the database, providing performance improvements over the traditional methods, since everything is executed within our Database Management System (DBMS) and no traffic along the network is required (very low to no latency).

In this chapter, we’ll be looking at some recipes to improve how we work with databases:

  • Scanning databases dynamically (cursor behavior, but more efficient)
  • Using Alteryx Calgary Databases
  • Creating credentials in DCM
  • Creating connections in DCM
  • Getting information from your In-DB connections/queries

Technical requirements

We created a portable database (using SQLite) as a test set for these recipes, but if you want to try them with your own data, you’ll need to have your connection information and access credentials at hand.

For the Calgary recipe, make sure you have enough free disk space (~2GB) on your computer.

Important note

Even when it’s not required for the recipes, access to Alteryx Server will be needed in case you want to synchronize DCM against your existing enterprise credentials.

Cursor behavior, but more efficient

When working with databases, we call cursor to the process where, for each record of a given table, you need to sequentially scan/read all the records from a second table, in search of a condition.

This process is very useful for some use cases, but it might cause a huge overhead for the database management system and the network. For example, a cell phone provider company has all the data about each call – each IMEI for a period of time – and the marketing department is trying to predict the effects of a certain campaign on some customers.

If we analyze the amount of data produced by each call per phone, it’ll be huge and it’ll take us a lot of time. So, in this case, we probably will extract from the database the data associated with those customers targeted by the campaign first, then analyze it.

For that, we’ll have a first input consisting of the conditions the targeted audience must fulfill, and we use that input data to scan and retrieve each record from the transactional data source (calls in this case) associated with the selected ones.

In this recipe, we’ll learn how to perform a “cursor-like” reading of tables (for each record in one table, read all the records in a second table), using the Dynamic Input tool, avoiding the overhead, and not capturing the database’s server resources.

Getting ready

For this example, we put together a portable database in SQLite that you can download from here:

https://github.com/PacktPublishing/Alteryx-Designer-Cookbook/tree/main/ch2/Recipe1

This set contains a database with three tables:

  • DOCUMENTS: Containing all the information about a company’s billing (~254K records)
  • ARTICLES: Containing a description of each ARTICLE_ID available for the company
  • CUSTOMERS: FIRST, LAST, and EMAIL for each customer
Figure 2.1: Database structure

Figure 2.1: Database structure

The use case will be as follows: we, as a hardware store, need to gather the data corresponding to our top 10 CUSTOMERS from last year and get the top 10 ARTICLES each one bought.

We have DOCUMENTS (billing data) in one table, ARTICLES in another, and CUSTOMERS in a third one.

And our top 10 CUSTOMERS from last year come in an Excel File (DATA\Top10CUSTOMERS2021.xlsx).

How to do it…

We will do so using the following steps:

  1. On a new workflow, drop an Input Data tool and point it to DATA\Top10CUSTOMERS2021.xlsx.
  2. Select the 2021Top10 worksheet in Select Excel Input and click OK.
Figure 2.2: Select Excel Input

Figure 2.2: Select Excel Input

  1. Drop a Dynamic Input tool (from the Developer category) and configure it as follows:
  2. Click on Edit… for the Input Data Source Template option.
Figure 2.3: Dynamic Input tool configuration options

Figure 2.3: Dynamic Input tool configuration options

The Connect a File or Database screen will pop up.

Figure 2.4: Dynamic Input template configuration

Figure 2.4: Dynamic Input template configuration

  1. For the Connect a File or Database option, point it to the SQLite file. When prompted with Choose Table or Specify Query, click on the SQL Editor tab at the top of the window and write this SQL sentence:
    SELECT * FROM DOCUMENTS WHERE CUSTOMER_ID=1234 AND PERIOD=2022

This can be seen here:

Figure 2.5: Dynamic Input template query

Figure 2.5: Dynamic Input template query

As you may notice, there is no CUSTOMER_ID=1234 in the database, but here is where Alteryx Designer will operate its magic.

Once Alteryx validates the query, your template will look like this:

Figure 2.6: Template panel after the configuration

Figure 2.6: Template panel after the configuration

Now, we need to configure the action we want the tool to perform.

  1. Select Modify SQL Query, and click Add on the right of the configuration panel. You’ll be presented with five options. Select SQL: Update WHERE Clause:
Figure 2.7: Modify SQL Query options

Figure 2.7: Modify SQL Query options

A new screen will be shown with pre-populated fields:

Figure 2.8: Configuring the Dynamic Input tool

Figure 2.8: Configuring the Dynamic Input tool

  1. Make sure CUSTOMER_ID=1234 is selected for SQL Clause to Update, Value Type is set to Integer, Text to Replace is 1234 and Replacement Field shows CUSTOMER_ID and click OK.

If you run the workflow, you’ll get all records for 2022 corresponding only to the customer IDs contained in the control file (top 10 buyers from the previous year). From here, you can start the process of getting the top 10 articles bought by each customer, but that will be part of another recipe.

How it works…

When configuring the Dynamic Input tool to any of the Modify SQL Query options, Alteryx Designer will read all the conditions within the query and will replace the parts you indicated within your selections. In this case, since SQL: Update WHERE Clause was selected, Alteryx will modify only the part corresponding to the WHERE CUSTOMER_ID = 1234 part.

For the second part of the clause (PERIOD=2022), since we didn’t select any modifier for it, it’ll remain untouched.

The amazing part is that Alteryx Designer will execute one straight query per record coming from the Input Data tool, so, instead of having a cursor scanning the database per record in the input file (a single process from start to finish), there’ll be N individual queries running one after the other, causing the release of resources in the DBMS after each query.

Figure 2.9: Multiple queries executed from just one tool

Figure 2.9: Multiple queries executed from just one tool

There’s more…

Of course, you can combine multiple WHERE statements, and replace the part you need with incoming data every time you have to.

But, if you look at Figure 2.7, you have other options to make your database queries dynamic, such as replacing strings in queries, which can be very helpful for executing queries along different tables:

SELECT * FROM "TABLE" WHERE XXXX

You can set up a rule to indicate the tables you want to query, and in the WHERE clause, the conditions to query those tables, and all can be dynamic.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Acquire the skills necessary to perform analytics operations like an expert
  • Discover hidden trends and insights in your data from various sources to make accurate predictions
  • Reduce the time and effort required to derive insights from your data
  • Purchase of the print or Kindle book includes a free eBook in the PDF format

Description

Alteryx allows you to create data manipulation and analytic workflows with a simple, easy-to-use, code-free UI, and perform fast-executing workflows, offering multiple ways to achieve the same results. The Alteryx Designer Cookbook is a comprehensive guide to maximizing your Alteryx skills and determining the best ways to perform data operations This book's recipes will guide you through an analyst's complete journey, covering all aspects of the data life cycle. The first set of chapters will teach you how to read data from various sources to obtain reports and pass it through the required adjustment operations for analysis. After an explanation of the Alteryx platform components with a particular focus on Alteryx Designer, you’ll be taken on a tour of what and how you can accomplish by using this tool. Along the way, you’ll learn best practices and design patterns. The book also covers real-world examples to help you apply your understanding of the features in Alteryx to practical scenarios By the end of this book, you’ll have enhanced your proficiency with Alteryx Designer and an improved ability to execute tasks within the tool efficiently

Who is this book for?

This book is for data analysts, data professionals, and business intelligence professionals seeking to harness the full potential of the tool. A basic understanding of Alteryx Designer and Alteryx terminology, including macros, apps, and workflows, is all you need to get started with this book.

What you will learn

  • Speed up the cleansing, data preparing, and shaping process
  • Perform operations and transformations on the data to suit your needs
  • Blend different types of data sources for analysis
  • Pivot and un-pivot the data for easy manipulation
  • Perform aggregations and calculations on the data
  • Encapsulate reusable logic into macros
  • Develop high-quality, data-driven reports to improve consistency

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Oct 31, 2023
Length: 740 pages
Edition : 1st
Language : English
ISBN-13 : 9781804615089
Vendor :
Alteryx
Category :
Concepts :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Oct 31, 2023
Length: 740 pages
Edition : 1st
Language : English
ISBN-13 : 9781804615089
Vendor :
Alteryx
Category :
Concepts :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just ₱260 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just ₱260 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 8,165.97
Alteryx Designer Cookbook
₱3061.99
Data Modeling with Snowflake
₱2551.99
Mastering Tableau 2023
₱2551.99
Total 8,165.97 Stars icon

Table of Contents

16 Chapters
Chapter 1: Inputting Data from Files Chevron down icon Chevron up icon
Chapter 2: Working with Databases Chevron down icon Chevron up icon
Chapter 3: Preparing Data Chevron down icon Chevron up icon
Chapter 4: Transforming Data Chevron down icon Chevron up icon
Chapter 5: Data Parsing Chevron down icon Chevron up icon
Chapter 6: Grouping Data Chevron down icon Chevron up icon
Chapter 7: Blending and Merging Datasets Chevron down icon Chevron up icon
Chapter 8: Aggregating Data Chevron down icon Chevron up icon
Chapter 9: Dynamic Operations Chevron down icon Chevron up icon
Chapter 10: Macros and Apps Chevron down icon Chevron up icon
Chapter 11: Downloads, APIs, and Web Services Chevron down icon Chevron up icon
Chapter 12: Developer Tools Chevron down icon Chevron up icon
Chapter 13: Reporting with Alteryx Chevron down icon Chevron up icon
Chapter 14: Outputting Data Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.9
(10 Ratings)
5 star 90%
4 star 10%
3 star 0%
2 star 0%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




Gary Gruccio Jan 27, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I’ve used Alteryx for over 15 years and still learned something new! Comprehensive guide to building many process in Alteryx. Supplemented by downloadable files and workflows.
Amazon Verified review Amazon
Chamoddinu Feb 29, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I recently had the pleasure of exploring the Alteryx Designer Cookbook, and I must say, it exceeded my expectations. As someone who wanted to learn Alteryx from scratch, this book was an absolute gem. The author has done a fantastic job of breaking down complex concepts into easily digestible chunks, making it incredibly easy to grasp the tools and functionalities of Alteryx.What I particularly appreciated about this book was its hands-on approach. Not only does it provide clear explanations of each tool, but it also offers practical examples and exercises that allow readers to apply what they've learned in real-world scenarios. This interactive learning style was instrumental in helping me gain confidence in using Alteryx effectively.Whether you're a beginner or someone looking to sharpen their skills, this book caters to all levels of expertise. The step-by-step tutorials are accompanied by clear screenshots and illustrations, making it a breeze to follow along. Additionally, the layout and organization of the content are top-notch, making it easy to navigate and reference back to specific topics as needed.In conclusion, the Alteryx Designer Cookbook is a must-have resource for anyone looking to master Alteryx. With its user-friendly approach and practical exercises, it's the perfect companion for anyone looking to unlock the full potential of this powerful tool. Highly recommended!
Amazon Verified review Amazon
Hoang Le Nov 10, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
The book is easy to read and follow because the author describes the goal clearly in the beginning and shows the instruction step-by-step. In each part, the author usually splits into 3 parts: Getting Ready, How to do it and How it works. In the "Getting Ready" part, the author shows the goal what the user could get and how to prepare, set up the file, load it into Alteryx Designer. In the "How to do it" part, the author will show the instruction step-by-step with screenshots from Alteryx. It’s very easy to follow. In the "How it works" part, the author notes some advice, and important notes after the topic. I really like that structure. It helps the user keep track from beginning to the end of the book. In the first chapter for inputing the file in Alteryx, it’s difficult for some beginners when they don’t understand what is macro. But I understand that the author would like to show in special cases, the user could use the macro to input the files. Overall, this is a good book about Alteryx Designer for people who are new to Alteryx or people who don't have programming background. The book includes all important topics in cleaning and preparing data. This book would be very helpful in the data analytics journey.
Amazon Verified review Amazon
Kindle Customer Nov 29, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Alberto's new book is a gem!As the title suggests it focusses on easy-to-follow recipes for common challenges faced by Alteryx users, and also provides new and advanced concepts for those who are more experienced in Alteryx. For example - if you are starting out and need to work with multiple different sheets in Excel (one of the most common questions for new users); or produce formatted reports - this book has you covered. Additionally - if you are more advanced and want to work with paged APIs; dynamically update your workflows through XML editing; or create logging on your data pipelines - there's content in there for you too.This is a thoughtful and practical book that is clearly borne of Alberto's deep experience in doing this work for and with clients, and building solutions that were previously thought impossible.
Amazon Verified review Amazon
H2N Nov 12, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book is a must-read for data professionals seeking to enhance their skills in Alteryx Designer. Covering 14 chapters, it's an invaluable resource for business intelligence experts, data analysts, and data scientists. The guide provides comprehensive techniques for data manipulation, from inputting various file types to working effectively with databases. It delves into transforming unstructured data, data parsing, grouping, blending, and merging, along with introducing dynamic operations, macros, and applications for streamlined workflows. Additionally, it explores leveraging cloud services, developer tools for tackling data challenges, and effective strategies for data reporting and output. This book is a compact yet rich source of practical insights for mastering Alteryx Designer and data analytics.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.