Feature Request - Add support for SAQL including Syntax Highlighting, Formatting, and Error Checking

Issue #1647 resolved
Mike Eaton created an issue

I’ve been writing a fair amount of custom SAQL (Salesforce Analytics Query Language) lately. It would be a nice addition to support this need. Perhaps you could even consider supporting a temporary file type for creating, editing, and managing SAQL scripts with a .SAQL file extension. I think Syntax Highlighting and Formatting would be the priority with Error Checking as a nice to have.

Thanks in advance!

Comments (9)

  1. Mike Eaton reporter

    @Scott Wells Hey Scott - I know this is probably pretty low on your list of new features but seeing as though I am already using the IDE to write my SAQL queries, I would really love to see if IC could provide some support even if its only in the file type and syntax highlighting to start with. Consider this a gentle nudge reminder. 😉

    Thanks as always for all your hard work to make our lives easier!

  2. Scott Wells repo owner

    It's very unlikely this will happen anytime soon. True support for SAQL will require a completely new parser and all that entails. However, you can probably get pretty far with just a simple custom file type. You can create one in Settings/Preferences>Editor>File Types. Here's an example of one I created based on this:

    https://developer.salesforce.com/docs/atlas.en-us.bi_dev_guide_saql.meta/bi_dev_guide_saql/bi_saql_examples_dates.htm

    Custom File Type - Association

    Issue_1647_Custom_File_Type.png

    Custom File Type - Configuration 1, keywords

    Issue_1647_Custom_File_Type_Config_1.png

    Custom File Type - Configuration 2, functions

    Issue_1647_Custom_File_Type_Config_2.png

    That's obviously skeletal, but if you fill out the language details as appropriate, it'll give you simple code completion for keywords, simple syntax highlighting, brace/bracket/paren matching, etc. Basically it looks like:

    Issue_1647_Custom_File_Type_Editor.png

    Hope that helps!

  3. Scott Wells repo owner

    I put together an importable custom file type for SAQL and have attached it here. To use it, download (but don't extract) the attached archive, then use File>Manage IDE Settings>Import Settings... to import it. After the IDE restarts, *.saql should be associated with this custom file type to provide syntax highlighting, simple keyword/function code completion, brace/bracket/paren/quote matching, comment support, etc.

    Please let me know what I haven't gotten right. If this bears out nicely, I will look at bundling this into IC2 as a first-class supported file type, albeit much simpler than the support provided for Apex/SOQL/SOSL/etc.

    UPDATE: Removed in favor of a pre-release build with a SAQL file type bundled.

  4. Scott Wells repo owner

    I just added this custom file type to IC2 proper and will include it in the next official build.

  5. Scott Wells repo owner

    This is a pre-release build with the simple SAQL file type bundled. Download (but don't extract) it and install it using Settings/Preferences>Plugins>Install plugin from disk (under the gear drop-down menu. Once installed, let me know how well it works, and of course if I've missed anything, particularly any SAQL keywords or functions.

  6. Log in to comment