当前位置:网站首页>问卷问题和答案的合并
问卷问题和答案的合并
2022-08-09 09:12:00 【不爱研究的研究僧】
得到的question和answer是json格式,字段是map<string,string>,需要将序号和后面的问题或者答案分开,采用lateral view explode的方法,lateral view explode和explode相比,可以select 非炸裂的字段
要注意炸裂后的两个字段不用括号,如果有where,where放在最后面
select q_key, q_value
from questionnaire
lateral view explode(questions) t as q_key, q_value可以多次使用lateral view explode
select q_key, q_value, a_key, a_value
from questionnaire
lateral view explode(questions) t as q_key, q_value
lateral view explode(answers) t2 as a_key, a_value
where q_key=a_key 边栏推荐
- .net 控件calendar 基础用法
- RESTful
- parse <compoN> error: Custom Component‘name should be form of my-component, not myComponent or MyCom
- [V&N2020 Open] Memory Forensics
- 关于指针、地址的大小的问题(以及malloc的用法)
- Read file by byte and character_load configuration file
- MySQL transaction isolation
- H5页面px不对,单位不对等问题
- VoLTE基础自学系列 | IMS的业务触发机制
- 困扰很久的问题。今天下午搞定了。
猜你喜欢

Web请求原理

The era of Google Maps is over, how to view high-definition satellite image maps?

MySQL事件_单次事件_定时循环事件

MySQL event_single event_timed loop event

Calendar类和Date类转换时区 && 部分时区城市列表
![[Vulnerability reproduction] CVE-2018-12613 (remote file inclusion)](/img/0b/707eb4266cb5099ca1ef58225642bf.png)
[Vulnerability reproduction] CVE-2018-12613 (remote file inclusion)

MySQL lock

【场景化解决方案】构建门店通讯录,“门店通”实现零售门店标准化运营

VoLTE基础自学系列 | IMS的业务触发机制

MySQL查漏补缺(五)不熟悉的知识点
随机推荐
MySQL查漏补缺(二)排序检索、过滤数据、模糊查询、正则表达式
困扰很久的问题。今天下午搞定了。
全球19级谷歌卫星地图免费查看下载
gin中模型中增删改查+搜索分页
Domestic Google earth, terrain analysis seconds kill with the map software
Swap swap partition
Web请求原理
Calendar类和Date类转换时区 && 部分时区城市列表
AES/ECB/PKCS5Padding加解密
医院智能3D蓝牙导航导诊系统
XCTF College War "Epidemic" Network Security Sharing Competition Misc wp
canal工作原理及简单案例演示
Ovie map computer terminal and mobile terminal can not be used, is there any alternative map tool
MySQL Checking and Filling Leaks (5) Unfamiliar Knowledge Points
fastadmin图片上传方法改造
栈的实现之用链表实现
一篇文章带你熟悉 TCP/IP 协议(网络协议篇二)
【LeetCode每日一题】——225.用队列实现栈
The difference between big-endian and little-endian storage is easy to understand at a glance
【场景化解决方案】OA审批与用友U9数据集成