Query Gallery in Google Sheets Add-on
When you need to reuse the same query in multiple Google Sheets workbooks or just want to store it somewhere for future use, you can save your query to the Skyvia Query Gallery. These saved queries are stored in Skyvia (not in Google Sheets) and are available both from Skyvia and from Skyvia Query Google Sheets Add-on.
In addition to your own queries, Query Gallery stores a number of predefined public queries to different data sources. With public queries you can automate most common query tasks using predefined templates in just a few clicks.
Saving Query for Future Use
To save your query for future use, perform the following steps:
Click Save in the Query Editor. If you use an already saved query, you may then click Save to overwrite it or Save As to save the current query under a new name.
Enter the query name in the Name box.
Optionally specify a description for the query in the Description box.
Query Gallery User Interface Elements
The topmost Query Gallery part contains the Workspace drop-down list. It displays accounts you have or were invited to and workspaces, which belong to these accounts and you have rights to work with. Please note you need to select a workspace you want to work with.
Below there are two other drop-down lists, which help you arrange queries the way you need.
In the drop-down list on the left, you can select how you want to display the stored queries. You can display them grouped by data sources, by connections or you can choose to show all queries ungrouped. To quickly find a necessary query in the list, select No grouping from the drop-down list and type part of query name in the Search box.
In the drop-down list on the right, you can choose either to display only private queries in the Query Gallery window or display all queries — private and public ones together.
Brief Description of Elements
Grouping by Sources
The stored queries are grouped by data source they query data from. When you select Group by Sources option from the drop-down list, data sources, for which there are stored queries in the gallery, are displayed. After you click a certain data source, it displays a list of queries available for this data source (public and private queries). The list header will display the data source you have clicked.
To navigate back to the list of data sources, click the button in the data source header.
Grouping by Connections
The stored queries are grouped by connections they use. When you select Group by Connections option from the drop-down list, connections, for which there are stored queries in the gallery, are displayed. After you click a certain connection, it displays a list of queries created with this connection. The list header will display the name of the connection you have clicked.
To navigate back to the list of connections, click the button in the connection header.
This option does not display queries saved without the connection information (with the Save connection reference checkbox not selected).
All the stored queries without grouping are displayed here. When you select No grouping option from the drop-down list, all public and privately created queries are displayed here at once. When you select other options from the drop-down list, you need to click a data source or connection and only afterwards queries will be displayed.
You can enter part of a query name to the Search box to quickly find the necessary query.
Click a query in the list to display its details in the Gallery.
Running, Editing, or Deleting Queries
When you open a query in the Gallery, Skyvia displays its name, description, and connection. Skyvia also displays the query parameters, if any, allowing you to configure their types and set their values without opening the query in the query editor.
You can select another connection for your query in the Connection drop-down list, run the query, open it for editing, or delete it from the Gallery by clicking Run, Edit, or Delete button, respectively, at the bottom of the Gallery.
You can also open it on Skyvia by clicking the Open Query in Skyvia button in the Gallery header.
Skyvia offers a number of predefined public queries in the Query Gallery. Our professionals have selected a number of useful queries for most common use cases for different data sources. You can use these queries immediately or create your own queries, using them as templates. Additionally you can study some aspects of the SQL language on these queries.
Public queries are available for all Query users, and they have some specific features:
- They cannot be deleted from the Query Gallery. If they obstruct finding your own queries, you can simply hide them by selecting Personal queries only from the right drop-down list in the Query Gallery header. Select Personal and public queries to display them again.
- Public queries are not linked with a specific connection. You will need to select a connection manually for them. Public queries are displayed when you select Group by Sources or No grouping options from the drop-down list on the left in the Query Gallery window.