Analytics

News, events, thought leadership and more.
It's the most wonderful time of the year - Santalytics 2020 is here! This year, Santa's workshop needs the help of the Alteryx Community to help get back on track, so head over to the Group Hub for all the info to get started!
Alteryx
Alteryx

After several years as one of the top ideas on Community, I’m happy to announce the public beta of the Box Connector in the Public Gallery! Looking to get up and running? This is the post for you!

 

1.png

 

First of all, why a Box Connector? For many years, Alteryx Customers have been using Box Sync to interact with their Box Data. While this solution works, it is less than ideal since it requires mirroring data locally, and configuration issues arise when migrating workflows to Alteryx Server.

 

To get around these difficulties, Box provides a robust set of APIs for developers to build on top of. This allows users to interact with their box account, upload files, download files and more with ease.

 

The use of APIs requires setting up an Application in the Developer Console, meaning that you can’t simply sign in using your organization’s SSO credentials. Typically, you are best to partner with your Box administration team to ensure proper setup and access to your files.

 

Since the Box Tools upload and download files to Box, you will want your administrator to create an Enterprise Application:

 

2.png

 

Next, you will have to choose your authentication method, either Standard OAuth 2.0 or OAuth 2.0 with JWT. Both options have pros and cons as described below:

 

1. Standard OAuth 2.0:

 

  1. Manually authenticate via standard OAuth
  2. Authenticate as yourself
  3. Access expires after 1 hour (must re-authenticate)
  4. Not supported on Alteryx Server

 

2. OAuth 2.0 with JWT:

 

  1. Automatically authenticate via a .json credentials file
  2. Authenticate as a service account
  3. Need to store .json in secure location
  4. Supported on Alteryx Server with 2020.3

 

Once your application is created, you can obtain the necessary connection parameters in the Configuration section of the Admin Console.

 

The tools come as a .yxi file. To install, double click on the .yxi to open it in Designer and click install:

 

3.png

 

The install process will install two tools that will be available in the Developer tab in the tool palette:

 

1. Box Input: Reads files from Box into Alteryx

2. Box Output: Writes files from Alteryx to Box

 

When dragging the Box Input or Box Output tool onto the Canvas, you will be asked to select your authentication method in the Drop Down. Your options are Service-to-Service (OAuth 2.0 with JWT) or End User (Standard OAuth 2.0):

 

4.png

 

For Service-to-Service, you will be prompted to provide the file path for your .json credentials to authenticate to box. Your JSON Credentials File [redacted] typically looks something like this:

 

5.png

 

After a successful authentication, your credentials are saved in the workflow XML and encrypted at the machine level:

 

6.png

 

 

For End-User, you will be asked to provide several parameters:

 

7.png

 

 

If you do not know these parameters, you can look them up in the Configuration section for your Application in the Box Developer Console:

 

8.png

 

 

Once authenticated, an interactive file-picker is rendered, allowing you to choose your file. Note that only CSV, JSON, AVRO and Excel are supported.

 

 

9.png

 

 

When uploading a file, you will also have the option to create a new file. Don’t forget to Specify a file extension for your destination file.

 

 

10.png

 

 

Once you select your file, pertinent information, such as File Name and File Id are written to the workflow XML:

 

11.png

 

 

When the workflow is run, a Python Process is kicked off to read/write the data from Box. Under the hood, we are using the Box Python SDK to access the specified Box file as defined in your Workflow XML.

 

For example, the following code downloads your file from Box to Python:

 

12.png

 

 

Afterwards, your file is parsed based on your specified delimiter in the UI:

 

 

13_14.png

 

There you have it! You now have brought data from Box into Alteryx that is now available for downstream processing.

 

 

15.png

 

 

Looking to deploy your workflow on server? This functionality is coming in our upcoming 2020.3 release. Both Designer and Server will need to be on 2020.3. A small change to your server configuration will be required, so please reach out to Customer Support when trying to setup the Box Connector on Server.

 

Comments
Alteryx
Alteryx

Nice!! Thank you Andrew

7 - Meteor

Andrew,

 

Thank you for this.  I am trying to test it using User Authentication.  The CID and Secret are simple copies from the Box admin screen.

 

What are we supposed to use for the Redirect URI? (Since Alteryx is receiving the authentication info, I am not sure what URL to put there).

 

If I use the default (app.box.com), when I click next, I get an authorize screen from Box, it then allows me to see my files, but if I close and run,, I get a error

 

Error: Box Input (2): No access token available. Please authenticate in the UI for End User Authentication

 

Thanks for any help you can provide.

7 - Meteor

One more question.  If using Input Tool, how do we download multiple files with the same shape?  For example *.XLSX?

Alteryx
Alteryx

Hi @WSData 

 

The Box Connector allows one input only. To download multiple files (even with the same shape/schema), you would need to input multiple Box Input connectors.

 

For the Redirect URI, you can simply put a URL that doesn't have an auto-redirect. I use   https://community.alteryx.com/help

Alteryx Certified Partner

Hi @AndrewKramer ,

I'm trying to understand how this works on server.  So any user wanting to use this connector will need to get a CID and Secret then save their workflow to the gallery.  Is the CID and Secret saved into the workflow so basically the workflow is always using the workflow developer's credentials?  

 

 

Alteryx
Alteryx

Hi @Dynamomo, the credentials are encrypted and stored in the Alteryx workflow. Note that for the Box Connector to work on Server, you will need 2020.3 for Designer and Server. There are a few additional server configurations required that support can help with.

Alteryx Certified Partner

@AndrewKramer  - Thanks for your timely response.  Much appreciated!