The Top Nav Menu is a set of menu items on top of the Editor which contains quick access to action items related to the Editor and query results. There are also actions from the context menu for Project and Dataset repeated in the menu for convenience.
There are six categories in the menu. Query, Editor, Results, Project, Dataset, Other.
Query/Script contains menu items that load, save, and run the workspace.
Editor menu items modify the workspace, tab, and modify content/query.
Results are based around query result actions including execution details, paging preferences, and downloading/saving data.
Project and Dataset are copies from the respective context menu.
Other are extra actions not related to other categories.
Query
Open Recently Run
The last 5 queries/scripts are listed.
Hovering over an item will display a preview of the query/code.
Clicking an item in the submenu will load content for that item to the Editor.
Open Favorites
A workspace is content within a tab that includes the Editor text along with options and parameters. A workspace can be Marked as Favorite in the Query menu. When marked those Favorites can be loaded into the workspace through Open Favorites.
A submenu displays the name for those workspaces that have been favorited along with a preview of the content. Clicking on a submenu item will load item into the workspace.
Load
A workspace can be saved to, and loaded from, a local file or GitHub.
After loading a workspace, the contents are imported into the application.
This is a convenient way to save lengthy work or share work with others.
Run
There are several ways to run content in the Editor. Run via Query menu is another way to perform this action.
Save
A workspace can be saved to, and loaded from, a local file or GitHub.
Saving a workspace, exports the contents to a file. Options are available to include options, parameters, and all tabs.
This is a convenient way to save lengthy work or share work with others.
Save as View
Editor content can be saved as a view. Enter view destination. When saved the view will be created and displayed in the navigator. You may need to refresh the dataset to see the item.
Mark as Favorite
A workspace is content within a tab that includes the Editor text along with options and parameters. A workspace can be Marked as Favorite in the Query menu. When marked those Favorites can be loaded into the workspace through Open Favorites.
Marking as favorite saves the workspace content locally.
Remove Favorite
After a favorite is loaded, and before any changes are made to its content, Remove Favorite is available as a menu item. Selecting this item will remove the content from the favorites list.
GitHub Options
Default settings for GitHub can be set here. See GitHub Integration article for details.
Standard SQL
BigQuery standard SQL is one of three Editor modes available in Goliath. Selecting this option will enable IntelliSense, syntax, options, and submissions for that mode.
Legacy SQL
BigQuery legacy SQL is one of three Editor modes available in Goliath. Selecting this option will enable IntelliSense, syntax, options, and submissions for that mode.
GoBQ
GoBQ is one of three Editor modes available in Goliath. GoBQ in Goliath provides a Golang sandbox that integrates with Golang GBQ libraries.
Script
When the Editor mode is set to Go, the Query menu gets replaced with Script. The menu items are the same except for the addition of GoBQ Examples and removal of Save as View.
GoBQ Examples
GoBQ mode is a sandbox for writing Golang scripts using BigQuery methods. To help the user start exploring this sandbox several GoBQ examples are listed as starting points. These are templates that when clicked will load into the Editor.
Editor
Items in the Editor menu are grouped into three categories representing where these actions impact. The first group is related to the Editor and content within the editor, the second group relates to activity that impacts Tabs, and the last group is query specific actions.
Hide Editor
The Editor is the text area where content can be added. Hide Editor will temporarily remove the editor and allow for more space to view query results, project/dataset browser, and job history.
Show in Full-Size
The Editor will expand to fill the entire browser by selecting this option.
Insert Multi-Query Separator
Selecting this option will insert ##bq into the Editor. ##bq is a special combination that when used breaks the query into separate components. This option is available for those who like to work on multiple queries within the same Editor. Using ##bq will separate those queries and allow them to be evaluated and run individually.
Toggle Fold / Unfold
IntelliSense is available in the Editor which includes fold/unfold of content. Selecting this item will toggle folding. See IntelliSense for details.
Toggle Upper / Lower Case
IntelliSense is available in the Editor which includes transforming keywords to upper or lower case. Selecting this item will toggle case type. See IntelliSense for details.
New Tab
Tabs are one way to work on multiple queries. Tabs allow the workspace (query, options, panel settings) to uniquely be set per tab.
Tab action items can be invoked at the tab itself and within the Editor menu items.
New tab adds a tab to application. There is a limit of 20 tabs.
Rename Tab
This menu item will invoke renaming of the current tab. Enter a value in the input field to rename the tab.
Clear Tab
The workspace for a tab includes the Editor content and options. Clearing a tab resets these items by removing Editor content and setting options to their default values.
Close Tab
This menu item is one of many ways to close a tab. It will close the current tab. If there is any content in the Editor, a prompt will ask for confirmation.
Format Query
Re-formats your BigQuery Standard SQL queries, statements, scripts into a consistent beautified style. Malformed or invalid queries will also be formatted on a best-effort basis. Formatting selected code fragments is also supported.
At this time the formatter only supports one style, which is briefly:
- New queries, DML, DDL, and scripts appear on a new line
- New clauses appear on a new line, sub clauses are also indented
- First clause item in a comma-separated list appears on the same line, next items wrap to a new line
- Spacing added between operators and symbols
- Extra spacing is removed
- Empty lines are retained
- Comments are retained
- Function parameters generally appear on one line
- Subqueries are indented another level
- Backticks are added to fully qualified table references
Not currently supported or other limitations:
- Only one style (above) is supported at this time
- Legacy BQ syntax is not supported
Query Explorer
Allows parse and analyze query to see what objects are used (tables, views, subqueries, CTEs, etc.) and when invoked adds Query Node with all respective objects into Goliath Navigator.
For the tables, views – the columns that are being used in query are bolded to indicate their use. One-click on bolded (used) column will make such a column briefly highlighted within the Query Editor, so user can easily locate it within the query.
User can also “locate” the specific subquery, CTE within the Editor by using Tag menu item of respective object. This will highlight respective code fragment. Specific color can be chosen/set for each subquery, CTE. Highlights can be removed using Untag menu item.
In addition, user can locate all columns of specific table, view used within the Query text. This is invoked by Tag Columns menu item. In this case, object in Query Explorer and respective columns in Editor will be colored using same color (that also can be customized on per object basis)
Tag/Untag can be done on object level or for whole Query using respective Node’s menu.
Current limits, limitations:
- Only Valid Standard SQL SELECT Statements / queries supported (thus Legacy SQL, Scripts and DDL, DML, DCL are not supported)
- External Query, Connections, Remote Functions are not supported
- Support for Table Valued Functions (TVF) and BQ ML is WIP (work in progress)
- When UDF with templated argument (ANY TYPE) and result type of that UDF is not specified – string type is used
- And finally, bigquery scope is required to use this feature – which (if not yet) can be set in Lock/Unlock Features Panel
Note:
- All physical objects (tables, views) are presented in one place even if they are from different projects, datasets! So, user does not need jump from object to object using CTRL+SPACE type of shortcuts
- Query Explorer Nodes are named after respective Tab Names, so it is easy to keep oriented when multiple Query Explorers invoked for multiple Tabs
- Objects in Query Explorer presented grouped by tables, views, then CTEs, then subqueries and finally node representing output/result of query. Within each group objects are sorted in alphabetical order. CTEs, subqueries and output nodes denoted by respectively umbrella, subway, and trophy icons. The rest of objects have their regular assigned/used in Navigator icons
- Tables, views, INFORMATION SCHEMAs nodes – they all come with regular object Info popup as well as most of contextual menu items expected for the respective types – table vs. clone vs. snapshot vs external table, view vs. materialized view vs. information schema view etc.
- CTE nodes are named after respective CTE, subquery nodes are named after subquery aliases. If not alias not presented – custom name is used – subqueryN – where N is incremental count of the unaliased subquery
Results
Execution Details
When an uncached query is run, details about the execution are provided. Clicking this item will visualize that data. More information can be found at Execution Details.
Query Stats
When an uncached query is run, clicking on this menu item will display information related to running that query.
Job Details
When a query is run, a job is submitted to BigQuery. This menu item will display the Job History for that run.
Result Page Size
Below the Editor space is split between the Query Results and Jobs History/Project/Dataset Browser. The height of this space is used to determine the number of rows that is visible. This number is set when Page Size is Auto. If the value is changes to Set a positive number can be set which represents the number of rows that the query results will display.
Rows that exceed this value can be paged by first, prev, next, last options in Query Results.
Download
Select this item to download the query results to a local file.
Copy to Clipboard
Select this item to copy the query results to the clipboard. There is a limit of 16,000 rows.
Save as Table
Select this item to save query results to a table.
Save to Google Drive
Select this item to save query results to Google Drive in the form of CSV, JSON, or Google Sheets.
Open Geo Visualization
Opens the Geo Visualization for the query results. This option is only available if the query results contain geography data types. See Geography Visualization for details.
Pivot / Chart
Opens Visualization Panel for graphing query results. See Visualization for details.
Project
Project menu items are the same as those found in the Project Context Menu. Availability in the Top Nav Menu is another way to showcase these items for quick access. See Navigator for details.
Dataset
Dataset menu items are the same as those found in the Dataset Context Menu. Availability in the Top Nav Menu is another way to showcase these items for quick access. See Navigator for details.
Other
Automate with Magnus
Opens Magnus and exports query in Goliath to a Magnus Workflow BigQuery Task.
Take Goliath Tour
Opens a browser tab that walks through a guided tour of Goliath features.