Queries allow you to aggregate and segment data from multiple tables or spreadsheets based on specific criteria. Versus individual tables and sheets, queries provide a simpler and more robust solution for sharing large datasets between workspaces.
Requirements
- Only workspace owners can share queries.
- To view or run a shared query in the destination workspace, you must have access to all of the query's source data in the source workspace. Alternatively, everyone in the workspace can access a shared query so long as one user has been assigned the Run Remote Queries role.
Share a query from the source workspace
To enable owners of other workspaces to view and run a query, you can share it. When you share a query, any edits must still be made in its native workspace.
- From Wdata Home , hover over the query and select Share from the action menu.
- Open the Select a workspace dropdown menu, and choose a workspace to share the query with.
Note: Only users with access to all of the query's source data will be able to view or run it. To extend access to all users in the shared workspace, assign at least one user the Run Remote Queries role.
- (Optional) To grant access to everyone in the destination workspace, open the dropdown menu next to the newly added workspace and select one of the listed users.
Note: This menu will only show users who have been assigned the Run Remote Queries role in the destination workspace.
- Click Apply Changes to save.
Lock query runs
You can temporarily pause a shared query by opening the three-dot menu on the right side and selecting Lock Query Runs. This lock can be applied to a single workspace, or all of them at once.
Because a locked query can only be run in the source workspace, it's often used when editing a previously shared query or waiting on new data.
Any locked queries will be denoted in the destination workspace by a small padlock icon.
Assign the Run Remote Queries role
The Run Remote Queries role allows a single, assigned user to act as the "mediator" for all query runs in a workspace. In effect, the selected user is granted full access to the query -- and everyone else in the workspace is permitted to run it by "borrowing" their permissions. This means only one mediator is needed for the entire workspace.
To assign this role:
- Log into the destination workspace as the Workspace Owner.
- From the main navigational menu, click the Members iconat the top left.
- Select the user whose credentials will be used to run the query, and click Edit Roles.
- Assign the Run Remote Queries role, and click Apply.
- Save your changes before existing the page.
When sharing queries with this workspace in the future, query owners can select this user from the Run Remote Queries dropdown menu.
Why use the Run Remote Queries role?
This role allows members of a shared workspace to run a query without being a member of the source workspace. It's perfect when dealing with sensitive or confidential information, because the recipients can run the query and see its results without accessing the underlying data.
How do I run a shared query without the Run Remote Queries role?
If this role isn't assigned, then the shared query can only be run when these conditions are met:
- The user has an account in the source workspace.
- The user has access to the query that will be shared, and all of its underlying data.
- The user has an account in the destination workspace.
Run shared queries in the destination workspace
Shared queries work largely the same as the other queries in your workspace. To run a shared query from Wdata Home, do one of the following:
- Hover over the query and select Run Query from its action menu.
- Open the query in "View only" mode and click Run Query at the top left.
Icons, limitations, and other questions
The following icons may appear next to shared queries on the Wdata Home screen:
- A padlock icon = This query is locked in the source workspace, and cannot be run.
- A downward arrow = This query is shared from another workspace.
- An upward arrow = This query is shared with another workspace.
Frequently asked questions
I'm in the source workspace. Why can't I see everyone this query is shared with?
Due to security constraints, you can only view the specific workspaces that you have permission to access. If another workspace owner shares the same query, and you don't have access to the destination workspace, its name will be concealed.
Can I export, modify, or re-share a query that has been shared with me?
No, queries that have been shared with you belong to the original workspace and can't be modified.
Can I create a new query with the shared query as a source?
Not at this time.
Can I share a nested query?
Yes, you can share a nested query across workspaces. The only requirement is that both queries and their source data exist in the destination workspace.
Note: A nested query can't be shared if it relies on a shared source -- see the previous question.
Can I use crosstab with shared queries?
No, crosstab can only be enabled from the source workspace.