当前位置:网站首页>Kettle实验 (三)
Kettle实验 (三)
2022-04-23 09:07:00 【风梳烟】
1. 利用kettle建立与数据库MySQL的链接
2. 为kettle创建一个MySQL资料库
3. 将数据通过我们所学的Excel表方法导入数据库
4. 将数据在KETTLE当中进行行转列(两种方法)

正式实验
(1) 在my个存放资料库的数据库data

(1) 在mysql中创建一个存放资料库的数据库data


(2).在kettle中,点击connect
(2).在kettle中,点击connect
(2).在kettle中,点击connect

连接数据库,并测试成功


注意这里的User name和password都是admin
在mysql中导入excel文件:

正式实验(二) 1.在mysql中导入excel文件:
1.在mysql中导入excel文件:
导入数据成功
用Excel导入数据
表输出
输出到数据库
执行
数据库中显示

行转列在MySQL中使用以下代码实现
行转列在MySQL中使用以下代码
SELECT
date,
max(case when name='小说' then scount else 0 end) 小说,
max(case when name='微信' then scount else 0 end) 微信
from hang
group by date

版权声明
本文为[风梳烟]所创,转载请带上原文链接,感谢
https://blog.csdn.net/weixin_56814370/article/details/123447276
边栏推荐
- Please arrange star trek in advance to break through the new playing method of chain tour, and the market heat continues to rise
- ATSS(CVPR2020)
- BK3633 规格书
- Program, process, thread; Memory structure diagram; Thread creation and startup; Common methods of thread
- Go language self-study series | golang nested structure
- How to read excel table to database
- 2021李宏毅机器学习之Adaptive Learning Rate
- PCTP考试经验分享
- Matlab draw five-star red flag
- The crawler returns null when parsing with XPath. The reason why the crawler cannot get the corresponding element and the solution
猜你喜欢

Star Trek's strong attack opens the dream linkage between metacosmic virtual reality

MySQL小練習(僅適合初學者,非初學者勿進)

Production practice elk

valgrind和kcachegrind使用运行分析

Latex paper typesetting operation

搞不懂时间、时间戳、时区,快来看这篇

Automatic differentiation and higher order derivative in deep learning framework

ATSS(CVPR2020)

Flink SQL realizes the integration of stream and batch

npm报错 :operation not permitted, mkdir ‘C: \Program Files \node js \node_ cache _ cacache’
随机推荐
共享办公室,提升入驻体验
Matlab draw five-star red flag
How to protect open source projects from supply chain attacks - Security Design (1)
机器学习(六)——贝叶斯分类器
Trc20 fund collection solution based on thinkphp5 version
Redis Desktop Manager for Mac
L2-024 部落 (25 分)(并查集)
Resource packaging dependency tree
Data visualization: use Excel to make radar chart
[SQL Server fast track] view and cursor of database
Talent Plan 学习营初体验:交流+坚持 开源协作课程学习的不二路径
DJ music management software pioneer DJ rekordbox
web页面如何渲染
[original] use system Text. JSON formats the JSON string
SAP 101K 411K 库存变化
Technological innovation in government affairs in the construction of Digital Government
Whether the same binary search tree (25 points)
501. 二叉搜索树中的众数
Enterprise wechat application authorization / silent login
EmuElec 编译总结