Kettle

在kettle目录下执行 ./pan.sh /file:/tang/222.ktr 

在资源库中执行  ./kitchen.sh -rep=kettle1 -user=admin -pass=admin -level=Basic -job=job    http://blog.csdn.net/lan12334321234/article/details/70049526?locationNum=3&fps=1

可用函数 CURRENT_TIMESTAMP   例如 select CURRENT_TIMESTAMP from xxx

设置资源库在.kettle的repositories中    (下面是添加一个资源库的代码,复制进这个文件)

<repository>
<id>KettleFileRepository</id>
<name>resource</name>
<description>resource</description>
<base_directory>/tang/kettle_resource</base_directory>
<read_only>N</read_only>
<hides_hidden_files>N</hides_hidden_files>
</repository>

效率问题:可通过右键 ,,然后选 改变开始复制的数量  来提高

job可以通过设置 run next entries in parallel 来进行并发执行转换

日志:

select
cast((case
when
(trim(substring_index(substring_index(LOG_FIELD,'Retrieved',-(1)),'records',1)) REGEXP '^[0-9]+$' )
then trim(substring_index(substring_index(LOG_FIELD,'Retrieved',-(1)),'records',1))
when
(trim(substring_index(substring_index(LOG_FIELD,'Exported',-(1)),'records',1)) REGEXP '^[0-9]+$' )
then trim(substring_index(substring_index(LOG_FIELD,'Exported',-(1)),'records',1))
else 0
END ) as signed
) as 'RECORDS'
from job_log t;


select
left(SUBSTRING_INDEX(LOG_FIELD,'TASK_ID:',-(1)),
9
) as 'TASK_ID'
FROM job_log t

 

原文地址:https://www.cnblogs.com/tangbinghaochi/p/7562118.html