Kattle sends post request and kattlepost request
I. Introduction
Kattle is an open-source ETL Tool written in java. It can be run on Windows, Linux, and Unix, and data extraction is efficient and stable. It allows you to manage data from different databases and describe what we need to do by providing a graphical user environment. The pdi-ce-5.4.0.1-130 is used here. For http://community.pentaho.com/projects/data-integration.
Ii. Example
1. Requirements: A system releases an interface, requests the interface address in post mode, and places the parameters in the Request body. After the interface is processed, the corresponding information is returned. Now we need to use kattle to complete this job.
2. The process is as follows:
Idea: Build parameters --> send post request --> get corresponding data --> subsequent processing (print logs)
The kattle design flowchart is as follows:
1) Table input is as follows:
2) construct parameters
3) HTTP Post requests
The fields tab mainly configures Request Parameters and other information, so no configuration is required if it is not used.
4) obtain result data
5) print logs
The running log result is as follows:
15:05:09-Spoon-conversion enabled. 15:05:09-Spoon-converting [post_message]... 15:05:09-Spoon-start to execute the conversion. 15:05:09-post_message-start [post_message] 2016/04/19 15:05:09-table input to switch and release the patch. 0-Finished reading query, closing connection.2016/04/19 15:05:09-constructor. 0-Optimization level set to 9.2016/04/19 15:05:09-table input. 0-complete processing (I = 1, O = 0, R = 0, W = 1, U = 0, E = 02016/04/19 -Construction parameters. 0-complete processing (I = 0, O = 0, R = 1, W = 1, U = 0, E = 02016/04/19 15:05:09-get the result data. 0-Optimization level set to 9.2016/04/19 15:05:09-HTTP Post request. 0-complete processing (I = 0, O = 0, R = 1, W = 1, U = 0, E = 02016/04/19 15:05:09-write logs. 0-15:05:09-log writing. 0-------------> line number 1------------------------------2016/04/19 15:05:09-log writing. 0-fromUserName = 888888888888882016/04/19 15:05:09-write logs. 0-access token en = 888888 888888882016/04/19 15:05:09-write logs. 0-username = zhangsan2016/04/19 15:05:09-log writing. 0-id = 43890uj9f43r432016/04/19 15:05:09-write logs. 0-pdata = {"toUserNames": ["guest"], "fromUserName": "88888888888888", "accessToken": "88888888888888", "message": {"msgType ": 1, "username": "zhangsan", "uid": "43890uj9f43r43", "createTime": "1440056195537" }}2016/04/19 15:05:09-log writing. 0-result = {"name": "zhangsan", "age": 20 ," Gender ":" mail "} 15:05:09-log writing. 0-resultCode = 2002016/04/19 15:05:09-write logs. 0-time = 192016/04/19 15:05:09-write logs. 0-uname = zhangsan2016/04/19 15:05:09-write logs. 0-uage = 202016/04/19 15:05:09-write logs. 0-ugender = mail2016/04/19 15:05:09-write logs. 0-sfts = 12016/04/19 15:05:09-write logs. 0-15:05:09-log writing. 0-================================ 2016/04/19 15:05:09-get result data. 0-complete processing (I = 0, O = 0, R = 1, W = 1, U = 0, E = 02016/04/19 15:05:09-write logs. 0-finished processing (I = 0, O = 0, R = 1, W = 1, U = 0, E = 02016/04/19 15:05:09-Spoon-converted !!