Last updated
Was this helpful?
Last updated
Was this helpful?
Pinot provides to query the database directly from Go application.
Follow this link to install and start Pinot locally.
Check out the .
Build and run the example application to query from the .
Initialize the Pinot client using one of the methods below.
Note: You need not configure “content-type”
as a header in ExtraHTTPHeader
.
If you require a specialized HTTP client, you have the option to create your own HTTP client and utilize the NewWithConfigAndClient
function to establish a Pinot client that can accommodate a custom HTTP client.
Code snippet:
The query response has the following format:
Note that AggregationResults
and SelectionResults
are holders for Pinot query language (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
, such as the following:
The Go client repository contains an script.
The Go client repository contains an script.
The Go client repository contains an script.
See an example of a function in use and below:
Pinot Client for Golang