squirrel.asciidoc 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. [role="xpack"]
  2. [testenv="platinum"]
  3. [[sql-client-apps-squirrel]]
  4. === SQuirreL SQL
  5. You can use the {es} JDBC driver to access {es} data from SQuirreL SQL.
  6. IMPORTANT: Elastic does not endorse, promote or provide support for this application; for native Elasticsearch integration in this product, please reach out to its vendor.
  7. ==== Prerequisites
  8. * http://squirrel-sql.sourceforge.net/[SQuirreL SQL] version 4.0.0 or higher
  9. * {es-sql} <<sql-jdbc, JDBC driver>>
  10. ==== Add {es} JDBC Driver
  11. To add the {es} JDBC driver, use *Windows* > *View Drivers* menu (or Ctrl+Shift+D shortcut):
  12. image:images/sql/client-apps/squirell-1-view-drivers.png[]
  13. Select *Elasticsearch* profile from the `Drivers` panel on the left-hand side (if it is missing check the SQuirreL SQL version or add a new entry to the list through the `+' button in the upper left corner):
  14. image:images/sql/client-apps/squirell-2-select-driver.png[]
  15. Select the *Extra Class Path* tab and *Add* the JDBC jar. Name the connection and *List Drivers* to have `Class Name` populated if it is not already filled-in :
  16. image:images/sql/client-apps/squirell-3-add-driver.png[]
  17. The driver should now appear in the list with a blue check mark next to its name:
  18. image:images/sql/client-apps/squirell-4-driver-list.png[]
  19. ==== Add an alias for {es}
  20. Add a new connection or in SQuirreL terminology an _alias_ using the new driver. To do so, select the *Aliases* panel on the left and click the `+` sign:
  21. image:images/sql/client-apps/squirell-5-add-alias.png[]
  22. Name the new alias and select the `Elasticsearch` driver previously added:
  23. image:images/sql/client-apps/squirell-6-alias-props.png[]
  24. The setup is completed. Double check it by clicking on *Test Connection*.
  25. ==== Execute SQL queries
  26. The connection should open automatically (if it has been created before simply click on *Connect* in the *Alias* panel). SQuirreL SQL can now issue SQL commands to {es}:
  27. image:images/sql/client-apps/squirell-7-data.png[]