Skip to content

JDBC River parameters

jprante edited this page Jan 18, 2013 · 3 revisions

JDBC River parameters

Overview of the default parameter settings

{
    "jdbc" :{
        "strategy" : "oneshot",
        "driver" : null,
        "url" : null,
        "user" : null,
        "password" : null,
        "sql" : null,
        "sqlparams" : null,
        "poll" : "1h",
        "rounding" : null,
        "scale" : 0,
        "autocommit" : false,
        "fetchsize" : 10,
        "max_rows" : 0,
        "max_retries" : 3,
        "max_retries_wait" : "10s",
        "locale" : Locale.getDefault().toLanguageTag(),
        "digesting" : true,
        "acksql" : null,
        "acksqlparams" : null          
    },
    "index" : {
        "index" : "jdbc",
        "type" : "jdbc",
        "bulk_size" : 100,
        "max_bulk_requests" : 30,
        "index_settings" : null,
        "type_mapping" : null,
        "versioning" : false,
        "acknowledge" : false,
    }
}

strategy the strategy of the JDBC river, currently implemented: "oneshot", "simple", "table"

driver the JDBC driver class

url the JDBC URL for the driver

user the database user

password the database user pasword

sql the SQL statement. If it ends with .sql, the statement is looked up in the file system

sqlparams bind parameters for the SQL statement (in order)

poll time interval for repetitions (ignored in "oneshot" strategy)

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 be automatically executed

fetchsize the fetchsize for large result sets, most drivers implement fetchsize to control the amount of rows in the buffer while iterating through the result set

max_rows limit the number of rows fetches by a statement, the rest of the rows is ignored

max_retries the number of retries to (re)connect to a database

max_retries_wait the time that should be waited between retries

locale the default locale (used for parsing numerical values, floating point character)

digesting if a checksum should be used for the data indexed by each run (required for updates by versioning)

acksql an insert/update acknowledge SQL statement that is executed after a result set has been fetched

acksqlparams bind parameters for the acknowledge SQL statement

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

index_settings optional settings for the Elasticsearch index

type_mapping optional mapping for the Elasticsearch index type

versioning true if versioning should be used in the Elasticsearch indexed documents

acknowledge true if Elasticsearch bulk responses should be acknowledged to a database table ('table' strategy only)