Skip to content

JetBrains DataGrip

You can connect to a Beacon data lakehouse from JetBrains DataGrip using the Arrow Flight SQL JDBC driver. This gives you a full SQL interface — browse tables, run queries, and explore your data directly from the IDE.

Prerequisites

  • DataGrip installed
  • A running Beacon instance with Arrow Flight SQL enabled (enabled by default)
  • Port 32011 reachable from your machine (see Docker note below)

Step 1 — Download the Arrow Flight SQL JDBC driver

Download the driver from:

  • JetBrains JDBC Drivers page — search for "Apache Arrow Flight" Click on the versions (18.3.0 or later) to download a zip file containing the JAR. Unzip the downloaded file and locate the JAR (e.g. flight-sql-jdbc-driver-18.3.0.jar).

Step 2 — Add the driver to DataGrip

  1. Open Database ExplorerNewDriver. DataGrip Driver Manager
  2. Click + to create a new driver. Give it a name (e.g. Beacon Driver). Add driver files (the JAR you downloaded in Step 1) and set the driver class to org.apache.arrow.driver.jdbc.ArrowFlightJdbcDriver. Save the driver.
  3. Under Driver Files, click +Custom JARs… and select the JAR you downloaded (it is contained within the downloaded zip file). DataGrip Driver Manager
  4. Set Class to org.apache.arrow.driver.jdbc.ArrowFlightJdbcDriver. DataGrip Driver Manager
  5. Click OK to save the driver.

Step 3 — Create a data source

  1. Open Database ExplorerNewData Source -> YOUR_DRIVER_NAME.
  2. Click + → select the YOUR_DRIVER_NAME driver.
  3. Fill in the connection details:
FieldValue
UserYour Beacon admin username (BEACON_ADMIN_USERNAME)
PasswordYour Beacon admin password (BEACON_ADMIN_PASSWORD)
URLjdbc:arrow-flight-sql://localhost:32011?useEncryption=false

DataGrip Data Source Configuration

INFO

If your Beacon instance is served over TLS, change useEncryption=false to useEncryption=true in the JDBC URL.

  1. Click Test Connection to verify. You should see a Successful message.
  2. Click OK to save.

Expose the Flight SQL port

By default, Arrow Flight SQL listens on port 32011. When running Beacon via Docker Compose, make sure this port is published:

yaml
services:
    beacon:
        image: ghcr.io/maris-development/beacon:latest
        ports:
            - "5001:5001"   # HTTP API
            - "32011:32011" # Arrow Flight SQL  #

Querying your data

Once connected, DataGrip will introspect the available tables. You can then:

  • Browse the schema tree in the Database panel
  • Open a query console and run SQL against your datasets
sql
-- List all available tables
SHOW TABLES;

-- Query a dataset
SELECT 1;

-- Query a dataset
SELECT * FROM read_netcdf(['my_dataset.nc'], ['TIME', 'DEPTH']) LIMIT 100;

TIP

Beacon tables are named after your dataset files or configured collection names. If you don't see tables immediately, right-click the data source and choose Refresh.

Configuration reference

The Arrow Flight SQL endpoint can be tuned with the following environment variables in your Beacon deployment:

VariableDefaultDescription
BEACON_FLIGHT_SQL_ENABLEtrueEnable or disable the Flight SQL server
BEACON_FLIGHT_SQL_HOST0.0.0.0IP address to listen on
BEACON_FLIGHT_SQL_PORT32011Port for the Flight SQL gRPC server
BEACON_FLIGHT_SQL_ALLOW_ANONYMOUSfalseAllow unauthenticated connections
BEACON_FLIGHT_SQL_TOKEN_TTL_SECS3600Auth token lifetime in seconds