当前位置:网站首页>Restcloud ETL practice data row column conversion
Restcloud ETL practice data row column conversion
2022-07-01 02:42:00 【RestCloud】

RestCloud ETL Community Edition is a data integration tool , Provide visual multi data pipeline construction 、 Data source management 、 Operation monitoring and authority management functions .
This article will simplify the table data in the figure below by converting multiple rows to multiple columns .

Simplify your thinking : Turn the grades of different subjects in the same name into column names , Convert three rows of data in the database into one row of data for display .
The first is process design

Three components are used here , They are library table input 、 Convert multiple rows to multiple columns 、 Library table output , Library table input obtains table data , Then the data structure is redistributed from multiple rows to multiple columns , Then output the data into a new database table through the database table output .
Component configuration
1. Library table input

This is mainly used to obtain data , You only need to configure the data source and database tables , Make sure you can input data , Others are generated automatically .
2. Multi row to multi column

In the node where the data is located, select the node where the source data is located , Get the data that needs to be converted .
Select the field to be grouped in the grouping field , For example, according to the above database , There are three subjects under the same name , Then you can select XM This field .
Key fields id Here is the field to be selected to convert the value into a column .

Here, according to the key fields selected in the basic attributes id, Get key fields id In the value of the , Then according to this value, get the corresponding data in the data field and put it into the corresponding new target field .
3. Library table output

Here, select the output data source , And the name of the watch .

In field configuration, you need to configure the output fields and the new target fields after conversion , Remove unnecessary fields . If it has become a column name as a condition KCMC Fields and values have been assigned to the new field CJ Field .

Don't forget when exporting , If it is a new table, you need to select auto create table .
Run the process after configuration .

In the log, you can see the prompt that the table was successfully created and the data was successfully inserted .
Data has also been successfully written to the database .


Thank you for your attention and support ! For more features , Please join RestCloud ETL Community free download experience , Download address :https://etl.restcloud.cn
边栏推荐
猜你喜欢

最新微信ipad协议 CODE获取 公众号授权等

What is PMP?

Qu'est - ce que le PMP?

LabVIEW calculates the camera image sensor resolution and lens focal length

Restcloud ETl数据通过时间戳实现增量数据同步

centos 安装多个版本的php并切换

Pychar open remote directory remote host

单片机 MCU 固件打包脚本软件

Gartner research: in China, the adoption of hybrid cloud has become the mainstream trend

AI edge computing platform - beaglebone AI 64 introduction
随机推荐
Viewing JVM parameters
Pulsar的Proxy支持和SNI路由
How to use Jieba participle in unity
单片机 MCU 固件打包脚本软件
RestCloud ETL WebService数据同步到本地
Small program cloud development -- wechat official account article collection
How to realize the scene linkage of intelligent lock, lamp and intelligent curtain motor in zhiting?
C # generates PPK files in putty format (supports passphrase)
Focusing on green and low carbon, data center cooling has entered a new era of "intelligent cooling"
旷世轻量化网络ShuffulNetV2学习笔记
Gartner研究:在中国,混合云的采用已成为主流趋势
The image variables in the Halcon variable window are not displayed, and it is useless to restart the software and the computer
Leetcode (524) -- match the longest word in the dictionary by deleting letters
Zero foundation self-study SQL course | window function
详解数据治理知识体系
What is project management?
Codeforces Round #416 (Div. 2) C. Vladik and Memorable Trip
Résumé des styles de développement d'applets Wechat
Codeforces Round #416 (Div. 2) C. Vladik and Memorable Trip
联想X86服务器重启管理控制器(XClarity Controller)或TSM的方法