当前位置:网站首页>Restcloud ETL实践之数据行列转换
Restcloud ETL实践之数据行列转换
2022-07-01 02:22:00 【RestCloud】

RestCloud ETL社区版是一款数据集成工具,提供可视化多数据管道构建、数据源管理、运行监控及权限管理功能。
本篇将使用多行转多列的方式把下方图中的表数据进行简化。

简化思路:把相同姓名中不同的学科成绩转成列名,将数据库中三行数据转变成一行数据显示。
首先是流程设计

这里使用了三个组件,分别是库表输入、多行转换为多列、库表输出,库表输入获取表数据,再由多行转多列将数据结构重新分配,再借由库表输出将数据输出成一个新的数据库表。
组件配置
1.库表输入

这里主要是用于获取数据,只需要配置数据源以及数据库表,确保能够输入数据即可,其它采用自动生成的就行了。
2.多行转多列

在数据所在的节点中选中源数据所在的节点,获取需要进行转换的数据。
分组字段中选中要进行分组的字段,比如根据上面的数据库,同一名字下有三个学科的成绩,那就可以选中XM这个字段。
关键字段id这里就是要选择将值转为列的字段。

这里根据基本属性中选中的关键字段id,获取关键字段id里的值,再根据这个值去获取数据字段里对应的数据放到对应的新的目标字段中。
3.库表输出

这里选择输出的数据源,以及表名。

字段配置中需要配置输出的字段以及转换后的新的目标字段,去掉不需要的字段。如已经作为条件变成了列名的KCMC字段和值已经赋给了新字段的CJ字段。

输出时不要忘记,若是新表则需要选择自动创建表。
完成配置后运行流程。

在日志中可以看见提示了创建表成功以及成功插入了数据。
数据库中也成功写入了数据。


感谢您对我们的关注和支持!如需了解更多的功能,请加入RestCloud ETL社区免费下载体验,下载地址:https://etl.restcloud.cn
边栏推荐
- 查看 jvm 参数
- [punch in questions] integrated daily 5 questions sharing (phase I)
- What is PMP?
- Pulsar的Proxy支持和SNI路由
- RocketQA:通过跨批次负采样(cross-batch negatives)、去噪的强负例采样(denoised hard negative sampling)与数据增强(data augment
- js中的图片预加载
- Zero foundation self-study SQL course | window function
- Alphabet rearrange inator 3000 (dictionary tree custom sorting)
- 现在开户有优惠吗?另外,手机开户安全么?
- Is there any discount for opening an account now? In addition, is it safe to open a mobile account?
猜你喜欢

Machine learning 9-universal approximator radial basis function neural network, examining PDA and SVM from a new perspective

Desai wisdom number - other charts (parallel coordinate chart): employment of fresh majors in 2021
![Pytoch -- foundation refers to the north_ II. What high school students can understand [back propagation and gradient descent]](/img/6e/279dbb7a8d7a5ecd240de464c5b8b2.png)
Pytoch -- foundation refers to the north_ II. What high school students can understand [back propagation and gradient descent]

UE4渲染管线学习笔记

FL Studio20.9水果软件高级中文版电音编曲

My PMP learning test experience

Qu'est - ce que le PMP?

(translation) reasons why real-time inline verification is easier for users to make mistakes

修复表中的名字(首字符大写,其他小写)

AI 边缘计算平台 - BeagleBone AI 64 简介
随机推荐
import tensorflow.contrib.slim as slim报错
The mobile edge browser cannot open the third-party application
SQL语句关联表 如何添加关联表的条件 [需要null值或不需要null值]
Short video platform development, relying on drawerlayout to achieve side sliding menu effect
Leetcode (524) -- match the longest word in the dictionary by deleting letters
AI edge computing platform - beaglebone AI 64 introduction
The latest CSDN salary increase technology stack in 2022 overview of APP automated testing
静态域与静态方法
手机edge浏览器无法打开三方应用
Pytorch —— 基礎指北_貳 高中生都能看懂的[反向傳播和梯度下降]
How to realize the scene linkage of intelligent lock, lamp and intelligent curtain motor in zhiting?
Pytorch - - Basic Reference North Deux élèves du secondaire peuvent comprendre [Rétropropagation et Gradient descendant]
Rocketqa: cross batch negatives, de noised hard negative sampling and data augmentation
机器学习9-通用逼近器径向基函数神经网络,在新观点下审视PDA和SVM
SWT/ANR问题--AMS/WMS
Find the length of the common part of two line segments
ANR问题的分析与解决思路
[2022] Jiangxi postgraduate mathematical modeling scheme and code
Live shopping mall source code, realize left-right linkage of commodity classification pages
端口号和进程号的区别?