如何使用kettle向数据库中导入数据
1个回答
展开全部
1.准备好如下数据(以|键分割)
JY01011604280016|JY010116042800160019|1|1|2017-04-27|1000000.00|121666.66|1000000.00|121666.66| |01 |
JY01011604280022|JY010116042800220025|1|1|2017-04-27|1000000.00|121666.66|1000000.00|121666.66| |01 |
WT01011607040001|WT010116070400010002|1|1|2016-08-04|12000.00|51.67|12000.00|51.67| |01 |
JY01011602020103|JY010116020201030004|2|2|2016-06-20|0.00|28933.33|0.00|28933.33| |01 |
JY01011602020103|JY010116020201030004|3|1|2016-08-01|2000000.00|19600.00|2000000.00|19600.00| |01 |
LD01011607160101|LD010116071601010002|1|1|2016-08-23|16.67|0.94|16.67|0.94| |01 |
LD01011607160104|LD010116071601040004|1|1|2016-08-23|83.33|4.71|83.33|4.71| |01 |
JY02011607310101|JY020116073101010002|1|1|2016-08-01|233980.65|2391.67|233980.65|2391.67| |01 |
JY02011607310001|JY020116073100010002|1|1|2016-08-01|166830.63|3000.00|166830.63|3000.00| |01 |
LD01011607160101|LD010116071601010002|1|1|2016-08-23|16.67|0.94|16.67|0.94| |01 |
LD01011607160104|LD010116071601040004|1|1|2016-08-23|83.33|4.71|83.33|4.71| |01 |
LD01011607160101|LD010116071601010002|1|1|2016-08-23|16.67|0.94|16.67|0.94| |01 |
LD01011607160104|LD010116071601040004|1|1|2016-08-23|83.33|4.71|83.33|4.71| |01 |
JY01011604280016|JY010116042800160019|1|1|2017-04-27|1000000.00|121666.66|1000000.00|121666.66| |01 |
JY01011604280022|JY010116042800220025|1|1|2017-04-27|1000000.00|121666.66|1000000.00|121666.66| |01 |
WT01011607040001|WT010116070400010002|1|1|2016-08-04|12000.00|51.67|12000.00|51.67| |01 |
JY01011602020103|JY010116020201030004|2|2|2016-06-20|0.00|28933.33|0.00|28933.33| |01 |
JY01011602020103|JY010116020201030004|3|1|2016-08-01|2000000.00|19600.00|2000000.00|19600.00| |01 |
JY01011604280016|JY010116042800160019|1|1|2017-04-27|1000000.00|121666.66|1000000.00|121666.66| |01 |
JY01011604280022|JY010116042800220025|1|1|2017-04-27|1000000.00|121666.66|1000000.00|121666.66| |01 |
WT01011607040001|WT010116070400010002|1|1|2016-08-04|12000.00|51.67|12000.00|51.67| |01 |
JY01011602020103|JY010116020201030004|2|2|2016-06-20|0.00|28933.33|0.00|28933.33| |01 |
JY01011602020103|JY010116020201030004|3|1|2016-08-01|2000000.00|19600.00|2000000.00|19600.00| |01 |1234567891011121314151617181920212223
将以上数据保存为test.txt文件,存放在C盘根目录(c:\test.txt).
2.创建表
create table ACC_REPAYSCHEDULE
(
contractno VARCHAR2(30),
duebillno VARCHAR2(30) not null,
currentno VARCHAR2(30) not null,
status VARCHAR2(2),
maturedate DATE,
currentsum NUMBER(16,2),
currentinterest NUMBER(16,2),
paysum NUMBER(16,2),
payinterest NUMBER(16,2),
closedate DATE,
currency VARCHAR2(2)
)
JY01011604280016|JY010116042800160019|1|1|2017-04-27|1000000.00|121666.66|1000000.00|121666.66| |01 |
JY01011604280022|JY010116042800220025|1|1|2017-04-27|1000000.00|121666.66|1000000.00|121666.66| |01 |
WT01011607040001|WT010116070400010002|1|1|2016-08-04|12000.00|51.67|12000.00|51.67| |01 |
JY01011602020103|JY010116020201030004|2|2|2016-06-20|0.00|28933.33|0.00|28933.33| |01 |
JY01011602020103|JY010116020201030004|3|1|2016-08-01|2000000.00|19600.00|2000000.00|19600.00| |01 |
LD01011607160101|LD010116071601010002|1|1|2016-08-23|16.67|0.94|16.67|0.94| |01 |
LD01011607160104|LD010116071601040004|1|1|2016-08-23|83.33|4.71|83.33|4.71| |01 |
JY02011607310101|JY020116073101010002|1|1|2016-08-01|233980.65|2391.67|233980.65|2391.67| |01 |
JY02011607310001|JY020116073100010002|1|1|2016-08-01|166830.63|3000.00|166830.63|3000.00| |01 |
LD01011607160101|LD010116071601010002|1|1|2016-08-23|16.67|0.94|16.67|0.94| |01 |
LD01011607160104|LD010116071601040004|1|1|2016-08-23|83.33|4.71|83.33|4.71| |01 |
LD01011607160101|LD010116071601010002|1|1|2016-08-23|16.67|0.94|16.67|0.94| |01 |
LD01011607160104|LD010116071601040004|1|1|2016-08-23|83.33|4.71|83.33|4.71| |01 |
JY01011604280016|JY010116042800160019|1|1|2017-04-27|1000000.00|121666.66|1000000.00|121666.66| |01 |
JY01011604280022|JY010116042800220025|1|1|2017-04-27|1000000.00|121666.66|1000000.00|121666.66| |01 |
WT01011607040001|WT010116070400010002|1|1|2016-08-04|12000.00|51.67|12000.00|51.67| |01 |
JY01011602020103|JY010116020201030004|2|2|2016-06-20|0.00|28933.33|0.00|28933.33| |01 |
JY01011602020103|JY010116020201030004|3|1|2016-08-01|2000000.00|19600.00|2000000.00|19600.00| |01 |
JY01011604280016|JY010116042800160019|1|1|2017-04-27|1000000.00|121666.66|1000000.00|121666.66| |01 |
JY01011604280022|JY010116042800220025|1|1|2017-04-27|1000000.00|121666.66|1000000.00|121666.66| |01 |
WT01011607040001|WT010116070400010002|1|1|2016-08-04|12000.00|51.67|12000.00|51.67| |01 |
JY01011602020103|JY010116020201030004|2|2|2016-06-20|0.00|28933.33|0.00|28933.33| |01 |
JY01011602020103|JY010116020201030004|3|1|2016-08-01|2000000.00|19600.00|2000000.00|19600.00| |01 |1234567891011121314151617181920212223
将以上数据保存为test.txt文件,存放在C盘根目录(c:\test.txt).
2.创建表
create table ACC_REPAYSCHEDULE
(
contractno VARCHAR2(30),
duebillno VARCHAR2(30) not null,
currentno VARCHAR2(30) not null,
status VARCHAR2(2),
maturedate DATE,
currentsum NUMBER(16,2),
currentinterest NUMBER(16,2),
paysum NUMBER(16,2),
payinterest NUMBER(16,2),
closedate DATE,
currency VARCHAR2(2)
)
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询