Saved queries can be used to create, share, and manage queries, so that everyone on a team has access to the same information for their analyses. To create a saved query, select the “Saved Queries” listing on the left hand side of the main screen and click on “Create a Saved Query.” (You can also create a saved query from an existing query in a workbook, by clicking on the "..." dropdown.)
Next, you’ll connect to a datasource and write your query - just as you would in a new workbook. You can select “Preview Query” to review the output, and can even create calculated columns in the previewer.
When ready, give your query a name at the top. If you select the icon adjacent to the title, you can add descriptive text about the query. For instance, the “Customer Payment Information” query could be described as “All active customer payment details (excludes cancellations).” Then click “Create.”
Note: You can update this query at any time by clicking on “Publish Changes,” and the modifications will be applied automatically to anyone who has used the query.
To share a saved query, select the “Share” button in the upper right corner of your screen. You have two choices here, "Run" and "Edit" sharing. "Run" allows a user to execute the saved query but does not give the user any editing access to the saved query, nor visibility into the written command. "Edit" allows a user to make changes to the underlying query and allows them to view the saved query edit and preview console.
To use a saved query, open a new workbook or sheet and click on the “Connections” button. Scrolling down, you’ll see saved queries listed. Clicking on the query and selecting “Connect” will magically pull the data into your workbook.
1. What if I share a query with someone who doesn't have access to the datasource?
If you share a query with a user in "run" mode, they will be able to view the output of the query regardless of whether or not they have access to the datasource. They will not be able to modify the query in any way or view any additional information stored in the database.
If you share a query with a user in "edit" mode, they will be granted access to the underlying database.
2. What if I want to remove a user from a saved query?
You can revoke access to a saved query, which will remove datasource access if the user previously had edit access to the saved query. Revoking access to a saved query will also remove any query runs from this database from all sheets they have access to.
3. Will users be able to modify calculated columns in the saved query?
No - the calculated columns created in the saved query previewer will appear as results only fields (in purple) when pulled into a workbook.