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

关于jsonpaths如何获取整个json?

Asked Jul 8, 2024 Modified Jan 1, 0001
Viewed 83
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
徐振超@SelectDB8151
answered Jul 8, 2024

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

edited Jan 1, 1970
椰子Echo@SelectDB1111
answered Jul 12, 2024
Related Questions
streamloaderd成功执行,但是没有导入数据到表里。
1 answers
doris2.1.11重复建表报错内容异常,不会提示表已经存在
1 answers
AUTO LIST PARTITION 分区名长度为何限制 50?能否配置放宽/取消?
我们通过hive catalog外表同步数据,有时候hive表会很大导致内存占满了会杀掉其他任务,限制内存又会导致同步任务失败,有什么方法可以稳定一下呢,同步效率慢一点什么的也没问题
1 answers
doris be启动报错
2 answers
Doris的json解析问题
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 中文技术论坛.