Logo
  1. Potens.io
  2. Magnus
  3. Meet Magnus

Articles > Rich Editor

  • Release Notes
  • Introduction
  • Features
  • Quick Start
  • Rich Editor

Overview

Don't construct a query without editing help!
Magnus provides Rich Text Editor to assist in developing queries and scripts.
Available in BigQuery Task and Script Task, Rich Editor elevates coding by offering features developers cannot be without.
Reference the line number of specific code, easily read through query/script with color coded key words, start typing and get hints to auto complete, highlight words to bracket match and position, and block selections.

Don't settle for small text editor size re-size the editor or better yet go full screen with Full Window Mode.

 

Rich editor is a text editor that implements more advanced editing function, provides many features and add-ons

Features are:

  1. Line numbering
  2. Context Sensitive Syntax Coloring
  3. Auto Completion with Hints
  4. Bracket Matching
  5. Embracing Selection in Brackets
  6. Multiline and multi-position Cursor and Selection
  7. Block Selection
  8. Full Window Mode
  9. Multiline Comments
  10. Active line
  11. Preserve Auto Formatting (keywords capitalization) 

Rich editor is used in the following Tasks

BigQuery Task Editors

  1. Query Editor
    01.png
  2. UDF Editor
    02.png

Script Task Editor

  1. JavaScript
    03.png
  2. Golang
    04.png
  3. Lua
    05.png
     

Special instructions to keep in mind:

  1. Auto completion is supported only for the following. Auto completion is listed by pressing Ctrl+Space.
    1. BigQuery task query (standard/legacy)
    2. BigQuery task UDF
    3. Script task for JavaScript
  2. Commenting/Uncommenting:
    1. Can be applied to one line by putting the mouse cursor to any position in that line and press Ctrl+/
    2. Can be applied to multiline by highlighting all lines and press Ctrl+/
  3. Full screen:
    1. Windows: Press F11 or click  , press Esc to exit the full screen mode
    2. Mac: click  , press Esc to exit the full screen mode
  4. Embracing selection in Brackets (Auto close brackets):
    1. Highlight the word, line, multiline then use one of the supported matching bracket:
      1. "
      2. <
      3. '
      4. [
      5. {
      6. (
      7. `

 

Features Details

Languages Support

    1. BigQuery Legacy and Standard SQL dialects
    2. JavaScript (UDF)
    3. Go (GoBQ)

Line numbering

06.png Query editor contains line numbers for each line of text


Context Sensitive Syntax Coloring

07.png Keywords are color coded


Auto Completion with Hints

08.png

Keyword autocomplete

    1. Ctrl-Space for list of keyword selections
    2. Select from list to add to query


Bracket Matching

09.png

Words can be embraced in brackets such as (), {}, [], <>, “”, ‘’, and ``

    1. Highlight text to embrace
    2. Type a qualifying open bracket to embrace selection


Multiline Cursor and Selection

10.png

Words can be embraced in brackets such as (), {}, [], <>, “”, ‘’, and ``

    1. Highlight text to embrace
    2. Type a qualifying open bracket to embrace selection


Block Selection

11.png
  1. Select consecutive multiple lines
  2. Hit tab to indent
  3. Hit shift + tab to reduce indent


Full Window Mode

13.png

Query text area can be set to full window mode by

    1. For PC users click F11
    2. For all users click on the full window icon in upper left
    3. Hit ESC, F11 (PC users), or click full window icon to leave full window mode

 

Multiline Comments

To add multiline comments follow steps for Multiline Cursor and Selection (7) above and then type comments

Multiline

See Multiline Cursor and Selection and Multiline Comments above

Preserve Formatting  

Auto Formatting (keywords capitalization) can be preserved via CTRL + SHIFT + F
If user will Copy/Paste your query from BigQuery Editor to somewhere else - you will lose keywords capitalization that is part of Auto-Formatting feature. 
To preserve capitalization first – use CTRL+SHIFT+F

IntelliSense for Parameters

Rich editor supports smart autocomplete/hint menu detection for parameters.
In order for the user to have access to that menu, the user needs to type < first then click Ctrl+Space, all parameters (built-in and custom) within given workflow will be displayed at IntelliSense menu.
For example: Assuming workflow has following parameters

14.png

In BigQuery Task, type first < then click Ctrl+Space - to get IntelliSense for Parameters as below

15.png

The list of parameters will appear, custom parameters will have different colors from built-in parameters, and each parameter will have a tooltip that has info about it, like type, value, schema (if record parameter)

 

Potens.io
Launch Magnus | Goliath