This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
Connecting to Google Analytics is becoming more and more popular. There are a few things you need in order to use the Google Analytics macro; a Google Account (e.g., Gmail) and authorized access to an existing Google Analytics account. This article will help you get the rest of the way.
When using the download tool with an SFTP or HTTPS connection, you may receive the error - Error transferring data: failed initialization. This often occurs when Designer can't agree on a cipher suite to communicate with the host server.
If the API that you are working with requires you to sign or authenticate your requests, it may utilize an implementation of OAuth 2.0 or another authentication method to show that you have the access needed to consume the web service. There are some key words that you can look for in the API documentation that you are using that will help you quickly choose the appropriate grant flow to use in Alteryx.
Now you are ready to take your workflow one step further and add some error checking. If something is wrong with your request or something goes wrong on the server, an API will usually return an error message. It is useful to capture this information and clearly display it to the user of the connector. The Message tool will come in handy here. It will help you to troubleshoot the error and actually stop the workflow from processing if you would like.
Web scraping, the process of extracting information (usually tabulated) from websites, is an extremely useful approach to still gather web-hosted data that isn’t supplied via APIs. In many cases, if the data you are looking for is stand-alone or captured completely on one page (no need for dynamic API queries), it is even faster than developing direct API connections to collect.
API connections give access to many web-based applications, database systems, or programs by exposing objects or actions to a developer in an abstracted format that can easily be integrated into another program.
To do your best data blending, it is a critical need to have the flexibility to connect to as many data stores as possible. No puzzle reveals a complete picture without all the pieces in place, and the same adage holds true in analytics. While we’re proud to boast a list of supported input file formats and data platforms that may even be large enough for database storage itself, unfortunately, in the ever expanding world of data you just can’t catch them all. Enter the Download Tool . In addition to FTP access, this tool can web scrape or transfer data via API (check your data source – there’s almost always an API!), giving you access to even the most secluded data stores. With the examples compiled below, and the wealth of data accessible on the web, you can turn nearly any analytical puzzle into the Mona Lisa :
The following steps detail how to obtain a client ID, client secret, and refresh token that can be used for authentication with Google related tools.
1. Open the Google Developers' Console
2. Login with the Google account associated with the data you would like to analyze
3. Create a new project by clicking the My Project dropdown (top-left corner) and selecting Create project (top-right corner of the pop up
4. Enter a Project name of your choosing and click Create
5. If you have not already enabled the Google API you will be working with, you can do so by navigating back to the webpage we started on, the Console Dashboard, and clicking Enable API:
For Google Analytics:
Other popular APIs >> Analytics API
For Google Drive:
G Suite APIs >> Drive API
6. After you've confirmed that your API is enabled you can obtain API credentials by returning to the Console and clicking on Credentials in the left-hand navigation pane next to the key icon
7. Click on the Create Credentials dropdown and select OAuth client ID:
8. Select the Web application radio button and add https://developers.google.com/oauthplayground as an Authorized redirect URI before clicking Create
9. At this stage, a pop up should appear where you can copy and save your Client ID and Client Secret
You can also find your Client ID and Client Secret by returning to the Developer's Console >> Credentials and clicking the name of the app we just created:
10. Go to https://developers.google.com/oauthplayground
11. Click on the gear icon in the top-right corner of the page and click the checkbox for Use your own OAuth credentials, enter the client ID and client secret from step 13, and click close
12. Copy/paste the respective scopes into the Input your own scopes field and click Authorize APIs
For Google Analytics
For Google Sheets
https://www.googleapis.com/auth/drive, https://www.googleapis.com/auth/drive.appdata, https://www.googleapis.com/auth/drive.readonly, etc
14. Click Allow
15. Click Exchange authorization code for tokens and save the Refresh token
16. Test the authorization by sending a request for an available operation from List possible operations
17. If successful, the client ID, client secret, and refresh token that you obtained in the prior steps can now be used for authentication with the Google related tools
The error above is usually due to a company firewall restriction. If you are receiving the error above when installing, please download run the individual installers from this page: http://downloads.alteryx.com. You can choose admin or non-admin depending on the permissions on your machine.
If you are still having trouble downloading, don't hesitate to open a Support ticket through the Case Portal.
In a workflow, not too far, far away...
Structured data has vanished. In its absence, the sinister Dirty Data Order has risen from the ashes of the Server and will not rest until Data Analytics have been destroyed.
With the support of the Alteryx Engineers, Solutions Engineer Tony Moses leads a brave RESISTANCE. He is desperate to find structured data and gain its help in restoring blending, joining and analytics to the galaxy.
Tony has sent his most daring Community Leader, Matt DeSimone, on a secret mission to Jakku, where an old ally has discovered a clue to the structured data whereabouts....
Welcome to the Star Wars universe!
Ever wanted to know the most important details of your favorite characters from Star Wars? Me too!
Our generous friends, Paul Hallett and team, have given us the Star Wars API - the world's first quantified and programmatically-accessible store of Star Wars data.
After hours of watching films and trawling through content online, Paul presents us all the People, Films, Species, Starships, Vehicles and Planets from Star Wars.
The data is formatted in JSON and has exposed it to us in a REST implementation that allows us to programmatically collect and measure the data.
Now, how was I able to retrieve this treasure of information via Alteryx? Easy! I've built a REST API connection using the Download Tool to pull information based on a user inputted query in an Alteryx Application (attached as v2018.1 Star Wars.yxwz).
Normally, once having retrieved JSON formatted data, structuring and parsing the data would be a nightmare! With Alteryx, this is just one tool away. The JSON Parse Tool allows you to identify the JSON field, in this case our download data field, and easily extract Name and Value columns. From there it's some simple formatting and using the reporting tools to present us a nice clean composers file (pcxml).
Man, if only the Rebels could process information as fast as Alteryx then they wouldn't have had to send poor R2 to find Obi Wan.
I'll be bringing you, the Alteryx Community, updates of the app with each new movie release!
I hope you enjoy the API and may the Force be with you!
If you haven’t used the Run Command Tool just yet, that’s great. It means that whatever your analyses required, we had it covered with basic Designer functionality. But in spite of how great the Designer is, it just can’t do everything. There is a utility on your computer that can do just about anything, however, and it’s the command line . The Run Command Tool pairs the two into a dynamic tag-team duo that can wrestle all the computation you could need into one, integrated, Designer workflow:
Question Does Alteryx support web crawling?
Yes. In Alteryx you can look at a web page, find embedded links (e.g. using regular expressions), and add to a queue of "links to visit". Then continue visiting/adding indefinitely, while also extracting various other tidbits of interest from each page visited.
In a Text Input Tool, enter URLs to crawl. Alteryx can take the URLs from a data stream (a database where we have all of the URLs we want to crawl) and iteratively repeat the process of connecting and getting the code beneath that URL:
Use the Download Tool and point it to a web address:
Alteryx returns the whole content available for that URL:
The attached v10.0 workflow allows you to connect to wikipedia and "crawl" the content of that URL. It can be saved, parsed etc. Additional functionality may be added to create a very powerful crawling engine.
Topics discussed below:
Currency Field Formatting
Currency Field Formatting - Strings to Doubles
We often get a lot of questions from new users about how to convert fields with currency formats to doubles and vice versa. If you have currency fields in your data that come in to Alteryx with the currency format (ex: $1,354.00) and you want to perform any kind of numeric calculations, you must convert these fields to numeric fields (i.e.: Double, FixedDecimal, Int 32 etc…). For more information on data types click here.
There are a couple ways to convert this string format to a numeric format. Below I will demonstrate two ways: one is using the formula tool, the other is using the multi-field formula tool. Both are similar but one is a bit more flexible than the other.
Using the Formula Tool:
If you’re using the formula tool you must make a new field for the converted string. Make sure the type is numeric, I usually go with Double. Then use the formula shown below. The first part of the expression will replace the $ and comma with empty strings. While ToNumber() will change it to a number.
Using Multi-Field Formula:
Using the multi-field formula is very similar to the formula tool. In this tool we can specify multiple fields if we so choose. Also we don’t have to make a new field. We can actually change the ones we already have. In the configuration, make sure you have “Text” fields pop up in the selection window and select the fields you want to change. The formula in this case is exactly the same except you use [_CurrentField_] as your field variable. This variable will run through the expression for all fields that you selected at the top.
Currency Field Formatting - Doubles to Strings
After you have done your calculations and you want this back into currency format you can simply use this expression in your formula tool:
'$'+ToString([FieldName], 2, 1)
More info about this formula here.
Now on to a fun topic: Currency Conversion
For those who gather data that comes in as a different currency than what they want in their reports could always look at conversion rates manually and do the math themselves (using Alteryx of course). The only problem with that is it becomes tedious and currency conversion rates change all the time. The best way to get this real time data is to do an API call to a website which offers this data in real time.
The workflow I have attached has a macro that I have built (version 10.6), which allows a user to choose the currency their field is in with a dropdown interface and convert it to a different currency. This macro uses the xe.com free API to get currency conversion rates in real time.
The base URL we make for this request is http://www.xe.com/currencyconverter/convert/?Amount=1&From=”FROM”&To=”TO”
The “FROM” and “TO” will change when the user chooses the currencies. After that happens, these will get replaced with the currency’s ISO 4217 code and the download tool will gather all information pertaining to that URL. After some parsing, we obtain the currency conversion rate and place it into its own field, from which we use to calculate our new currency.
To learn about APIs and how to connect to them using Alteryx. I would check out this article.
Tab 1 - Basic
URL : The URL for the resource you are trying to access must come from an upstream tool and is the only field required by Alteryx to configure the Download tool. Based on the API you are trying to pull information from (or send data to), other information will be required such as headers and/or a payload.