The Welkin Suite Forum

Better SOQL query editing



Better SOQL query editing

  • Please log in to reply

#1
windows version welkinsuite

RubenOlsenSbanken

    Posted 10 Jul 2020 and edited 12 Apr 2021

    The SOQL editor (on Windows) it a bit lacking, and the following features are really expected to be present in database related development tools in 2020:

    • Basic field, and object completion, including fields in related objects, but also on keywords. There is a reason why Ctrl-Space was invented :-D
      Take a look at any SQL tools like DataGrip (JetBrains) and MSSQL Management Studio - those tools have this. 
    • (Re)formatting according to organizational internal standards. This meas that some companies have standardized to have keywords in lower case (select ... from vs SELECT ... FROM), commas in fieldslist should either come before or after the field name, type indentation, etc, etc. See DataGrip from Jetbrains.
    • Comments. I have read your reply on a previous feature request, but that answer does not float on water anymore as it is possible to Execute Higlighted part of a query. It has really nothing todo with inveting your own version of SOQL. If a line starts with --, just skip it before passing the results over to the Salesforce API. For all pratcital purposes, you do the same with the Execute Highlighted functinality today.
    • Better error messages. Don't simply rely on what's returned from the Salesforce APIs. My favorite example is 
      Error 99 MALFORMED_QUERY: only aggregate expressions use field aliasing. 
      Where the culprit was a missing comma in the field list. SOQL is a well defined small language, and thus it's really easy to syntax check before handing it off to the SF APIs.
    • Keyboard shortcuts to Execute (and Execute Highlighted).
    • It has been mentioned before, and this bugs me to a never ending high degree: keep the WHERE clause when choosing fields in an existing query.
    • Default fields when starting a SOQL query on a object. Now we get "Id" wether we want it or not. Let us choose, or at least include Name alongside Id.
    • Selecting fields from one object, then selecting fields from another object will clear the selected fields from the first object. Please don't do that. All fields and objects into the query and let people deal with this. Better, if selected objects has any relationships defined - do the right thing and automatically use the DOT notation on the selected field.
    • No limitation on number of exported rows (to CSV file). This limitation is just silly in 2020. If a user does a query that returns 185487 rows, pressing the Exprot to CSV button should save 185487, not only 2000 rows.

    Thanks for your time.
    PS: the formatting of a message (this mesage) does not show the formatting when saved... 



    6 replies to this topic

    #2

    Starleaf

      Posted 10 Jul 2020

      "Bulk CSV" option is critical. I've found myself utiling the query builder and then copy and pasting it into Workbench to obtain all records.



      #3

      RubenOlsenSbanken

        Posted 13 Jul 2020

        Starleaf, on 10 Jul 2020 - 04:34 PM, said:

        "Bulk CSV" option is critical. I've found myself utiling the query builder and then copy and pasting it into Workbench to obtain all records.


        We use several command line based tools (open source ForceCLI, Salesforce provided SFDX, and several home grown tools). All of these tools  require a skill set that is not for everyone (read: they still need some day-to-day support). I have two users which use Welkin only for the SOQL queries, but as soon as they need to export more than a few 1000s of rows they often had it over to me for execution.

        It's no shame in useing more than tool to get the job done, but some functionality is just considered "must have" in 2020.



        #4

        vlgubanovich

          Posted 20 Jul 2020

          Hi RubenOlsenSbanken,

          Thank you very much for your time to compile this great list. I really appreciate your effort!


          You've pointed a lot of great ideas that will be handy for power users, but might be confusing for "casual users" or for "regular development tasks". I agree with you about having all these functionality under the same hood, but this approach has its caveats and we're trying to achieve some kind of balance with it.

          For example - CSV export of 100k+ records using the standard "query" method from the SOAP API will be so slow, that it'll annoy everyone (including me). Obvious solution here would be to switch to the Bulk API, but it will add a huge overhead for those who are exporting just a couple thousands of records. Obviously - add a dialog/setting :) But it's already somewhere at the edge of "too confusing"/"too much actions" for many users and their use-cases. And at the same time - I believe that if you're exporting 100k+ records, you have some plans for them, and The Welkin Suite won't help with that plans in most cases, even if it would export them in CSV. So in this case it might be (I'm not saying that it is, but it might be) better to use specialized tools for certain "power" tasks. This is the kind of balance we're trying to achieve, and your input also helps us understanding the balance properly :)

          Anyway, I also recognize a bunch of things that I will be happy to add to the SOQL Executor - like adding hotkeys, adding the "Name" field (or making the list of default fields easily editable).

          Regarding the "WHERE" clause that gets cleared - we will review it again, as it appears to be a sporadic bug. Or is it always cleared for you?

          I might also finally agree regarding comments in the SOQL - you've made a good point about the "Execute Highlighted", so it seems that I'll add it to the backlog :)

          Speaking of other, more complicated, points - let us check if we can find a way to get them done in a convenient way, and with a reasonable amount of effort. I hope that we'll complete at least some of them :)


          And thank you once more for this list of points, it is very helpful!

          Best Regards,

          Vladimir



          Vladimir Gubanovich
          Head of Product
           
          The Welkin Suite
          skype id: vladimir.gubanovich
          e-mail: vladimir.gubanovich@welkinsuite.com


          #5

          Starleaf

            Posted 20 Jul 2020

            I would just like to comment that I do not think adding a checkbox "Use Bulk API" next to the Execute buttons pushes the UI from simple to "too confusing"/"too much actions."


            Attached Files


            #6

            RubenOlsenSbanken

              Posted 21 Jul 2020

              Regarding "too complex UI":

              If any "casual" users (like the ones I have) are using the suite in the first place, the complexity is already there in the tool as a whole. AND - developers should really have no problem with this added complexity.  


              Where clause issues:

              All the users on my team has it, all the time. Not one week goes by without the occasional "fuck" beeing said out loud due to the where clause being cleared.



              #7

              kylev

                Posted 12 Apr 2021 and edited 12 Apr 2021

                RubenOlsenSbanken, on 21 Jul 2020 - 11:55 AM, said:

                Regarding "too complex UI":

                If any "casual" users (like the ones I have) are using the suite in the first place, the complexity is already there in the tool as a whole. AND - developers should really have no problem with this added complexity.  


                Where clause issues:

                All the users on my team has it, all the time. Not one week goes by without the occasional "fuck" beeing said out loud due to the where clause being cleared.

                 I can also confirm this behavior.  It happens if I populate a SOQL query using the Schema Explorer checkboxes, then add a WHERE clause.  If I check another field box after I already edited the query with the WHERE clause, the WHERE clause disappears.


                Bloom R40, Enterprise License






                Boost Your Productivity. Get Started Today

                Try Free Trial