README.md in embulk-output-oracle-0.2.1 vs README.md in embulk-output-oracle-0.2.2

- old
+ new

@@ -3,30 +3,46 @@ Oracle output plugins for Embulk loads records to Oracle. ## Overview * **Plugin type**: output -* **Load all or nothing**: depnds on the mode: +* **Load all or nothing**: depends on the mode: * **insert**: no * **replace**: yes * **Resume supported**: no ## Configuration - **driver_path**: path to the jar file of the Oracle JDBC driver (string) -- **host**: database host name (string, required if url is not set) +- **host**: database host name (string, required if url is not set or insert_method is "oci") - **port**: database port number (integer, default: 1521) - **user**: database login user name (string, required) - **password**: database login password (string, default: "") -- **database**: destination database name (string, required if url is not set) +- **database**: destination database name (string, required if url is not set or insert_method is "oci") - **url**: URL of the JDBC connection (string, optional) - **table**: destination table name (string, required) - **mode**: "replace" or "insert" (string, required) +- **insert_method**: see below - **batch_size**: size of a single batch insert (integer, default: 16777216) - **options**: extra connection properties (hash, default: {}) +insert_method supports three options. +"normal" means normal insert (default). It requires Oracle JDBC driver. + +"direct" means direct path insert. It is faster than 'normal. +It requires Oracle JDBC driver too, but the version 12 driver doesn't work (the version 11 driver works). + +"oci" means direct path insert using OCI(Oracle Call Interface). It is fastest. +It requires both Oracle JDBC driver and Oracle Instant Client (version 12.1.0.2.0). +You must set the library loading path to the OCI library. + +If you use "oci", platform dependent library written in cpp is required. +Windows(x64) library and Linux(x64) are bundled, but others are not bundled. +You should build by yourself and set the library loading path to it. + + ### Example ```yaml out: type: oracle @@ -35,12 +51,17 @@ user: root password: "" database: my_database table: my_table mode: insert + insert_method: direct ``` ### Build ``` $ ./gradlew gem ``` + +For Windows(x64), you can build cpp library by "src/main/cpp/win/build.bat". + +For Linux, you can build cpp library by "src/main/cpp/linux/build.sh".