Golang
Pinot Client for Golang
Pinot also provides a native go client to query database directly from go application.
Installation
Please follow this Pinot Quickstart link to install and start Pinot batch QuickStart locally.
bin/quick-start-batch.shCheck out Client library Github Repo
git clone [email protected]:startreedata/pinot-client-go.git
cd pinot-client-goBuild and run the example application to query from Pinot Batch Quickstart
go build ./examples/batch-quickstart
./batch-quickstartUsage
Create a Pinot Connection
Pinot client could be initialized through:
1. Zookeeper Path.
pinotClient := pinot.NewFromZookeeper([]string{"localhost:2123"}, "", "QuickStartCluster")2. A list of broker addresses.
3. ClientConfig
Query Pinot
Please see this example for your reference.
Code snippet:
Response Format
Query Response is defined as the struct of following:
Note that AggregationResults and SelectionResults are holders for PQL queries.
Meanwhile ResultTable is the holder for SQL queries. ResultTable is defined as:
RespSchema is defined as:
There are multiple functions defined for ResultTable, like:
Sample Usage is here
Last updated
Was this helpful?

