Friday, 19 July 2019

Vertica VSQL as your Mac App

Today I installed Vertica VSQL (Verticals CLI - command-line interface, more info below) at my Mac and I build the Mac application to run VSQL from me. Good job to I :).
If I did not build that, I will need the open terminal and fined the location of the VSQL or add the VSQL folder in my PATH ... 

And how I done that, off-course I ask Google and found nice and simple steps from tubedogg - thank you. I just add my command and the application name.

  1. Open Automator and double-click on Application.
  2. In the "Name" search box, type Apple and you should see "Run AppleScript".
  3. Drag "Run AppleScript" into the right-hand window.
  4. Where it says (* Your script goes here *), replace that text with the following code:

    tell application "Terminal"
      activate
      do script with command "JMeter"
    end tell
    -- My code
    (* My Application - Run The VerticaVSQL at VMWARE *)
    tell application "Terminal"
      activate
      do script with command "/opt/vertica/bin/vsql -U dbadmin -d VMart -h 172.16.212.136"
    end tell
  5. File > Save and enter a name (my name: VerticaVSQLatVMWARE), and choose where to save the application (I saved the application at the Applications folder were rest of application are)
  6. Double-click on the newly created application.
    In my case, 

________________________
What is VSQL? Log definition, 

The VSQL is a character-based, interactive, front-end utility that lets you type SQL statements and see the results. It also provides a number of meta-commands and various shell-like features that facilitate writing scripts and automating a variety of tasks.

Very cool installation and quick VSQL overview you could see at this youtube channel Connecting To Vertica - VSQL ...