# データエクスプローラーはJSON抽出をサポートしていますか？

**URL:** https://meta.discourse.org/t/does-the-data-explorer-support-json-extracts/256666
**Category:** Data & reporting
**Tags:** sql-query
**Created:** [2023 年 3 月 1 日午前 11:40 UTC](https://meta.discourse.org/t/does-the-data-explorer-support-json-extracts/256666 "2023-03-01T11:40:20Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![kinetiksoft](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kinetiksoft/32/229578_2.png) [@kinetiksoft](https://meta.discourse.org/u/kinetiksoft)
#### Post date: [2023 年 3 月 1 日午前 11:40 UTC](https://meta.discourse.org/t/does-the-data-explorer-support-json-extracts/256666/1 "2023-03-01T11:40:20Z")

</div>

[Data Explorer](https://meta.discourse.org/t/32566?silent=true) は [JSON 関数](https://dev.mysql.com/doc/refman/8.0/en/json-search-functions.html) をサポートしていないということでよろしいでしょうか？

試したところ、以下のエラーが返されました。

> PG::UndefinedFunction: ERROR: function json\_extract(text, unknown) does not exist
> 
> HINT: No function matches the given name and argument types. You might need to add explicit type casts.

---

<div class="post-metadata">

### Author: ![leonardo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/leonardo/32/228634_2.png) [@leonardo](https://meta.discourse.org/u/leonardo)
#### Post date: [2023 年 3 月 1 日午後 12:28 UTC](https://meta.discourse.org/t/does-the-data-explorer-support-json-extracts/256666/2 "2023-03-01T12:28:29Z")

</div>

こんにちは！

それはMySQLの関数ですが、Data ExplorerはDiscourseのPostgreSQLデータベースにクエリを実行します。

[このStack Overflowの回答](https://stackoverflow.com/a/41248854)に基づくと、JSONデータ型にはPostgresの`@>`演算子を探しているようです。

> **[9.16. JSON Functions and Operators](https://www.postgresql.org/docs/current/functions-json.html)**
>
> 9.16. JSON Functions and Operators # 9.16.1. Processing and Creating JSON Data 9.16.2. The SQL/JSON Path Language 9.16.3. SQL/JSON Query Functions …

---

<div class="post-metadata">

### Author: ![kinetiksoft](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kinetiksoft/32/229578_2.png) [@kinetiksoft](https://meta.discourse.org/u/kinetiksoft)
#### Post date: [2023 年 3 月 1 日午後 12:46 UTC](https://meta.discourse.org/t/does-the-data-explorer-support-json-extracts/256666/3 "2023-03-01T12:46:59Z")

</div>

ありがとうございます！実際には **json\_extract\_path\_text** に近く、[Falco’s Disorder here](https://meta.discourse.org/t/disorder-automatic-toxicity-detection-for-your-community/246587/25?u=kinetiksoft) のための素晴らしいクエリを作成するのに役立ちました。

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [2023 年 4 月 29 日午後 3:59 UTC](https://meta.discourse.org/t/does-the-data-explorer-support-json-extracts/256666/4 "2023-04-29T15:59:21Z")

</div>


