Export to CSV
Users can easily export data from any chart or table they see in the SELECT UI. Just hover over the data you want to export and you'll see a menu with 4 options:
- Download to CSV
- Copy CSV to Clipboard
- Copy TSV to Clipboard (use this option to paste directly in Google Sheets!)
- View SQL (if you have a SELECT data share setup, learn more here)
Data Sharing Feature Overview
Enabling data sharing for your SELECT account is an add-on feature. Please contact SELECT to determine your eligibility and receive a quote.
Once the data share has been enabled, you can hover over any chart or table in SELECT and you will see a little code icon appear in the top left. Copy the SQL code and run it directly in your Snowflake account. You’ll see the exact data used to populate the UI in SELECT!
Setup Instructions
Using the accountadmin
role, run the show shares
SQL command in your account:
You'll see an output that looks like this:

Look for the row where owner_account
is something like SCWXHOB.SELECT_AWS_US_WEST_2_PROVIDER
(the name will vary depending on the cloud/region you are using, but it will have the similar structure of SCWXHOB.SELECT_<cloud provider>_<cloud region>_PROVIDER
). The share name will look like select_scwxhob_ad38017
i.e. select_<your account uuid>
.
Copy and paste the account name and share name from the output above, then create a database in your account for the share:
The generated SQL shown in the demo video above assumes that the database you have created is named select_datashare
. You can name it something else, but the SQL code we generate will not work directly as a result.
By default, this shared database is only accessible to users with the accountadmin
role. You can grant access to other users using the following command:
Querying the data with Python
If you are looking to automate spend reporting within your organization using the data available in SELECT, you can easily do so once the data share has been setup. Once you have copied & modified the relevant SQL query you want to run from the SELECT UI, you can programmatically execute that query and retrieve the results using the Snowflake Python connector.
Example Python Script
Here is an example Python script that shows the end-to-end flow for connecting to Snowflake, executing the query, and retrieving the results as a list of dictionaries:
Here's an example of the result_list
output from above:
Generating a custom date range
Let's imagine you want to report on spend by Snowflake service, and you grab the corresponding query from SELECT's UI:
In the generated SQL, a date range is shown for the period selected in the web UI. For your custom reporting, you'll likely want to change this.
We can accomplish this using the datetime
library from Python
Limitations
- Not all SELECT datasets have been exposed to the data share. Please reach out if you see a dataset that is not present and we will expedite the process of adding it.
- Not all UI elements have the code snippet available as shown in the demo above. If you see a chart/table and would like to access to underlying data but cannot see the corresponding query, please reach out to us.