{"id":46732,"date":"2022-09-14T00:00:00","date_gmt":"2022-09-14T07:00:00","guid":{"rendered":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/blog\/time-bucketing-with-griddb\/"},"modified":"2026-03-30T13:53:08","modified_gmt":"2026-03-30T20:53:08","slug":"time-bucketing-with-griddb","status":"publish","type":"post","link":"https:\/\/www.griddb.net\/en\/blog\/time-bucketing-with-griddb\/","title":{"rendered":"Time Bucketing with GridDB"},"content":{"rendered":"<style>\n  .table-wrapper {\n    display: flex;\n    justify-content: center;\n}\n<\/style>\n<style>\n  .datatable {\n    margin: 20px;\n    text-align: center;\n}\n<\/style>\n<style>\n  .datatable tr:nth-child(odd) {\n    background-color: #f2f2f2;\n}\n<\/style>\n<style>\n  .datatable td {\n    font-size: 15px;\n    padding: 3px;\n    border-bottom: 1px solid #ddd;\n}\n<\/style>\n<style>\n  .datatable tr:hover {\n    background-color: lightyellow;\n}\n<\/style>\n<style>\n  .datatable th {\n    font-size: 18px;\n    font-weight: bold;\n    background-color: darkgray;\n    text-align: center;\n    color: white;\n}\n<\/style>\n<style>\n  .datatable td {\n    padding: 10px;\n    text-align: left;\n}\n<\/style>\n<p>You&#8217;ve ingested a set of timeseries data into GridDB and want to see aggregates across individual time periods (also called windows or buckets) within the data set? GridDB&#8217;s TIME_SAMPLING function allows you to perform time weighted averages but what about counts or the minimum or maximum values in each time period? For example, you want to find the maximum value of a column every day or the number of samples every hour. GridDB&#8217;s multi-query function along with your programming language&#8217;s time, date, and calendar functions allows you to do just that.<\/p>\n<p>In this blog, we&#8217;ll cover not only using GridDB&#8217;s TIME_SAMPLE TQL function but also build a generic function that can fetch multiple aggregates from the <a href=\"https:\/\/www1.nyc.gov\/site\/tlc\/about\/tlc-trip-record-data.page\">NYC Taxi Data data set<\/a>.<\/p>\n<p>Here is the specific file. We are downloading this file into your \/tmp directory because the ingest code is hard-coded to read from there. If you would like to download to another location, please make sure you also change the file path in the <code>src\/main\/java\/net\/griddb\/tstaxiblog\/IngestParquet.java<\/code> code.<\/p>\n<div class=\"clipboard\">\n<pre><code>$ wget -O \/tmp\/yellow_tripdata_2021-01.parquet https:\/\/d37ci6vzurychx.cloudfront.net\/trip-data\/yellow_tripdata_2021-01.parquet<\/code><\/pre>\n<\/div>\n<h2>Prerequisites<\/h2>\n<p>To follow along with this project, you will need to download and install GridDB: <a href=\"https:\/\/docs.griddb.net\/latest\/gettingstarted\/using-apt\/#install-with-deb\">https:\/\/docs.griddb.net\/latest\/gettingstarted\/using-apt\/#install-with-deb<\/a><\/p>\n<p>You will also need to be able to use GridDB with java. To do so: <a href=\"https:\/\/docs.griddb.net\/gettingstarted\/java.html\">https:\/\/docs.griddb.net\/latest\/gettingstarted\/java\/<\/a><\/p>\n<h2>Ingest Data in Parquet Format<\/h2>\n<p>In our past <a href=\"\/en\/blog\/geospatial-analysis-of-nyc-crime-data-with-griddb\/\">NYC Taxi Data blog<\/a>, the data was available as a CSV which is easy to parse. Now, the NY Taxi Commission releases the data in Parquet format which has its advantages but is more difficult to parse.<\/p>\n<p>First, we need to include the many libraries required to use the Apache Parquet Library: parqet-avro, parqet-hadoop, parqet-format, hadoop-common, hadoop-client. Since we&#8217;re using Maven, we add the following to our dependencies:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">&lt;dependency&gt;\n    &lt;groupId&gt;org.apache.parquet&lt;\/groupId&gt;\n    &lt;artifactId&gt;parquet-hadoop&lt;\/artifactId&gt;\n    &lt;version&gt;1.9.0&lt;\/version&gt;\n&lt;\/dependency&gt;\n&lt;dependency&gt;\n    &lt;groupId&gt;org.apache.parquet&lt;\/groupId&gt;\n    &lt;artifactId&gt;parquet-format&lt;\/artifactId&gt;\n    &lt;version&gt;2.9.0&lt;\/version&gt;\n&lt;\/dependency&gt;\n&lt;dependency&gt;\n    &lt;groupId&gt;org.apache.parquet&lt;\/groupId&gt;\n    &lt;artifactId&gt;parquet-avro&lt;\/artifactId&gt;\n        &lt;version&gt;1.9.0&lt;\/version&gt;\n&lt;\/dependency&gt;\n&lt;dependency&gt;\n  &lt;groupId&gt;org.apache.hadoop&lt;\/groupId&gt;\n  &lt;artifactId&gt;hadoop-common&lt;\/artifactId&gt;\n  &lt;version&gt;2.10.0&lt;\/version&gt;\n&lt;\/dependency&gt;\n&lt;dependency&gt;\n    &lt;groupId&gt;org.apache.hadoop&lt;\/groupId&gt;\n    &lt;artifactId&gt;hadoop-client&lt;\/artifactId&gt;\n    &lt;version&gt;2.10.1&lt;\/version&gt;\n    &lt;scope&gt;provided&lt;\/scope&gt;\n&lt;\/dependency&gt;<\/code><\/pre>\n<\/div>\n<p>Now in our Java source we can read the parquet file and iterate through its groups of rows.<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">Path path = new Path(\"yellow_tripdata_2021-01.parquet\");\nConfiguration conf = new Configuration();\n\ntry {\n    ParquetMetadata readFooter = ParquetFileReader.readFooter(conf, path, ParquetMetadataConverter.NO_FILTER);\n    MessageType schema = readFooter.getFileMetaData().getSchema();\n    ParquetFileReader r = new ParquetFileReader(conf, path, readFooter);\n\n    PageReadStore pages = null;\n    try {\n        while (null != (pages = r.readNextRowGroup())) {\n            final long rows = pages.getRowCount();\n            System.out.println(\"Number of rows: \" + rows);\n\n            final MessageColumnIO columnIO = new ColumnIOFactory().getColumnIO(schema);\n            final RecordReader recordReader = columnIO.getRecordReader(pages, new GroupRecordConverter(schema));\n            for (int i = 0; i &lt; rows; i++) {\n                final Group g = (Group)recordReader.read();\n                writeGroup(ts, g);\n\n            }\n        }\n    } finally {\n        r.close();\n    }\n} catch (IOException e) {\n    System.out.println(\"Error reading parquet file.\");\n    e.printStackTrace();\n}<\/code><\/pre>\n<\/div>\n<p>The writeGroup function is called for each group of rows and actually does the writing and populates and writes an instance of our TaxiTrip class with the data in each row.<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">private static void writeGroup(TimeSeries ts, Group g) throws GSException {\n\n    int fieldCount = g.getType().getFieldCount();\n    int valueCount = g.getFieldRepetitionCount(0);\n    for (int index = 0; index &lt; valueCount; index++) {\n        TaxiTrip r = new TaxiTrip();\n        for (int field = 0; field &lt; fieldCount; field++) {\n        \n            try {\n            Type fieldType = g.getType().getType(field);\n            String fieldName = fieldType.getName();\n\n            if (fieldType.isPrimitive()) {\n                switch(fieldName) {\n                    case \"tpep_pickup_datetime\":\n                        r.tpep_pickup_datetime = new Date(g.getLong(field, index)\/1000);\n                        break;\n                    \/* .... snip ... *\/\n                    case \"fare_amount\":\n                        r.fare_amount = (float)g.getDouble(field, index);\n                        break;\n                    \/* .... snip .... *\/\n                    default:\n                        System.out.println(\"Unknown field: \"+fieldName+\" value=\"+g.getValueToString(field, index));\n                }\n            } \n            } catch (Exception e) {\n            }\n        }\n        ts.put(r);\n    }\n}<\/code><\/pre>\n<\/div>\n<h2>GridDB&#8217;s TIME_SAMPLING Function<\/h2>\n<p>GridDB&#8217;s TIME_SAMPLING function returns a linear interpolation of the column values within each window. It has the following function signature:<\/p>\n<div class=\"clipboard\">\n<pre><code>TIME_SAMPLING(column, start, end, window_count, window_size)<\/code><\/pre>\n<\/div>\n<p>The function works by finding the interpolation of for each request timestamp by using the rows before and after it. The following graphic visualizes the concept.<\/p>\n<p>More details can be found in the <a href=\"https:\/\/www.toshiba-sol.co.jp\/en\/pro\/griddb\/docs-en\/v5\/GridDB_ProgrammingGuide.html?#tql-interpolation-operations\">GridDB programming guide<\/a>.<\/p>\n<p>The code simply executes the query and iterates through each window returned.<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">public static void timeSampling(GridStore store, String column, Date start, Date end, String windowstr) throws GSException {\n\n    TimeZone tz = TimeZone.getTimeZone(\"UTC\");\n    DateFormat df = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:00'Z'\"); \n    df.setTimeZone(tz);\n\n    Container<?, Row> ts = store.getContainer(\"NYC_TaxiTrips\");\n    String querystr = \"select time_sampling(\"+column+\", TIMESTAMP('\"+df.format(start)+\"'), TIMESTAMP('\"+df.format(end) +\"') , 1, \"+windowstr+\") \"; \n\n    Query&lt;row> q = ts.query(querystr);\n    RowSet&lt;\/row>&lt;row> rs = q.fetch();\n    while (rs.hasNext()) {\n        Row result = rs.next();\n        System.out.println(result.getTimestamp(0)+\"=\"+result.getDouble(10));\n    }\n\n}&lt;\/row><\/code><\/pre>\n<\/div>\n<p>Calling <code>timeSampling(store, \"fare_amount\", start, end, \"DAY\");<\/code> results in the following values:<\/p>\n<div class=\"table-wrapper\">\n<table class=\"datatable\">\n<tr>\n<th>\n        Window\n      <\/th>\n<th>\n        Sample\n      <\/th>\n<\/tr>\n<tr>\n<td>\n        Fri Jan 01 00:00:00 GMT 2021\n      <\/td>\n<td>\n        14.833333015441895\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Sat Jan 02 00:00:00 GMT 2021\n      <\/td>\n<td>\n        8.55555534362793\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Sun Jan 03 00:00:00 GMT 2021\n      <\/td>\n<td>\n        15.710000038146973\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Mon Jan 04 00:00:00 GMT 2021\n      <\/td>\n<td>\n        25.31818199157715\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Tue Jan 05 00:00:00 GMT 2021\n      <\/td>\n<td>\n        22.024999618530273\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Wed Jan 06 00:00:00 GMT 2021\n      <\/td>\n<td>\n        9.0\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Thu Jan 07 00:00:00 GMT 2021\n      <\/td>\n<td>\n        43.5\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Fri Jan 08 00:00:00 GMT 2021\n      <\/td>\n<td>\n        6.0\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Sat Jan 09 00:00:00 GMT 2021\n      <\/td>\n<td>\n        28.950000762939453\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Sun Jan 10 00:00:00 GMT 2021\n      <\/td>\n<td>\n        18.450000762939453\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Mon Jan 11 00:00:00 GMT 2021\n      <\/td>\n<td>\n        41.75\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Tue Jan 12 00:00:00 GMT 2021\n      <\/td>\n<td>\n        6.5\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Wed Jan 13 00:00:00 GMT 2021\n      <\/td>\n<td>\n        17.710525512695312\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Thu Jan 14 00:00:00 GMT 2021\n      <\/td>\n<td>\n        10.8125\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Fri Jan 15 00:00:00 GMT 2021\n      <\/td>\n<td>\n        52.0\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Sat Jan 16 00:00:00 GMT 2021\n      <\/td>\n<td>\n        28.200000762939453\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Sun Jan 17 00:00:00 GMT 2021\n      <\/td>\n<td>\n        9.977272987365723\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Mon Jan 18 00:00:00 GMT 2021\n      <\/td>\n<td>\n        9.100000381469727\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Tue Jan 19 00:00:00 GMT 2021\n      <\/td>\n<td>\n        25.66666603088379\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Wed Jan 20 00:00:00 GMT 2021\n      <\/td>\n<td>\n        34.349998474121094\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Thu Jan 21 00:00:00 GMT 2021\n      <\/td>\n<td>\n        5.5\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Fri Jan 22 00:00:00 GMT 2021\n      <\/td>\n<td>\n        7.472727298736572\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Sat Jan 23 00:00:00 GMT 2021\n      <\/td>\n<td>\n        10.5\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Sun Jan 24 00:00:00 GMT 2021\n      <\/td>\n<td>\n        17.0\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Mon Jan 25 00:00:00 GMT 2021\n      <\/td>\n<td>\n        21.0\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Tue Jan 26 00:00:00 GMT 2021\n      <\/td>\n<td>\n        15.852941513061523\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Wed Jan 27 00:00:00 GMT 2021\n      <\/td>\n<td>\n        7.984375\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Thu Jan 28 00:00:00 GMT 2021\n      <\/td>\n<td>\n        42.83333206176758\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Fri Jan 29 00:00:00 GMT 2021\n      <\/td>\n<td>\n        9.083333015441895\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Sat Jan 30 00:00:00 GMT 2021\n      <\/td>\n<td>\n        11.892857551574707\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Sun Jan 31 00:00:00 GMT 2021\n      <\/td>\n<td>\n        14.371428489685059\n      <\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>While TIME_SAMPLING is useful, it has has some limitations since it only returns a linear interpolation for each window, each of which is typically similar to the average value (like medians are similar) but is not a true average. Likewise, you can&#8217;t find the number of rows in the time window or the minimum or maximum values.<\/p>\n<h2>Windowed Aggregations with Multi-Query<\/h2>\n<p>To find any aggregation for a set of timeseries windows, we can use GridDB&#8217;s multi-query function. This runs the specified aggregation for each time window separately. The following graphic shows the queries for each window:<\/p>\n<p>You might think performing the operations like this would be slow, but by using multi-query we can optimize sending the queries to GridDB and the data retrieval. The database performs the same operations as it would if the function were built-in.<\/p>\n<p>The first steps in our generic windowed aggregation function is to open the container and create a query for each window and add it to the list of queries that will be executed by GridDB. Each query is built by using Java&#8217;s Calendar class and incrementing the interval by the specified Calendar ENUM value such as Calendar.HOUR or Calendar.DATE.<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">public static void windowAggregation(GridStore store, String aggregation, Date start, Date end, int windowsize) throws GSException {\n    Calendar c = Calendar.getInstance();\n    ArrayList&lt;Query&lt;aggregationresult>> queryList = new ArrayList&lt;Query&lt;\/aggregationresult>&lt;aggregationresult>>();\n    ArrayList&lt;date> dates = new ArrayList&lt;\/date>&lt;date>();\n    Container<?, Row> ts = store.getContainer(\"NYC_TaxiTrips\");\n\n    c.setTime(start);\n    Date interval = c.getTime();\n\n    do {\n        c.add(windowsize, 1);\n        System.out.println(\"interval=\"+interval);\n        String windowquery = \"select \"+aggregation+\" where tpep_pickup_datetime > TO_TIMESTAMP_MS(\"+interval.getTime()+\") and tpep_pickup_datetime &lt; TO_TIMESTAMP_MS(\"+c.getTime().getTime()+\")\"; \n        Query&lt;aggregationresult> q = ts.query(windowquery, AggregationResult.class);\n        dates.add(interval);\n        queryList.add(q);\n        interval = c.getTime();\n    } while (interval.getTime() &lt;= end.getTime());\n&lt;\/aggregationresult>&lt;\/date>&lt;\/aggregationresult><\/code><\/pre>\n<\/div>\n<p>After we have our list of queries, we can execute them and iterate through the results.<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">    store.fetchAll(queryList);\n\n    for (int i = 0; i &lt; queryList.size(); i++) {\n        Query&lt;aggregationresult> query = queryList.get(i);\n        RowSet&lt;\/aggregationresult>&lt;aggregationresult> rs = query.getRowSet();\n        while (rs.hasNext()) {\n            AggregationResult result = rs.next();\n            double value = result.getDouble();\n            if (value != 0)\n                System.out.println(dates.get(i)+\"= \"+ value);\n        }\n    }\n\n\n}\n&lt;\/aggregationresult><\/code><\/pre>\n<\/div>\n<p>Calling <code>windowAggregate(store, \"avg(fare_amount)\", start, end, Calendar.DATE);<\/code> results in the following results:<\/p>\n<div class=\"table-wrapper\">\n<table class=\"datatable\">\n<tr>\n<th>\n        Window\n      <\/th>\n<th>\n        avg(fare_amount)\n      <\/th>\n<\/tr>\n<tr>\n<td>\n        Fri Jan 01 00:00:00 GMT 2021\n      <\/td>\n<td>\n        13.851391098873778\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Sat Jan 02 00:00:00 GMT 2021\n      <\/td>\n<td>\n        13.770499047323876\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Sun Jan 03 00:00:00 GMT 2021\n      <\/td>\n<td>\n        15.249551398785178\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Mon Jan 04 00:00:00 GMT 2021\n      <\/td>\n<td>\n        13.473628681590766\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Tue Jan 05 00:00:00 GMT 2021\n      <\/td>\n<td>\n        12.676972567160476\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Wed Jan 06 00:00:00 GMT 2021\n      <\/td>\n<td>\n        12.243332028212064\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Thu Jan 07 00:00:00 GMT 2021\n      <\/td>\n<td>\n        12.464050631310585\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Fri Jan 08 00:00:00 GMT 2021\n      <\/td>\n<td>\n        12.091422930601727\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Sat Jan 09 00:00:00 GMT 2021\n      <\/td>\n<td>\n        12.537748556275371\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Sun Jan 10 00:00:00 GMT 2021\n      <\/td>\n<td>\n        13.496787364093032\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Mon Jan 11 00:00:00 GMT 2021\n      <\/td>\n<td>\n        12.350597800281259\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Tue Jan 12 00:00:00 GMT 2021\n      <\/td>\n<td>\n        12.189052448708432\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Wed Jan 13 00:00:00 GMT 2021\n      <\/td>\n<td>\n        11.970959482137403\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Thu Jan 14 00:00:00 GMT 2021\n      <\/td>\n<td>\n        12.338237139653735\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Fri Jan 15 00:00:00 GMT 2021\n      <\/td>\n<td>\n        12.24978189382601\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Sat Jan 16 00:00:00 GMT 2021\n      <\/td>\n<td>\n        12.348960280360648\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Sun Jan 17 00:00:00 GMT 2021\n      <\/td>\n<td>\n        12.987822185285506\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Mon Jan 18 00:00:00 GMT 2021\n      <\/td>\n<td>\n        12.66304436182826\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Tue Jan 19 00:00:00 GMT 2021\n      <\/td>\n<td>\n        12.19362357336725\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Wed Jan 20 00:00:00 GMT 2021\n      <\/td>\n<td>\n        11.760170207452589\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Thu Jan 21 00:00:00 GMT 2021\n      <\/td>\n<td>\n        12.153647415269047\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Fri Jan 22 00:00:00 GMT 2021\n      <\/td>\n<td>\n        12.026541242751565\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Sat Jan 23 00:00:00 GMT 2021\n      <\/td>\n<td>\n        11.73361113486781\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Sun Jan 24 00:00:00 GMT 2021\n      <\/td>\n<td>\n        12.876742517934895\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Mon Jan 25 00:00:00 GMT 2021\n      <\/td>\n<td>\n        12.229045667216711\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Tue Jan 26 00:00:00 GMT 2021\n      <\/td>\n<td>\n        11.716670845330835\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Wed Jan 27 00:00:00 GMT 2021\n      <\/td>\n<td>\n        11.823579132291002\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Thu Jan 28 00:00:00 GMT 2021\n      <\/td>\n<td>\n        11.842199614451049\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Fri Jan 29 00:00:00 GMT 2021\n      <\/td>\n<td>\n        11.784085302551507\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Sat Jan 30 00:00:00 GMT 2021\n      <\/td>\n<td>\n        11.843539460445053\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Sun Jan 31 00:00:00 GMT 2021\n      <\/td>\n<td>\n        12.406643581985854\n      <\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>We can also see the number of rows by calling <code>windowAggregate(store, \"count(*)\", start, end, Calendar.DATE)<\/code>:<\/p>\n<div class=\"table-wrapper\">\n<table class=\"datatable\">\n<tr>\n<th>\n        Window\n      <\/th>\n<th>\n        COUNT(*)\n      <\/th>\n<\/tr>\n<tr>\n<td>\n        Fri Jan 01 00:00:00 GMT 2021\n      <\/td>\n<td>\n        20430.0\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Sat Jan 02 00:00:00 GMT 2021\n      <\/td>\n<td>\n        25429.0\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Sun Jan 03 00:00:00 GMT 2021\n      <\/td>\n<td>\n        20909.0\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Mon Jan 04 00:00:00 GMT 2021\n      <\/td>\n<td>\n        30733.0\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Tue Jan 05 00:00:00 GMT 2021\n      <\/td>\n<td>\n        31667.0\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Wed Jan 06 00:00:00 GMT 2021\n      <\/td>\n<td>\n        32965.0\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Thu Jan 07 00:00:00 GMT 2021\n      <\/td>\n<td>\n        33306.0\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Fri Jan 08 00:00:00 GMT 2021\n      <\/td>\n<td>\n        33628.0\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Sat Jan 09 00:00:00 GMT 2021\n      <\/td>\n<td>\n        28626.0\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Sun Jan 10 00:00:00 GMT 2021\n      <\/td>\n<td>\n        23034.0\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Mon Jan 11 00:00:00 GMT 2021\n      <\/td>\n<td>\n        31583.0\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Tue Jan 12 00:00:00 GMT 2021\n      <\/td>\n<td>\n        33201.0\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Wed Jan 13 00:00:00 GMT 2021\n      <\/td>\n<td>\n        33633.0\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Thu Jan 14 00:00:00 GMT 2021\n      <\/td>\n<td>\n        34580.0\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Fri Jan 15 00:00:00 GMT 2021\n      <\/td>\n<td>\n        34706.0\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Sat Jan 16 00:00:00 GMT 2021\n      <\/td>\n<td>\n        28094.0\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Sun Jan 17 00:00:00 GMT 2021\n      <\/td>\n<td>\n        24373.0\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Mon Jan 18 00:00:00 GMT 2021\n      <\/td>\n<td>\n        26830.0\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Tue Jan 19 00:00:00 GMT 2021\n      <\/td>\n<td>\n        33525.0\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Wed Jan 20 00:00:00 GMT 2021\n      <\/td>\n<td>\n        32902.0\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Thu Jan 21 00:00:00 GMT 2021\n      <\/td>\n<td>\n        34652.0\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Fri Jan 22 00:00:00 GMT 2021\n      <\/td>\n<td>\n        35478.0\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Sat Jan 23 00:00:00 GMT 2021\n      <\/td>\n<td>\n        29830.0\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Sun Jan 24 00:00:00 GMT 2021\n      <\/td>\n<td>\n        23776.0\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Mon Jan 25 00:00:00 GMT 2021\n      <\/td>\n<td>\n        32064.0\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Tue Jan 26 00:00:00 GMT 2021\n      <\/td>\n<td>\n        31969.0\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Wed Jan 27 00:00:00 GMT 2021\n      <\/td>\n<td>\n        34148.0\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Thu Jan 28 00:00:00 GMT 2021\n      <\/td>\n<td>\n        35670.0\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Fri Jan 29 00:00:00 GMT 2021\n      <\/td>\n<td>\n        35219.0\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Sat Jan 30 00:00:00 GMT 2021\n      <\/td>\n<td>\n        28349.0\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Sun Jan 31 00:00:00 GMT 2021\n      <\/td>\n<td>\n        23674.0\n      <\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>If you wanted to run the window query daily to get hourly aggregates, you could set up a cronjob or loop the program with a sleep():<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">Calendar c = Calendar.getInstance();\nDate now = new Date();\nDate start = c.add(Calendar.DATE, -1).getTIme(); \nc.add(windowsize, 1);\nwindowAggregate(store, \"avg(*)\", start, now, Calendar.HOUR);\n<\/code><\/pre>\n<\/div>\n<h2>Conclusion<\/h2>\n<p>As shown, it&#8217;s easy to perform time window aggregation with GridDB. The complete source code for this blog can be found on GridDB.net&#8217;s GitHub page <a href=\"https:\/\/github.com\/griddbnet\/Blogs\/tree\/time-bucketing\">here<\/a>.<\/p>\n<div class=\"clipboard\">\n<pre><code>git clone --branch time-bucketing https:\/\/github.com\/griddbnet\/Blogs.git<\/code><\/pre>\n<\/div>\n<p>To run this project, you can use maven; first to ingest:<\/p>\n<div class=\"clipboard\">\n<pre><code>mvn package exec:java -Dexec.mainClass=\"net.griddb.tstaxiblog.IngestParquet\"<\/code><\/pre>\n<\/div>\n<p>After ingest completes, it will show the number of taxi trips ingested or errors that it couldn&#8217;t find the parquet file. It is also normal to see this error caused by the Parquet Libraries:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-bash\">java.lang.InterruptedException\n    at java.lang.Object.wait(Native Method)\n    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:144)\n    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:165)\n    at org.apache.hadoop.fs.FileSystem$Statistics$StatisticsDataReferenceCleaner.run(FileSystem.java:3693)\n    at java.lang.Thread.run(Thread.java:748)\n<\/code><\/pre>\n<\/div>\n<p>You can use gs_sh and TQL &#8220;select count(*) NYC_TaxiTrips&#8221; to confirm the data was ingested properly.<\/p>\n<p>And then to run the analysis:<\/p>\n<div class=\"clipboard\">\n<pre><code>mvn package exec:java -Dexec.mainClass=\"net.griddb.tstaxiblog.TaxiQuery\"<\/code><\/pre>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>You&#8217;ve ingested a set of timeseries data into GridDB and want to see aggregates across individual time periods (also called windows or buckets) within the data set? GridDB&#8217;s TIME_SAMPLING function allows you to perform time weighted averages but what about counts or the minimum or maximum values in each time period? For example, you want [&hellip;]<\/p>\n","protected":false},"author":71,"featured_media":28815,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[121,753],"tags":[],"class_list":["post-46732","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","category-time-series"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Time Bucketing with GridDB | GridDB: Open Source Time Series Database for IoT<\/title>\n<meta name=\"description\" content=\"You&#039;ve ingested a set of timeseries data into GridDB and want to see aggregates across individual time periods (also called windows or buckets) within the\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.griddb.net\/en\/blog\/time-bucketing-with-griddb\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Time Bucketing with GridDB | GridDB: Open Source Time Series Database for IoT\" \/>\n<meta property=\"og:description\" content=\"You&#039;ve ingested a set of timeseries data into GridDB and want to see aggregates across individual time periods (also called windows or buckets) within the\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.griddb.net\/en\/blog\/time-bucketing-with-griddb\/\" \/>\n<meta property=\"og:site_name\" content=\"GridDB: Open Source Time Series Database for IoT\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/griddbcommunity\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-09-14T07:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-03-30T20:53:08+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.griddb.net\/wp-content\/uploads\/2022\/09\/Time-Bucketing.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1160\" \/>\n\t<meta property=\"og:image:height\" content=\"653\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Owen\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@GridDBCommunity\" \/>\n<meta name=\"twitter:site\" content=\"@GridDBCommunity\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Owen\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.griddb.net\/en\/blog\/time-bucketing-with-griddb\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.griddb.net\/en\/blog\/time-bucketing-with-griddb\/\"},\"author\":{\"name\":\"Owen\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/person\/0f2f6d4b593adde8c43cf3ea5c794c66\"},\"headline\":\"Time Bucketing with GridDB\",\"datePublished\":\"2022-09-14T07:00:00+00:00\",\"dateModified\":\"2026-03-30T20:53:08+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.griddb.net\/en\/blog\/time-bucketing-with-griddb\/\"},\"wordCount\":1077,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/griddb.net\/en\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.griddb.net\/en\/blog\/time-bucketing-with-griddb\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2022\/09\/Time-Bucketing.png\",\"articleSection\":[\"Blog\",\"Time Series\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.griddb.net\/en\/blog\/time-bucketing-with-griddb\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.griddb.net\/en\/blog\/time-bucketing-with-griddb\/\",\"url\":\"https:\/\/www.griddb.net\/en\/blog\/time-bucketing-with-griddb\/\",\"name\":\"Time Bucketing with GridDB | GridDB: Open Source Time Series Database for IoT\",\"isPartOf\":{\"@id\":\"https:\/\/griddb.net\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.griddb.net\/en\/blog\/time-bucketing-with-griddb\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.griddb.net\/en\/blog\/time-bucketing-with-griddb\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2022\/09\/Time-Bucketing.png\",\"datePublished\":\"2022-09-14T07:00:00+00:00\",\"dateModified\":\"2026-03-30T20:53:08+00:00\",\"description\":\"You've ingested a set of timeseries data into GridDB and want to see aggregates across individual time periods (also called windows or buckets) within the\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.griddb.net\/en\/blog\/time-bucketing-with-griddb\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.griddb.net\/en\/blog\/time-bucketing-with-griddb\/#primaryimage\",\"url\":\"\/wp-content\/uploads\/2022\/09\/Time-Bucketing.png\",\"contentUrl\":\"\/wp-content\/uploads\/2022\/09\/Time-Bucketing.png\",\"width\":1160,\"height\":653},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/griddb.net\/en\/#website\",\"url\":\"https:\/\/griddb.net\/en\/\",\"name\":\"GridDB: Open Source Time Series Database for IoT\",\"description\":\"GridDB is an open source time-series database with the performance of NoSQL and convenience of SQL\",\"publisher\":{\"@id\":\"https:\/\/griddb.net\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/griddb.net\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/griddb.net\/en\/#organization\",\"name\":\"Fixstars\",\"url\":\"https:\/\/griddb.net\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png\",\"contentUrl\":\"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png\",\"width\":200,\"height\":83,\"caption\":\"Fixstars\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/griddbcommunity\/\",\"https:\/\/x.com\/GridDBCommunity\",\"https:\/\/www.linkedin.com\/company\/griddb-by-toshiba\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/person\/0f2f6d4b593adde8c43cf3ea5c794c66\",\"name\":\"Owen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/47438a5c81215c7a9043be1b427e0bbd8dc0f77bd536f147f8495575149e4325?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/47438a5c81215c7a9043be1b427e0bbd8dc0f77bd536f147f8495575149e4325?s=96&d=mm&r=g\",\"caption\":\"Owen\"},\"url\":\"https:\/\/www.griddb.net\/en\/author\/owen\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Time Bucketing with GridDB | GridDB: Open Source Time Series Database for IoT","description":"You've ingested a set of timeseries data into GridDB and want to see aggregates across individual time periods (also called windows or buckets) within the","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.griddb.net\/en\/blog\/time-bucketing-with-griddb\/","og_locale":"en_US","og_type":"article","og_title":"Time Bucketing with GridDB | GridDB: Open Source Time Series Database for IoT","og_description":"You've ingested a set of timeseries data into GridDB and want to see aggregates across individual time periods (also called windows or buckets) within the","og_url":"https:\/\/www.griddb.net\/en\/blog\/time-bucketing-with-griddb\/","og_site_name":"GridDB: Open Source Time Series Database for IoT","article_publisher":"https:\/\/www.facebook.com\/griddbcommunity\/","article_published_time":"2022-09-14T07:00:00+00:00","article_modified_time":"2026-03-30T20:53:08+00:00","og_image":[{"width":1160,"height":653,"url":"https:\/\/www.griddb.net\/wp-content\/uploads\/2022\/09\/Time-Bucketing.png","type":"image\/png"}],"author":"Owen","twitter_card":"summary_large_image","twitter_creator":"@GridDBCommunity","twitter_site":"@GridDBCommunity","twitter_misc":{"Written by":"Owen","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.griddb.net\/en\/blog\/time-bucketing-with-griddb\/#article","isPartOf":{"@id":"https:\/\/www.griddb.net\/en\/blog\/time-bucketing-with-griddb\/"},"author":{"name":"Owen","@id":"https:\/\/griddb.net\/en\/#\/schema\/person\/0f2f6d4b593adde8c43cf3ea5c794c66"},"headline":"Time Bucketing with GridDB","datePublished":"2022-09-14T07:00:00+00:00","dateModified":"2026-03-30T20:53:08+00:00","mainEntityOfPage":{"@id":"https:\/\/www.griddb.net\/en\/blog\/time-bucketing-with-griddb\/"},"wordCount":1077,"commentCount":0,"publisher":{"@id":"https:\/\/griddb.net\/en\/#organization"},"image":{"@id":"https:\/\/www.griddb.net\/en\/blog\/time-bucketing-with-griddb\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2022\/09\/Time-Bucketing.png","articleSection":["Blog","Time Series"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.griddb.net\/en\/blog\/time-bucketing-with-griddb\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.griddb.net\/en\/blog\/time-bucketing-with-griddb\/","url":"https:\/\/www.griddb.net\/en\/blog\/time-bucketing-with-griddb\/","name":"Time Bucketing with GridDB | GridDB: Open Source Time Series Database for IoT","isPartOf":{"@id":"https:\/\/griddb.net\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.griddb.net\/en\/blog\/time-bucketing-with-griddb\/#primaryimage"},"image":{"@id":"https:\/\/www.griddb.net\/en\/blog\/time-bucketing-with-griddb\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2022\/09\/Time-Bucketing.png","datePublished":"2022-09-14T07:00:00+00:00","dateModified":"2026-03-30T20:53:08+00:00","description":"You've ingested a set of timeseries data into GridDB and want to see aggregates across individual time periods (also called windows or buckets) within the","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.griddb.net\/en\/blog\/time-bucketing-with-griddb\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.griddb.net\/en\/blog\/time-bucketing-with-griddb\/#primaryimage","url":"\/wp-content\/uploads\/2022\/09\/Time-Bucketing.png","contentUrl":"\/wp-content\/uploads\/2022\/09\/Time-Bucketing.png","width":1160,"height":653},{"@type":"WebSite","@id":"https:\/\/griddb.net\/en\/#website","url":"https:\/\/griddb.net\/en\/","name":"GridDB: Open Source Time Series Database for IoT","description":"GridDB is an open source time-series database with the performance of NoSQL and convenience of SQL","publisher":{"@id":"https:\/\/griddb.net\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/griddb.net\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/griddb.net\/en\/#organization","name":"Fixstars","url":"https:\/\/griddb.net\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/griddb.net\/en\/#\/schema\/logo\/image\/","url":"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png","contentUrl":"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png","width":200,"height":83,"caption":"Fixstars"},"image":{"@id":"https:\/\/griddb.net\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/griddbcommunity\/","https:\/\/x.com\/GridDBCommunity","https:\/\/www.linkedin.com\/company\/griddb-by-toshiba"]},{"@type":"Person","@id":"https:\/\/griddb.net\/en\/#\/schema\/person\/0f2f6d4b593adde8c43cf3ea5c794c66","name":"Owen","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/griddb.net\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/47438a5c81215c7a9043be1b427e0bbd8dc0f77bd536f147f8495575149e4325?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/47438a5c81215c7a9043be1b427e0bbd8dc0f77bd536f147f8495575149e4325?s=96&d=mm&r=g","caption":"Owen"},"url":"https:\/\/www.griddb.net\/en\/author\/owen\/"}]}},"_links":{"self":[{"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/posts\/46732","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/users\/71"}],"replies":[{"embeddable":true,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/comments?post=46732"}],"version-history":[{"count":2,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/posts\/46732\/revisions"}],"predecessor-version":[{"id":55150,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/posts\/46732\/revisions\/55150"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/media\/28815"}],"wp:attachment":[{"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/media?parent=46732"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/categories?post=46732"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/tags?post=46732"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}