Apache Doris 中文技术论坛
Questions Tags Users Badges

关于jsonpaths如何获取整个json?

Asked Jul 8, 2024 Modified Jan 1, 0001
Viewed 131
2.1

数据内容:

{"k1" : 1, "k2": 2}

表结构:

k2 int, data varchar(1000)

导入语句

curl -v --location-trusted -u root: -H "format: json" -H "jsonpaths: [\"$.k2\", \"$\"]" -T example.json http://127.0.0.1:8030/api/db1/tbl1/_stream_load

我期望把整个json作为值,插入到data字段中,上面的导入预计改如何写?

edited Jan 1, 0001
七彩黑虫7
asked Jul 8, 2024
2 Answers

这种写法暂时不支持

这种可以看看variant类型
https://doris.apache.org/zh-CN/docs/sql-manual/sql-types/Data-Types/VARIANT

edited Oct 30, 2024
徐振超@SelectDB(可以直接加微信Faith_xzc)8286
answered Jul 8, 2024

这边需求场景是怎样的,可以说一下吗

edited Jan 1, 1970
椰子Echo@SelectDB1111
answered Jul 12, 2024
Related Questions
SelectDB Doris 2.1.8-3:CCR 下游集群 20 台 BE 缩容 1 台时 lag 持续增大,取消缩容后恢复
jetty 安全漏洞CVE-2026-10050
1 answers
通过spark connector写入数据时,doris.fenodes配置了多个节点,但只有第一个节点生效。
1 answers
SelectDB Doris 2.1.8-3 升级使用灵活部分列更新,推荐版本及升级流程咨询
1 answers
Flink Connector 26.3.0 读取 DATETIME 变成 1970 年,切换 25.0.0 后正常
1 answers
Apache Doris Dashboard未授权访问漏洞
1 answers

Terms of service Privacy policy

Powered by Answer - the open-source software that powers Q&A communities.
Made with love © 2026 Apache Doris 中文技术论坛.