Downloading a Dataset in Salesforce Analytics Cloud

When using Salesforce Analytics Cloud there maybe instances where you require to download data held in Salesforce Analytics Cloud. Using the example of the OnTime dataset - which can be found here. Downloading a CSV of a dataset in Salesforce Analytics cloud, can now be done using the Salesforce Dataset Utility.

The Salesforce Dataset Utility can be found here:

The Salesforce Dataset Utility, is a client side tool, with many features and functions to assist with datasets on Salesforce Analytics Cloud. Features include:

1. Uploading Datasets
2. Delete a Dataset
3. Edit Dataset XMD
4. Edit Dataflow JSON

To start Salesforce Dataset Utility , follow the instructions on the tools github page. Found Here:

Once authenticated you will be met with a list of all datasets included in your instance, select which dataset you would like to download, and click on the dataset name.

Once you have selected a dataset ( I have selected OnTime ), You will be met with a default query including a number of columns and 100 rows. To access to look or edit the query that is pulling the data from Salesforce Analytics Cloud, click on the Action Button drop down in the top right hand corner and select "EDIT SAQL".

Once the "Edit SAQL" button is pressed you will see the SAQL Query Editor, allowing you to adjust the query on the page. In order for you to download the dataset all of the columns will need to be included as well as the rows.

In order for you to download the dataset you will need to understand how many rows the dataset has, this can be done by looking at the "count of rows" in the dataset's lens. The maximum number of rows that I have been able to download at once is 75000. Anything above this amount times out, and therefore requires that seperate queries be created to ensure that you can download a complete dataset.

To adjust the number of rows being called at a single time the query limit needs to be adjusted. In this example the query looks like the above Gist, however to download more rows the query needs to be adjusted:


q = limit q 100;


q = limit q 3000;

Once adjusted rerun the query, when the dataset has been queried with the new SAQL limit and the query data has been downloaded locally, it will be presented in the dataset utility app. You can now use the "Export to CSV" button to export the query results to a CSV file.

Below is the results of using a query for 3000 rows on the OnTime dataset and exporting the results to CSV. As you can see in the image below, 3000 rows have been downloaded.