Run your first query
Your Data Server is ready. This step runs on your own computer: you connect a SQL client to the Data Server and query the sample table.
1. Connect a SQL client
Section titled “1. Connect a SQL client”The Data Server speaks Arrow Flight SQL, which SQL clients reach through a JDBC driver. These steps use DBeaver, a free SQL client. For other tools, see Connect a BI tool.
Download the JDBC driver:
flight-sql-jdbc-driver-19.0.0.jar. This is the version Icebreaker is tested against.Add the driver to DBeaver. Go to Database → Driver Manager → New, then:
- Click the Libraries tab and click Add File. Locate the driver you downloaded and Open it. Click the Find Class button and select
org.apache.arrow.driver.jdbc.ArrowFlightJdbcDriver. - Click the Settings tab and set Driver Name to “Icebreaker”
- Confirm that Class Name is
org.apache.arrow.driver.jdbc.ArrowFlightJdbcDriver. - Set URL Template to
jdbc:arrow-flight-sql://{host}[:{port}]. - Click OK to save.
- Click the Libraries tab and click Add File. Locate the driver you downloaded and Open it. Click the Find Class button and select
Locate your Data Server (Virtual Data Warehouse) in the Icebreaker Console. Click Info and copy the JDBC URL.
Back in DBeaver, Create a connection using the Icebreaker driver, and paste in the JDBC URL you copied from the Data Server.
2. Run a query
Section titled “2. Run a query”SELECT COUNT(*) FROM rides.bookings;The result should be 150000. Depending on how your capacity policy is configured, the first query can take longer because Icebreaker may need to start a node to run it.
Then try something more interesting:
SELECT vehicle_type, COUNT(*) AS rides, ROUND(AVG(booking_value), 2) AS avg_valueFROM rides.bookingsWHERE booking_status = 'Completed'GROUP BY vehicle_typeORDER BY rides DESC;What happens when you run a query
Section titled “What happens when you run a query”- Your SQL client sends the query to the Data Server.
- The Data Server reads the table’s metadata from the catalog and plans the query.
- The Data Server starts a query pod in your cluster to run it. If no node has room, a new node is added, within the limits of your Capacity Policy.
- The query pod reads the data from S3, runs the query, and writes the results.
- The Data Server streams the results back to your SQL client.
All the data and all the processing stay in your AWS account. For more detail, see Data Server internals.
When you’re done
Section titled “When you’re done”The evaluation environment costs money while it runs. When you finish a session, tear it down.