squirrel.asciidoc 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. [role="xpack"]
  2. [[sql-client-apps-squirrel]]
  3. === SQuirreL SQL
  4. You can use the {es} JDBC driver to access {es} data from SQuirreL SQL.
  5. 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.
  6. ==== Prerequisites
  7. * http://squirrel-sql.sourceforge.net/[SQuirreL SQL] version 4.0.0 or higher
  8. * {es-sql} <<sql-jdbc, JDBC driver>>
  9. ==== Add {es} JDBC Driver
  10. To add the {es} JDBC driver, use *Windows* > *View Drivers* menu (or Ctrl+Shift+D shortcut):
  11. image:images/sql/client-apps/squirell-1-view-drivers.png[]
  12. 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):
  13. image:images/sql/client-apps/squirell-2-select-driver.png[]
  14. 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 :
  15. image:images/sql/client-apps/squirell-3-add-driver.png[]
  16. The driver should now appear in the list with a blue check mark next to its name:
  17. image:images/sql/client-apps/squirell-4-driver-list.png[]
  18. ==== Add an alias for {es}
  19. 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:
  20. image:images/sql/client-apps/squirell-5-add-alias.png[]
  21. Name the new alias and select the `Elasticsearch` driver previously added:
  22. image:images/sql/client-apps/squirell-6-alias-props.png[]
  23. The setup is completed. Double check it by clicking on *Test Connection*.
  24. ==== Execute SQL queries
  25. 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}:
  26. image:images/sql/client-apps/squirell-7-data.png[]