githubEdit

Query Engines (Kubernetes)

Connect query engines like Superset, Trino, and Presto to Pinot on Kubernetes

After deploying Pinot in Kubernetes and loading data, you can connect external query engines for richer analytics and visualization.

Query Pinot with Superset

Bring up Superset using Helm

  1. Install the SuperSet Helm repository:

helm repo add superset https://apache.github.io/superset
  1. Get the Helm values configuration file:

helm inspect values superset/superset > /tmp/superset-values.yaml
  1. For Superset to install Pinot dependencies, edit /tmp/superset-values.yaml file to add apinotdb pip dependency into bootstrapScript field.

  2. You can also build your own image with this dependency or use the image apachepinot/pinot-superset:latest instead.

  3. Replace the default admin credentials inside the init section with a meaningful user profile and stronger password.

  4. Install Superset using Helm:

kubectl create ns superset
helm upgrade --install --values /tmp/superset-values.yaml superset superset/superset -n superset
  1. Ensure your cluster is up by running:

kubectl get all -n superset

Access the Superset UI

  1. Run the below command to port forward Superset to your localhost:18088.

  1. Navigate to Superset in your browser with the admin credentials you set in the previous section.

  2. Create a new database connection with the following URI: pinot+http://pinot-broker.pinot-quickstart:8099/query?controller=http://pinot-controller.pinot-quickstart:9000/

  3. Once the database is added, you can add more data sets and explore the dashboard options.

Access Pinot with Trino

Deploy Trino

  1. Deploy Trino with the Pinot plugin installed:

  1. See the charts in the Trino Helm chart repository:

  1. In order to connect Trino to Pinot, you'll need to add the Pinot catalog, which requires extra configurations. Run the below command to get all the configurable values.

  1. To add the Pinot catalog, edit the additionalCatalogs section by adding:

circle-info

Pinot is deployed at namespace pinot-quickstart, so the controller serviceURL is pinot-controller.pinot-quickstart:9000

  1. After modifying the /tmp/trino-values.yaml file, deploy Trino with:

  1. Once you've deployed Trino, check the deployment status:

Query Pinot with the Trino CLI

Once Trino is deployed, run the below command to get a runnable Trino CLI.

  1. Download the Trino CLI:

  1. Port forward Trino service to your local if it's not already exposed:

  1. Use the Trino console client to connect to the Trino service:

  1. Query Pinot data using the Trino CLI, like in the sample queries below.

Sample queries to execute

List all catalogs

List all tables

Show schema

Count total documents

Access Pinot with Presto

Deploy Presto with the Pinot plugin

  1. First, deploy Presto with default configurations:

  1. To customize your deployment, run the below command to get all the configurable values.

  1. After modifying the /tmp/presto-values.yaml file, deploy Presto:

  1. Once you've deployed the Presto instance, check the deployment status:

Sample Output of K8s Deployment Status

Query Presto using the Presto CLI

Once Presto is deployed, you can run the below command from herearrow-up-right, or follow the steps below.

  1. Download the Presto CLI:

  1. Port forward presto-coordinator port 8080 to localhost port 18080:

  1. Start the Presto CLI with the Pinot catalog:

  1. Query Pinot data with the Presto CLI, like in the sample queries below.

Sample queries to execute

List all catalogs

List all tables

Show schema

Count total documents

Last updated

Was this helpful?