As I mentioned in my previous blog, as part of the preparation for my first placement, I wanted to spend some time going through the basics of Alteryx. Coincidentally, Cohort 4 is also currently learning about Alteryx and getting their Micro and Core Alteryx certifications! (Good job, Cohort 4!!)
Setting Up a Connection
To set up a connection with a file or a database, drag an Input Data tool onto the Canvas:
Once the Input tool is in the canvas, in the configuration window, we will be prompted to connect a file or database:
To connect the file or database, click on “Set Up a Connection”. For now, we won’t change any of the other name and value options. This is because connecting different types of files and databases will provide different name and value options.
When we click “Set Up a Connection”, we will be able to select from a list of Recent Connections:
Once we start making connections using the other tabs, the page will populate with the most recent connections.
The Saved tab will allow us to manage saved connections as well save connections. Saving a connection would be important if we know that certain databases will be constantly referred to and connected to in Alteryx, such as a Microsoft SQL Server:
The Files tab allows us to connect a file in 3 ways:
- Drag and drop file onto the area that says “Drag & drop”
- Click on the blue “Select file”
- Select a file type from the list of supported file types
Notice that there is a tab for Files and a separate tab for Data sources. To connect to a database, go to the Data Sources tab. Here, we will be allowed to select from a list of various databases, with recently or frequently used data sources at the top:
For a detailed list of File Types and Data source types supported by Alteryx, please refer to this Alteryx Documentation!
The last tab is the Server tab. Here, individuals can connect to their client or company’s server and access files across the Alteryx cloud. For example, as part of The Information Lab/The Data School, I will have access to the The Information Lab Alteryx server:
Example: Connecting to an Excel file (.xls/.xlsx)
For this example, I will be using the Sample - Superstore dataset from here. To get started, let’s download it and open up Alteryx!
Drag the Input Data tool onto the canvas.
As a note, if you click off the Input Data tool before setting up the connection, it will show an error as noted with the red exclamation point on the tool as well as the error message in the Results Pane on the bottom:
Don’t panic! This is just because clicking on and off a tool as you’re building the workflow refreshes the workflow and so because we haven’t set up a connection yet, it’s telling us that “a file must be specified”.
From here, click on “Set Up a Connection” in the Configuration Window on the left.
Go to the “Files” tab and choose one of 3 ways to connect a file. For this example, I will click on “Select file” then navigate to my Downloads folder where the Sample - Superstore data I just downloaded is located:
Double-click on the file or click on “Open” to launch the next selection window:
Within the Sample - Superstore workbook, there are three sheets:
- Orders
- People
- Returns
Select the sheet that you want to open, such as the Orders sheet, and click OK. And just like that, we will see the data from the Orders sheet:
However, to have the data imported and showing in the results pane, we will have to click the Run button on the top right corner above the canvas:
Notice how in the results pane, it says that Alteryx is only showing partial results? To view all the data and get a breakdown of the data we just inputted, I recommend attaching a Browse tool to the Input tool:
Now all 9,994 records are showing in the results pane and the configuration window is now showing the unique values within each column as well as the count of these unique values!
What I’ve covered in this blog is only a snippet of the types of connections that can be made in Alteryx. Though we have now gone over how to connect to an Excel file which is a rather common use case, from the different file types and different configurations for the file types to the different types of data source connections, there is much that still needs to be explored. Understanding how to properly input data as well as understanding the configuration options facilitates the analytical process and provides additional possibilities!
Now that we've imported the Sample - Superstore dataset, let's analyze away!
Thanks for reading and until next time!