squirrel.asciidoc 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. [role="xpack"]
  2. [testenv="platinum"]
  3. [[sql-client-apps-squirrel]]
  4. === SQuirreL SQL
  5. [quote, http://squirrel-sql.sourceforge.net/]
  6. ____
  7. http://squirrel-sql.sourceforge.net/[SQuirreL SQL] is a graphical, [multi-platform] Java program that will allow you to view the structure of a JDBC compliant database [...].
  8. ____
  9. ==== Prerequisites
  10. * {es-sql} <<sql-jdbc, JDBC driver>>
  11. ==== Add {es} JDBC Driver
  12. To add the {es} JDBC driver, use *Windows* > *View Drivers* menu (or Ctrl+Shift+D shortcut):
  13. image:images/sql/client-apps/squirell-1-view-drivers.png[]
  14. This opens up the `Drivers` panel on the left. Click on the `+` sign to create a new driver:
  15. image:images/sql/client-apps/squirell-2-new-driver.png[]
  16. Select the *Extra Class Path* tab and *Add* the JDBC jar. *List Drivers* to have the `Class Name` filled-in
  17. automatically and name the connection:
  18. image:images/sql/client-apps/squirell-3-add-driver.png[]
  19. The driver should now appear in the list:
  20. image:images/sql/client-apps/squirell-4-driver-list.png[]
  21. ==== Add an alias for {es}
  22. Add a new connection or in SQuirelL terminology an _alias_ using the new driver. To do so, select the *Aliases* panel on the left and click the `+` sign:
  23. image:images/sql/client-apps/squirell-5-add-alias.png[]
  24. Name the new alias and select the `Elasticsearch` driver previously added:
  25. image:images/sql/client-apps/squirell-6-alias-props.png[]
  26. The setup is completed. Double check it by clicking on *Test Connection*.
  27. ==== Execute SQL queries
  28. The connection should open automatically (if it has been created before simply click on *Connect* in the *Alias* panel). SQuirelL SQL can now issue SQL commands to {es}:
  29. image:images/sql/client-apps/squirell-7-data.png[]