Load xlsx in a folder to RDBMS table with Talend
Step 1 . Use tFileList component to get the file list. And set proper property.
Step 2. Use tFileInputExcel to Read Xlsx File. For this, I build a Excel in metadata,
This can help us build the schema for Excel.
Set the excel file property : ((String)globalMap.get("tFileList_1_CURRENT_FILEPATH"))
Step 3. I need add one additional field in the table. This field's value from the file path.
So I add one tMap component,
Use one expression to get the value.
Step 4.add one tOracleOutput compoment,
You can specify a tableName, and specify the Action on Table, help you create the table.
Now this place , you should take care of one thing, the schema get from upstream,
So you maybe need change the column size for the database table.
If we want to use parameter to replace the fixed value for the excel folder, what we should do ?
first , we should build a context in contexts.
Add one variable and set the default value .
Then in the job we create, in the context view, choose that context and variable.
Then choose the component tfilelist1 and change the property Directory:context.ExcelFolder(your variable name).
When you build the talend to jar, the main entry is the current active job. Pay attention to this.
And it will generate the shell file, context will converted to property file.
In the left panel, in Job Designs, right click, choose build job.
Load xlsx in a folder to RDBMS table with Talend的更多相关文章
- SQOOP Load Data from Oracle to Hive Table
sqoop import -D oraoop.disabled=true \ --connect "jdbc:oracle:thin:@(description=(address=(prot ...
- mysql文件导入到数据库load data infile into table 的使用例子
load data infile "C:/Users/Administrator/Desktop/1.txt"into table 要一个已经存的表名 字段默认用制表符隔开 文件 ...
- FastLoad错误 — RDBMS error 2634
我们来看一下下面这条语句: BEGIN LOADING stu_flERRORFILES error_1, error_2; 如果此时已经存在error_1或error_2表,那么将会报错,信息如 ...
- R语言︱文件读入、读出一些方法罗列(批量xlsx文件、数据库、文本txt、文件夹)
笔者寄语:小规模的读取数据的方法较为简单并且多样,但是,批量读取目前看到有以下几种方法:xlsx包.RODBC包.批量转化成csv后读入. R语言中还有一些其他较为普遍的读入,比如代码包,R文件,工作 ...
- mysql load data infile的使用 和 SELECT into outfile备份数据库数据
LOAD DATA [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE 'file_name.txt' [REPLACE | IGNORE] INTO TABLE t ...
- 快速的mysql导入导出数据(load data和outfile)
1.load data: ***实际应用:把日志生成的xls文件load到MySQL中: mysql_cmd = "iconv -c -f utf-8 -t gbk ./data/al_ve ...
- DB2 Z/os Load utility 使用
Use the LOAD online utility to load one or more tables of a table space. The LOAD utility loads reco ...
- [MySQL]load data local infile向MySQL数据库中导入数据时,无法导入和字段不分离问题。
利用load data将文件中的数据导入数据库表中的时候,遇到了两个问题. 首先是load data命令无法执行的问题: 命令行下输入load data local infile "path ...
- 批量导数据之利器-load data[2016-07-11]
由于天热,中午吃完饭后不再去逛了,感觉这段时间其实也是可以利用起来的,所以决定每天中午积累一些小的知识点.今天中午,先总结一下最近造数据用到手命令,load data. 使用这个命令的起源是因为最近要 ...
随机推荐
- 百度地图js根据经纬度定位和拖动定位点
<!DOCTYPE html><html><head> <meta http-equiv="Content-Type" content=& ...
- 第一个Object-C类
转自:http://www.cnblogs.com/heyonggang/p/3441051.html 来源:http://www.cnblogs.com/mjios/archive/2013/04/ ...
- vs2008不能创建C#项目的解决方法
解决方法:1.先关闭 Visual Studio 2008 ;2.在运行中输入命令"devenv.exe /setup"3.运行 Visual Studio 2008 ,一切搞定. ...
- MySQL常用SQL语句
一.数据库操作 1.创建数据库: Mysql> CREATE DATABASE databaseName; Mysql数据库的数据文件默认存放在/usr/local/mysql/var/目录下, ...
- 基于Eclipse的Go语言可视化开发环境
http://jingyan.baidu.com/article/d7130635032e2f13fdf475b8.html 基于Eclipse的Go语言可视化开发环境 | 浏览:2924 | 更新: ...
- linux下基本命令总结
基本linux命令的使用方法及实例,总结一些常用的命令: 一.创建文件和目录命令:mkdir touch(vim用得较多) 1)mdkir创建一个目录,创建多目录格式 mkdir –p a/{a,b ...
- mysql 5.6.33发布
2016-09-06,mysql 5.6.33社区版发布,修复的bug越发减少,而且基本上都是较少使用的特性.
- elasticsearch索引的增删改查入门
为了方便直观我们使用Head插件提供的接口进行演示,实际上内部调用的RESTful接口. RESTful接口URL的格式: http://localhost:9200/<index>/&l ...
- DOM性能小记
在使用DOM操作时,同样的效果用不同的方式来实现,性能方面也会有很大的差异.尤其在移动式设备上,资源本来就很有限,一旦DOM写不好的话操作就会非常卡顿.这个周末,就写个DOM性能小记吧.错漏之处,望多 ...
- [ javascript New Image() ] New Image() 对象讲解
创建一个Image对象:var a=new Image(); 定义Image对象的src: a.src="xxx.gif"; 这样做就相当于给浏览器缓存了一张图片. 图 ...