# Unlocking the Potential of Unstructured Data with New JSON Type Support | Greptime Biweekly Report

Source: https://greptime.com/blogs/2024-10-08-biweekly-report

## Summary

Together with our global community of contributors, GreptimeDB continues to evolve and flourish as a growing open-source project. We are grateful to each and every one of you.

Below are the highlights among recent commits:

- Support `JSON` data type, and added some commonly used `UDF`s: `get_by_path` and `json_is`.

- Added more `h3` scalar functions, for processing and analyzing spatial data.

- Added `procedure_info` and `region_statistics` tables in `information_schema` to improve system observability.

- Use batch mode to optimize `Flow` performance.

- Added slow query logging.

- Updated pgwire to resolve potential issues with connection establishment.

## Contributors

For the past two weeks, our community has been super active with a total of **180 PRs** merged. Of these, **11 PRs** were contributed by **6 individual contributors**, with many more pending to be merged.

- @[CookiePieWw](https://github.com/CookiePieWw) ([db#4770](https://github.com/GreptimeTeam/greptimedb/pull/4770) [db#4742](https://github.com/GreptimeTeam/greptimedb/pull/4742) [db#4726](https://github.com/GreptimeTeam/greptimedb/pull/4726) [db#4515](https://github.com/GreptimeTeam/greptimedb/pull/4515) [docs#1196](https://github.com/GreptimeTeam/docs/pull/1196))

- @[haoqixu](https://github.com/haoqixu) ([db-ingester-go#39](https://github.com/GreptimeTeam/greptimedb-ingester-go/pull/39))

- @[J0HN50N133](https://github.com/J0HN50N133) ([db#4774](https://github.com/GreptimeTeam/greptimedb/pull/4774) [db#4729](https://github.com/GreptimeTeam/greptimedb/pull/4729))

- @[Kev1n8](https://github.com/Kev1n8) ([db#4287](https://github.com/GreptimeTeam/greptimedb/pull/4287))

- @[lyang24](https://github.com/lyang24) ([db#4699](https://github.com/GreptimeTeam/greptimedb/pull/4699))

- @[poltao](https://github.com/poltao) ([db#4675](https://github.com/GreptimeTeam/greptimedb/pull/4675))

Congrats on becoming our most active contributors in the past 2 weeks!

👏  Welcome contributor @[haoqixu](https://github.com/haoqixu) @[Kev1n8](https://github.com/Kev1n8) join to the community as the new individual contributor, and congratulations on successfully merging their first PR!

<figure>
<img src="/blogs/2024-10-08-biweekly-report/contributorpost.png" alt="New Contributors of GreptimeDB" style="width: 70%; margin: 0 auto">
<figcaption>New Contributors of GreptimeDB</figcaption>
</figure>

A big THANK YOU to all our members and contributors! It is people like you who are making GreptimeDB a great product. Let's build an even greater community together.

## Highlights of Recent PRs

### [db#4619](https://github.com/GreptimeTeam/greptimedb/pull/4619) [db#4515](https://github.com/GreptimeTeam/greptimedb/pull/4515) [db#4720](https://github.com/GreptimeTeam/greptimedb/pull/4720) JSON data type support

Progress has been made on `JSON` data type support.

1. Both the RFC and the implementation have been merged into the main branch. 
2. Added some `UDF`s for `JSON` type: `get_by_path` and `json_is`.

### [db#4719](https://github.com/GreptimeTeam/greptimedb/pull/4719) Implemented slow query logging

The slow query logging is mainly used to record query statements that take a long time to execute.

By analyzing the slow query log, developers can find out which query statements are inefficient and optimize them accordingly.

### [db#4675](https://github.com/GreptimeTeam/greptimedb/pull/4675) Improve observability for procedure

Before this PR, we could not view the status of each `procedure`, which made it difficult to debug or verify the content related to a specific `procedure`. Therefore, this pr adds a `procedure_info` table to `information_schema`. We can query this table to get the status of the procedure, including `procedure_id`, `procedure_type`, `start_time`, `end_time`, `lock_keys` etc.

The following is an example:

```sql
select * from information_schema.procedure_info \G
```

The output will be displayed:

```bash
*************************** 1. row ***************************
  procedure_id: 140ae3dd-da22-4f5d-a447-debe55e6bbb1
procedure_type: metasrv-procedure::DropTable
    start_time: 2024-09-13 14:42:29.298000
      end_time: 2024-09-13 14:42:29.309000
        status: Done
     lock_keys: Share("__catalog_lock/greptime"),Share("__schema_lock/greptime.public"),Exclusive("__table_lock/1044")
*************************** 2. row ***************************
  procedure_id: 2a6d3155-b2c0-4503-81d7-a981393b08fb
procedure_type: metasrv-procedure::CreateTable
    start_time: 2024-09-13 14:42:33.490000
      end_time: 2024-09-13 14:42:33.498000
        status: Done
     lock_keys: Share("__catalog_lock/greptime"),Share("__schema_lock/greptime.public"),Exclusive("__table_name_lock/greptime.public.temperatures")
2 rows in set (0.01 sec)
```

### [db#4771](https://github.com/GreptimeTeam/greptimedb/pull/4771) Improve observability for Region

A new `region_statistics` table has been added to `information_schema`. We can query this table to get the status of the region, including `table_id`, `region_number`, `memtable_size` etc.

The following is an example:

```sql
select * from information_schema.region_statistics;
```

The output will be displayed:

```sql
+---------------+----------+---------------+---------------+---------------+-----------+--------+-------------+
| region_id     | table_id | region_number | memtable_size | manifest_size | sst_size  | engine | region_role |
+---------------+----------+---------------+---------------+---------------+-----------+--------+-------------+
| 4440996184064 |     1034 |             0 |       3586817 |         11704 | 301876450 | mito   | Leader      |
| 4432406249472 |     1032 |             0 |     269686817 |         12508 | 279053485 | mito   | Leader      |
| 4445291151360 |     1035 |             0 |      56686817 |          9232 | 297195520 | mito   | Leader      |
| 4436701216768 |     1033 |             0 |     239386817 |          9139 | 281388451 | mito   | Leader      |
+---------------+----------+---------------+---------------+---------------+-----------+--------+-------------+
4 rows in set (0.01 sec)
```

## Good First Issue

### [db#3262](https://github.com/GreptimeTeam/greptimedb/issues/3262) Provide an official Grafana configuration

Provides an intuitive out-of-the-box grafana dashboard for GreptimeDB.

- Keywords: Grafana

- Difficulty: Medium

### [db#4805](https://github.com/GreptimeTeam/greptimedb/issues/4805) Add more `JSON` `UDF`s

Add more `UDF`s about `JSON` data type to achieve powerful query capabilities.

- Keywords: JSON, UDF

- Difficulty: Simple

------
#### About Greptime

Greptime offers industry-leading time series database products and solutions to empower IoT and Observability scenarios, enabling enterprises to uncover valuable insights from their data with less time, complexity, and cost.

[GreptimeDB](https://github.com/GreptimeTeam/greptimedb) is an open-source, high-performance time-series database offering unified storage and analysis for metrics, logs, and events. Try it out instantly with [GreptimeCloud](https://www.greptime.com/product/cloud), a fully-managed DBaaS solution—no deployment needed!

The [Edge-Cloud Integrated Solution](https://greptime.com/product/carcloud) combines multimodal edge databases with cloud-based GreptimeDB to optimize IoT edge scenarios, cutting costs while boosting data performance.

Star us on [GitHub](https://github.com/GreptimeTeam/greptimedb) or join GreptimeDB Community on [Slack](https://www.greptime.com/slack) to get connected.
