Launch Pinot Cluster
You can spin up a Pinot Cluster by running the following command, which starts up the Hybrid QuickStart:The Hybrid Quickstart
The Hybrid Quickstart contains an offline and real-time table calledairlineStats
.
These tables contain details of various flights from 2014.
We can view the schema of the table by calling the /schemas/<schemaName>
command.
To get a list of the dimension fields, we can filter the results using jq like this:
ts
and tsRaw
are the timestamp columns in this table.
Extracting date components
We can extract various components of thets
column using the EXTRACT
function that was added in Apache Pinot 0.12. An example of all the available components is shown below:
ts | year | month | day | hour | min | sec |
---|---|---|---|---|---|---|
2014-02-14 00:00:00.0 | 2014 | 2 | 14 | 0 | 0 | 0 |
2014-02-14 00:00:00.0 | 2014 | 2 | 14 | 0 | 0 | 0 |
2014-02-14 00:00:00.0 | 2014 | 2 | 14 | 0 | 0 | 0 |
2014-02-14 00:00:00.0 | 2014 | 2 | 14 | 0 | 0 | 0 |
2014-02-14 00:00:00.0 | 2014 | 2 | 14 | 0 | 0 | 0 |
2014-02-14 00:00:00.0 | 2014 | 2 | 14 | 0 | 0 | 0 |
2014-02-14 00:00:00.0 | 2014 | 2 | 14 | 0 | 0 | 0 |
2014-02-14 00:00:00.0 | 2014 | 2 | 14 | 0 | 0 | 0 |
2014-02-14 00:00:00.0 | 2014 | 2 | 14 | 0 | 0 | 0 |
2014-02-14 00:00:00.0 | 2014 | 2 | 14 | 0 | 0 | 0 |
month | day | count(*) |
---|---|---|
1 | 5 | 422 |
1 | 3 | 409 |
1 | 2 | 403 |
1 | 6 | 354 |
1 | 24 | 343 |
1 | 9 | 340 |
1 | 10 | 338 |
1 | 30 | 333 |
1 | 29 | 322 |
1 | 26 | 319 |