JDBC River Parametersjörg Prante edited this page on Jan 2014 · 3 Revisions Pages the
- Home
- Bulk indexing
- How bulk indexing was used by the JDBC River
- JDBC Plugin feeder mode as an alternative to the deprecated Elasticsearch River API
- JDBC River Parameters
- Labeled Columns
- Moving a table into Elasticsearch
- Oracle Schedule Example Script
- Quickstart
- Riversource, Rivermouth, and Riverflow
- Step by step recipe, setting up, with PostgreSQL
- Step by step recipe, setting up, with SQL Server
- Strategies
- Structured Objects
- Using a series of SQL statements
Clone this wiki locallyClone in Desktop
Overview of the default parameter settings:
{ "jdbc" :{ "strategy" : "simple", "url" : null, "user" : null, "password" : null, "sql" : null, "schedule" : null, "poolsize" : 1, "rounding" : null, "scale" : 2, "autocommit" : false, "fetchsize" : 10, /* Integer.MIN for MySQL */ "max_rows" : 0, "max_retries" : 3, "max_retries_wait" : "30s", "locale" : Locale.getDefault().toLanguageTag(), "index" : "jdbc", "type" : "jdbc", "bulk_size" : 100, "max_bulk_requests" : 30, "bulk_flush_interval" : "5s", "index_settings" : null, "type_mapping" : null }}
strategy
-the strategy of the JDBC River, currently implemented: "Simple", "column"
url
-The JDBC URL
user
-The JDBC database user
password
-The JDBC database password
sql
-SQL statement (s), either a string or a list. If a statement ends with. SQL, the statement is looked the file system. Example for a list of SQL statements:
"sql" : [ { "statement" : "select ... from ... where a = ?, b = ?, c = ?", "parameter" : [ "value for a", "value for b", "value for c" ], "callable" : false }, { "statement" : ... }]
parameter
-Bind parameters for the SQL statement (in order)
callable
-Boolean flag, if true, the SQL statement is interpreted as a JDBC callablestatement (default:false)
schedule
-a cron expression for scheduled execution. Syntax is equivalent to the Quartz cron expression format and are documented at http://jprante.github.io/elasticsearch-rive R-jdbc/apidocs/org/xbib/elasticsearch/river/jdbc/support/cron/cronexpression.html
poolsize
-The pool size of the thread pool that executes the scheduled SQL statements
rounding
-Rounding mode for numeric values: ' Ceiling ', ' down ', ' floor ', ' halfdown ', ' halfeven ', ' halfup ', ' unnecessary ', ' up '
scale
-The precision of the numeric values
autocommit
-true if each statement should is automatically executed
fetchsize
-The fetchsize for large result sets, most drivers implement to control the amount of rows in the fetchsize
buffer while ITER Ating through the result set
max_rows
-Limit the number of rows fetches by a statement, the rest of the rows are ignored
max_retries
-The number of retries to (re) connect to a database
max_retries_wait
-The time that should is waited between retries
locale
-The default locale (used for parsing numerical values, floating point character)
index
-the Elasticsearch index used for indexing the data from JDBC
type
-The Elasticsearch type of the index used for indexing the data from JDBC
bulk_size
-The length of each bulk index request submitted
max_bulk_requests
-The maximum number of concurrent bulk requests
bulk_flush_interval
-The time period the bulk processor is flushing outstanding documents
index_settings
-Optional settings for the Elasticsearch index
type_mapping
-optional mapping for the Elasticsearch index type
Elasticsearch River Parameter Document