zoukankan      html  css  js  c++  java
  • 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.

    Looking for a job working at Home about MSBI
  • 相关阅读:
    ES6 Symbol数据类型和set-map 数据结构
    ES6的字符串和数值的扩展
    获取当前的网络状态
    节流阀
    stellar.js 视差滚动
    h5新增标签及css3新增属性
    vue中使用mui滑动条无法正常滑动
    用css3画有边框的三角形
    多个选项选中某一个的效果(用到siblings()方法)
    消除移动端按钮或者输入框等点击时出现边框
  • 原文地址:https://www.cnblogs.com/huaxiaoyao/p/4158160.html
Copyright © 2011-2022 走看看