Skip to main content
Applications can use this sample client Node.js driver to query Pinot.
This solution may not scale to meet performance and throughput requirements for your use case.

Integrate Pinot in Node.js applications

  1. Install axios.
  1. Contact StarTree Support to obtain the following information:
  • Controller URL: The general format is https://pinot.<random-string>.cp.s7e.startree.cloud
  • Broker URL: The general format is https://pinot.<random-string>.cp.s7e.startree.cloud
  • AUTH_TOKEN
  1. Run the Node.js driver script:

queryPinot.js: Node.js driver script

Obtaining Username and Password

You can cenerate an API token in the Data Portal or using the REST API. Then, obtain the username and password from the service token Th username and password are used to authorize your API requests.

Finding Your Broker URL

To find the correct Broker URL for your table in StarTree Cloud:
  1. Access the Data Portal.
  2. Click on Tables.
  3. Select the specific table you want to query.
  4. From the browser address bar, copy the URL to your Pinot cluster. For example, if the URL shown is https://dp.1abcde6.cp.s7e.startree.cloud/tables, then the Broker URL for the table will be broker.pinot.1abcde6.cp.s7e.startree.cloud.