since 2.9 version
This component loads data to Infobright database. It supports local load, as well as, the remote one.
If the hostname is “localhost” or “127.0.0.1” then the load will be done using a local pipe. Otherwise it will use a remote pipe. The external IP address of the server is not recognized as a local server. If loading to a remote server, then you need to start the Infobright remote load agent on the server where Infobright is running. The command to do this is: java -jar infobright-core-3.0-remote.jar [-p port] [-l loglevel]. The output can be redirected to a log file. The port defaults to 5555. The loglevel can be one of: “info”, “error”, “debug”. infobright-core-3.0-remote.jar is distributed with CloverETL or can be (downloaded) from Infobright site.
It is recommended to create a different user (not root) for loading data. The user requires the FILE privilege in order to be able to load data or use the connector:
grant FILE on *.* to 'user'@'%';
To run this component on Windows, infobright_jni.dll must be present in the Java library path (infobright-core-v3).
Input ports:
Output ports:
'\n' for Unix, '\r\n' for Windows) must be set as record delimiter. Date fields must have yyyy-MM-dd format for dates and yyyy-MM-dd HH:mm:ss format for dates with time. Xml attributes:
| Attribute | Mandatory | Description | Default |
|---|---|---|---|
id | yes | component identification | |
type | yes | component type | INFOBRIGHT_DATA_WRITER |
table | yes | table name in database for loading data. | |
dbConnection | yes | id of the Database Connection object to be used to access the database | |
dataFormat | no | bh_dataformat supported by Infobright. Available values: * txt_variable * binary - faster but works with IEE only | txt_variable |
charset | no | the character set to use to encode String values for CHAR, VARCHAR column types. | DEFAULT_CHARSET_ENCODER |
logFile | no | path to debug file. Records as they were sent to database. This attribute has higher priority then output port, i.e. if logFile is set and output port is connected no data is sent to output port. | |
timeout | no | timeout for load command (in seconds). Has effect only on Windows platform. | 15 |
cloverFields | no | delimited list of input record's fields. Only listed fields (in the order they appear in the list) will be considered for mapping onto target table's fields. | |
checkValues | no | Should strings and binary types be checked for size before being passed to the database? (Should be set to true if you support a dubugging). | false |
agentPort | no | Port the remote agent is listening on. | 5555 |
<Node cloverFields="boolField;dateField;decimalField;stringField" dataFormat="txt_variable" dbConnection="JDBC1" id="INFOBRIGHT_DATA_WRITER0" table="test1" type="INFOBRIGHT_DATA_WRITER"/>
Start Agent on server:
java -jar infobright-core-3.0-remote.jar -p 6666 -l all
Jdbc connection:
<Connection database="MYSQL" dbURL="jdbc:mysql://my_server:5029/my_database" id="JDBC2" jdbcSpecific="MYSQL" name="MyConnection" password="" type="JDBC" user="root"/>
InfobrightDataWriter definition:
<Node agentPort="6666" dbConnection="JDBC2" id="INFOBRIGHT_DATA_WRITER0" table="test" type="INFOBRIGHT_DATA_WRITER"/>