目录
一、txt2hive
二、txt2mysql
一、txt2hive
{"setting": {},"job": {"setting": {"speed": {"channel": 4}},"errorLimit": {"percentage": 0.02},"content": [{"reader": {"name": "txtfilereader","parameter": {"path": ["D:\\datax_project\\datax\\zqykj\\sourceData"],"fileName": "","encoding": "UTF-8","column": [{"index": 0,"type": "string"},{"index": 1,"type": "string"},{"index": 2,"type": "string"},{"index": 3,"type": "string"},{"index": 4,"type": "string"},{"index": 5,"type": "string"},{"index": 6,"type": "string"},{"index": 7,"type": "string"},{"index": 8,"type": "string"},{"index": 9,"type": "string"},{"index": 10,"type": "string"},{"index": 11,"type": "string"},{"index": 12,"type": "string"},{"index": 13,"type": "string"},{"index": 14,"type": "string"},{"index": 15,"type": "string"},{"index": 16,"type": "string"},{"index": 17,"type": "string"},{"index": 18,"type": "string"},{"index": 19,"type": "string"},{"index": 20,"type": "string"},{"index": 21,"type": "string"},{"index": 22,"type": "string"},{"index": 23,"type": "string"},{"index": 24,"type": "string"},{"index": 25,"type": "string"},{"index": 26,"type": "string"},{"index": 27,"type": "string"},{"index": 28,"type": "string"},{"index": 29,"type": "string"},{"index": 30,"type": "string"},{"index": 31,"type": "string"},{"index": 32,"type": "string"},{"index": 33,"type": "string"},{"index": 34,"type": "string"},{"index": 35,"type": "string"},{"index": 36,"type": "string"},{"index": 37,"type": "string"},{"index": 38,"type": "string"},{"index": 39,"type": "string"},{"index": 40,"type": "string"},{"index": 41,"type": "string"},{"index": 42,"type": "string"},{"index": 43,"type": "string"},{"index": 44,"type": "string"},{"index": 45,"type": "string"},{"index": 46,"type": "string"},{"index": 47,"type": "string"},{"index": 48,"type": "string"},{"index": 49,"type": "string"},{"index": 50,"type": "string"},{"index": 51,"type": "string"},{"index": 52,"type": "string"},{"index": 53,"type": "string"},{"index": 54,"type": "string"},{"index": 55,"type": "string"},{"index": 56,"type": "string"},{"index": 57,"type": "string"},{"index": 58,"type": "string"},{"index": 59,"type": "string"},{"index": 60,"type": "string"},{"index": 61,"type": "string"},{"index": 62,"type": "string"},{"index": 63,"type": "string"},{"index": 64,"type": "string"},{"index": 65,"type": "string"},{"index": 66,"type": "string"},{"index": 67,"type": "string"},{"index": 68,"type": "string"},{"index": 69,"type": "string"},{"index": 70,"type": "string"},{"index": 71,"type": "string"},{"index": 72,"type": "string"},{"index": 73,"type": "string"},{"index": 74,"type": "string"},{"index": 75,"type": "string"},{"index": 76,"type": "string"},{"index": 77,"type": "string"},{"index": 78,"type": "string"},{"index": 79,"type": "string"},{"index": 80,"type": "string"},{"index": 81,"type": "string"},{"index": 82,"type": "string"},{"index": 83,"type": "string"},{"index": 84,"type": "string"},{"index": 85,"type": "string"},{"index": 86,"type": "string"},{"index": 87,"type": "string"},{"index": 88,"type": "string"},{"index": 89,"type": "string"},{"index": 90,"type": "string"},{"index": 91,"type": "string"},{"index": 92,"type": "string"},{"index": 93,"type": "string"},{"index": 94,"type": "string"},{"index": 95,"type": "string"},{"index": 96,"type": "string"},{"index": 97,"type": "string"},{"index": 98,"type": "string"},{"index": 99,"type": "string"},{"index": 100,"type": "string"},{"index": 101,"type": "string"}],"fieldDelimiter": "|+|","fileFormat": "dat","nullFormat": "^(\\s*|\\s*\\.\\s*|null)$"}},"writer": {"name": "hdfswriter","parameter": {"defaultFS": "hdfs://172.30.6.5:8020","fieldDelimiter": "|","fileType": "ORC","path": "/user/hive/warehouse/jxpoc_dw.db/t2a_trans_init/","fileName": "t2a_trans_init","writeMode": "truncate","column": [{"index": 0,"type": "string"},{"index": 1,"type": "string"},{"index": 2,"type": "string"},{"index": 3,"type": "string"},{"index": 4,"type": "string"},{"index": 5,"type": "string"},{"index": 6,"type": "string"},{"index": 7,"type": "string"},{"index": 8,"type": "string"},{"index": 9,"type": "string"},{"index": 10,"type": "string"},{"index": 11,"type": "string"},{"index": 12,"type": "string"},{"index": 13,"type": "string"},{"index": 14,"type": "string"},{"index": 15,"type": "string"},{"index": 16,"type": "string"},{"index": 17,"type": "string"},{"index": 18,"type": "string"},{"index": 19,"type": "string"},{"index": 20,"type": "string"},{"index": 21,"type": "string"},{"index": 22,"type": "string"},{"index": 23,"type": "string"},{"index": 24,"type": "string"},{"index": 25,"type": "string"},{"index": 26,"type": "string"},{"index": 27,"type": "string"},{"index": 28,"type": "string"},{"index": 29,"type": "string"},{"index": 30,"type": "string"},{"index": 31,"type": "string"},{"index": 32,"type": "string"},{"index": 33,"type": "string"},{"index": 34,"type": "string"},{"index": 35,"type": "string"},{"index": 36,"type": "string"},{"index": 37,"type": "string"},{"index": 38,"type": "string"},{"index": 39,"type": "string"},{"index": 40,"type": "string"},{"index": 41,"type": "string"},{"index": 42,"type": "string"},{"index": 43,"type": "string"},{"index": 44,"type": "string"},{"index": 45,"type": "string"},{"index": 46,"type": "string"},{"index": 47,"type": "string"},{"index": 48,"type": "string"},{"index": 49,"type": "string"},{"index": 50,"type": "string"},{"index": 51,"type": "string"},{"index": 52,"type": "string"},{"index": 53,"type": "string"},{"index": 54,"type": "string"},{"index": 55,"type": "string"},{"index": 56,"type": "string"},{"index": 57,"type": "string"},{"index": 58,"type": "string"},{"index": 59,"type": "string"},{"index": 60,"type": "string"},{"index": 61,"type": "string"},{"index": 62,"type": "string"},{"index": 63,"type": "string"},{"index": 64,"type": "string"},{"index": 65,"type": "string"},{"index": 66,"type": "string"},{"index": 67,"type": "string"},{"index": 68,"type": "string"},{"index": 69,"type": "string"},{"index": 70,"type": "string"},{"index": 71,"type": "string"},{"index": 72,"type": "string"},{"index": 73,"type": "string"},{"index": 74,"type": "string"},{"index": 75,"type": "string"},{"index": 76,"type": "string"},{"index": 77,"type": "string"},{"index": 78,"type": "string"},{"index": 79,"type": "string"},{"index": 80,"type": "string"},{"index": 81,"type": "string"},{"index": 82,"type": "string"},{"index": 83,"type": "string"},{"index": 84,"type": "string"},{"index": 85,"type": "string"},{"index": 86,"type": "string"},{"index": 87,"type": "string"},{"index": 88,"type": "string"},{"index": 89,"type": "string"},{"index": 90,"type": "string"},{"index": 91,"type": "string"},{"index": 92,"type": "string"},{"index": 93,"type": "string"},{"index": 94,"type": "string"},{"index": 95,"type": "string"},{"index": 96,"type": "string"},{"index": 97,"type": "string"},{"index": 98,"type": "string"},{"index": 99,"type": "string"},{"index": 100,"type": "string"},{"index": 101,"type": "string"}],"tableName": null,"hdfsPath": null}}}]}
}
二、txt2mysql
{"setting": {},"job": {"setting": {"speed": {"channel": 4}},"errorLimit": {"percentage": 0.02},"content": [{"reader": {"name": "txtfilereader","parameter": {"path": ["C:/Users/dell/Desktop/history/"],"fileName": "P20210257_JS_FXQ_TRAN_20220827_0001.dat","encoding": "UTF-8","column": [{"index": 0,"type": "string"},{"index": 1,"type": "string"},{"index": 2,"type": "string"},{"index": 3,"type": "string"},{"index": 4,"type": "string"},{"index": 5,"type": "string"},{"index": 6,"type": "string"},{"index": 7,"type": "string"},{"index": 8,"type": "string"},{"index": 9,"type": "string"},{"index": 10,"type": "string"},{"index": 11,"type": "string"},{"index": 12,"type": "string"},{"index": 13,"type": "string"},{"index": 14,"type": "string"},{"index": 15,"type": "string"},{"index": 16,"type": "string"},{"index": 17,"type": "string"},{"index": 18,"type": "string"},{"index": 19,"type": "string"},{"index": 20,"type": "string"},{"index": 21,"type": "string"},{"index": 22,"type": "string"},{"index": 23,"type": "string"},{"index": 24,"type": "string"},{"index": 25,"type": "string"},{"index": 26,"type": "string"},{"index": 27,"type": "string"},{"index": 28,"type": "string"},{"index": 29,"type": "string"},{"index": 30,"type": "string"},{"index": 31,"type": "string"},{"index": 32,"type": "string"},{"index": 33,"type": "string"},{"index": 34,"type": "string"},{"index": 35,"type": "string"},{"index": 36,"type": "string"},{"index": 37,"type": "string"},{"index": 38,"type": "string"},{"index": 39,"type": "string"},{"index": 40,"type": "string"},{"index": 41,"type": "string"},{"index": 42,"type": "string"},{"index": 43,"type": "string"},{"index": 44,"type": "string"},{"index": 45,"type": "string"},{"index": 46,"type": "string"},{"index": 47,"type": "string"},{"index": 48,"type": "string"},{"index": 49,"type": "string"},{"index": 50,"type": "string"},{"index": 51,"type": "string"},{"index": 52,"type": "string"},{"index": 53,"type": "string"},{"index": 54,"type": "string"},{"index": 55,"type": "string"},{"index": 56,"type": "string"},{"index": 57,"type": "string"},{"index": 58,"type": "string"},{"index": 59,"type": "string"},{"index": 60,"type": "string"},{"index": 61,"type": "string"},{"index": 62,"type": "string"},{"index": 63,"type": "string"},{"index": 64,"type": "string"},{"index": 65,"type": "string"},{"index": 66,"type": "string"},{"index": 67,"type": "string"},{"index": 68,"type": "string"},{"index": 69,"type": "string"},{"index": 70,"type": "string"},{"index": 71,"type": "string"},{"index": 72,"type": "string"},{"index": 73,"type": "string"},{"index": 74,"type": "string"},{"index": 75,"type": "string"},{"index": 76,"type": "string"},{"index": 77,"type": "string"},{"index": 78,"type": "string"},{"index": 79,"type": "string"},{"index": 80,"type": "string"},{"index": 81,"type": "string"},{"index": 82,"type": "string"},{"index": 83,"type": "string"},{"index": 84,"type": "string"},{"index": 85,"type": "string"},{"index": 86,"type": "string"},{"index": 87,"type": "string"},{"index": 88,"type": "string"},{"index": 89,"type": "string"},{"index": 90,"type": "string"},{"index": 91,"type": "string"},{"index": 92,"type": "string"},{"index": 93,"type": "string"},{"index": 94,"type": "string"},{"index": 95,"type": "string"},{"index": 96,"type": "string"},{"index": 97,"type": "string"},{"index": 98,"type": "string"}],"fieldDelimiter": "|@|","fileFormat": "dat","nullFormat": "^(\\s*|\\s*\\.\\s*|null)$"}},"writer": {"name": "mysqlwriter","parameter": {"username": "root","password": "Iamzqykj1!","writeMode": "insert","column": ["Crm_Type","ANTMYLNDG_RPT_ID","Scn_Type","TX_ID","CUST_NO","TX_DT","DETAIL_SOURCE","BIZ_TYPE","BIZ_LINE","REPORT_BIZ_LINE","DETAIL_NUM","TERM_CURR_IND","ACCT_CARD_IND","CUST_ACCT_NUM","CUST_NAME","CUST_IND","CUST_AGE","IC_CARD_CURR_TYPE","CURRENCY_CD","DEPOSIT_TYPE","SALE_PRODUCT_ID","FUND_USE_CD","CUST_TYPE_CD","TX_TM","TX_AMT","TX_AMT_RMB","TX_AMT_USD","CREDIT_DEBIT_IND","RECEIVE_PAY_IND","TX_TYPE","TX_METHOD","REMIT_TYPE","TX_CHANNEL_TYPE","TX_DEAL_NUM","OVRLSTTN_EV_TRCK_NO","TELLER_NO","TX_CD","TX_ORG","TX_ORG_NAME","TX_AREA","TX_NATION_CD","TX_DIR","CRED_NUM","CRED_TYPE","ABSTRACT_CD","ABSTRACT_DESC","ACCT_ATTR","ACCT_TYPE","FUND_PURPOSE","OPEN_ORG","OPEN_ORG_NAME","OPEN_ORG_DISTRICT_CD","FXQ_ORG","FXQ_ORG_NAME","OPEN_DT","CLOSE_DT","LAST_TX_DETAIL_DT","PRODUCT_TYPE","CNTER_SYS_ACCT_NUM","CNTER_ACCT_MODI_NUM","CNTER_ACCT_TYPE","CNTER_ACCT_ATTR","CNTER_CUST_IND","CNTER_CUST_ACCT_NUM","CNTER_CUST_NO","CNTER_CUST_NAME","CNTER_IN_OUT_BANK_IND","CNTER_CERT_NUM","CNTER_CERT_TYPE","CNTER_CERT_TYPE_DESC","CNTER_MERCHANT_NO","CNTER_MERCHANT_TYPE","CNTER_OPEN_ORG","CNTER_OPEN_ORG_DISTRICT_CD","CNTER_TERM_CURR_IND","CNTER_FIN_ORG_CD","CNTER_FIN_ORG_NAME","CNTER_FIN_ORG_DISTRICT_CD","CNTER_FIN_ORG_TYPE","CNTER_PARTY_NATISING2","TERMINAL_INFO","BT_FREE","ST_FREE","NST_FREE","AGENT_NAME","AGENT_CERT_TYPE","AGENT_CERT_TYPE_DESC","AGENT_CERT_NUM","AGENT_PHONE_NUM","AGENT_NATION","IS_AGENT_IND","IS_CROSS_TX_IND","STL_TYPE","IS_CROSS_BANK_IND","IS_REMOTE_IND","AGR_ORG","ACCOUNT_BAL","COMMENT1","COMMENT2"],"session": [],"preSql": [],"connection": [{"jdbcUrl": "jdbc:mysql://172.30.6.191:3306/jsccb_test_data","table": ["test"]}]}}}]}
}