Skip to content

Run Starburst Trino CLI

This section explains how to validate your Starburst Trino setup by using the Trino CLI to run a basic sample query.

  1. Check the status of the coordinator and worker pods

    Bash
    kubectl get pods -n <STARBURST_TRINO_NAMESPACE>
    
    Ensure both coordinator and worker pods show Running status before proceeding.

  2. Access the coordinator pod

    Bash
    kubectl exec -it <COORDINATOR_POD_NAME> -n <STARBURST_TRINO_NAMESPACE> -- /bin/bash
    

  3. From the directory containing the trino-cli binary, start the Trino CLI using the following command.
    Bash
    ./trino-cli --catalog hive 
    
  4. After entering the Trino CLI, execute a basic query to validate access management.
    The following example demonstrates creating a schema:

    SQL
    CREATE SCHEMA IF NOT EXISTS <schema_name>;
    
    To allow schema creation, configure a policy in the Privacera Portal using the following steps:

    1. Navigate to the Privacera Portal.
    2. Go to Access ManagementResourrce Policies.
    3. Select the privacera_hive service.
    4. Click Add New Policy (or edit an existing policy, if applicable).

    The following is an example policy configuration

    Sample Resource Policy:

    • Policy Name: <name of the policy>
    • Hive Database: <schema_name>
    • Permissions: <create>
    • User/Group/Role: <assign your user/group/role>

Expected Behavior

The query execution will demonstrate access control enforcement:

  • If the user has the required permissions: The query executes successfully and the schema is created.