@@ -100,19 +100,19 @@ option is typically used when the SQL statement is large or cumbersome to supply
100100The file option only supports one SQL statement. The plugin will only accept one of the options.
101101It cannot read a statement from a file as well as from the `statement` configuration parameter.
102102
103- ==== Configuring multiple SQL statements
103+ ==== Configuring multiple SQL statements
104104
105- Configuring multiple SQL statements is useful when there is a need to query and ingest data
106- from different database tables or views. It is possible to define separate Logstash
107- configuration files for each statement or to define multiple statements in a single configuration
108- file. When using multiple statements in a single Logstash configuration file, each statement
109- has to be defined as a separate jdbc input (including jdbc driver, connection string and other
110- required parameters).
105+ Configuring multiple SQL statements is useful when there is a need to query and ingest data
106+ from different database tables or views. It is possible to define separate Logstash
107+ configuration files for each statement or to define multiple statements in a single configuration
108+ file. When using multiple statements in a single Logstash configuration file, each statement
109+ has to be defined as a separate jdbc input (including jdbc driver, connection string and other
110+ required parameters).
111111
112- Please note that if any of the statements use the `sql_last_value` parameter (e.g. for
113- ingesting only data changed since last run), each input should define its own
112+ Please note that if any of the statements use the `sql_last_value` parameter (e.g. for
113+ ingesting only data changed since last run), each input should define its own
114114`last_run_metadata_path` parameter. Failure to do so will result in undesired behaviour, as
115- all inputs will store their state to the same (default) metadata file, effectively
115+ all inputs will store their state to the same (default) metadata file, effectively
116116overwriting each other's `sql_last_value`.
117117
118118==== Predefined Parameters
@@ -185,20 +185,20 @@ input plugins.
185185
186186
187187[id="plugins-{type}s-{plugin}-clean_run"]
188- ===== `clean_run`
188+ ===== `clean_run`
189189
190190 * Value type is <<boolean,boolean>>
191191 * Default value is `false`
192192
193193Whether the previous run state should be preserved
194194
195195[id="plugins-{type}s-{plugin}-columns_charset"]
196- ===== `columns_charset`
196+ ===== `columns_charset`
197197
198198 * Value type is <<hash,hash>>
199199 * Default value is `{}`
200200
201- The character encoding for specific columns. This option will override the `:charset` option
201+ The character encoding for specific columns. This option will override the `:charset` option
202202for the specified columns.
203203
204204Example:
@@ -215,23 +215,23 @@ input {
215215this will only convert column0 that has ISO-8859-1 as an original encoding.
216216
217217[id="plugins-{type}s-{plugin}-connection_retry_attempts"]
218- ===== `connection_retry_attempts`
218+ ===== `connection_retry_attempts`
219219
220220 * Value type is <<number,number>>
221221 * Default value is `1`
222222
223223Maximum number of times to try connecting to database
224224
225225[id="plugins-{type}s-{plugin}-connection_retry_attempts_wait_time"]
226- ===== `connection_retry_attempts_wait_time`
226+ ===== `connection_retry_attempts_wait_time`
227227
228228 * Value type is <<number,number>>
229229 * Default value is `0.5`
230230
231231Number of seconds to sleep between connection attempts
232232
233233[id="plugins-{type}s-{plugin}-jdbc_connection_string"]
234- ===== `jdbc_connection_string`
234+ ===== `jdbc_connection_string`
235235
236236 * This is a required setting.
237237 * Value type is <<string,string>>
@@ -240,7 +240,7 @@ Number of seconds to sleep between connection attempts
240240JDBC connection string
241241
242242[id="plugins-{type}s-{plugin}-jdbc_default_timezone"]
243- ===== `jdbc_default_timezone`
243+ ===== `jdbc_default_timezone`
244244
245245 * Value type is <<string,string>>
246246 * There is no default value for this setting.
@@ -254,7 +254,7 @@ of using the timezone setting of the local machine. You must use a canonical
254254timezone, *America/Denver*, for example.
255255
256256[id="plugins-{type}s-{plugin}-jdbc_driver_class"]
257- ===== `jdbc_driver_class`
257+ ===== `jdbc_driver_class`
258258
259259 * This is a required setting.
260260 * Value type is <<string,string>>
@@ -265,7 +265,7 @@ NB per https://github.com/logstash-plugins/logstash-input-jdbc/issues/43 if you
265265the Oracle JDBC driver (ojdbc6.jar) the correct `jdbc_driver_class` is `"Java::oracle.jdbc.driver.OracleDriver"`
266266
267267[id="plugins-{type}s-{plugin}-jdbc_driver_library"]
268- ===== `jdbc_driver_library`
268+ ===== `jdbc_driver_library`
269269
270270 * Value type is <<string,string>>
271271 * There is no default value for this setting.
@@ -280,23 +280,23 @@ required you can pass them separated by a comma.
280280If not provided, Plugin will look for the driver class in the Logstash Java classpath.
281281
282282[id="plugins-{type}s-{plugin}-jdbc_fetch_size"]
283- ===== `jdbc_fetch_size`
283+ ===== `jdbc_fetch_size`
284284
285285 * Value type is <<number,number>>
286286 * There is no default value for this setting.
287287
288288JDBC fetch size. if not provided, respective driver's default will be used
289289
290290[id="plugins-{type}s-{plugin}-jdbc_page_size"]
291- ===== `jdbc_page_size`
291+ ===== `jdbc_page_size`
292292
293293 * Value type is <<number,number>>
294294 * Default value is `100000`
295295
296296JDBC page size
297297
298298[id="plugins-{type}s-{plugin}-jdbc_paging_enabled"]
299- ===== `jdbc_paging_enabled`
299+ ===== `jdbc_paging_enabled`
300300
301301 * Value type is <<boolean,boolean>>
302302 * Default value is `false`
@@ -310,23 +310,23 @@ result-set. The limit size is set with `jdbc_page_size`.
310310Be aware that ordering is not guaranteed between queries.
311311
312312[id="plugins-{type}s-{plugin}-jdbc_password"]
313- ===== `jdbc_password`
313+ ===== `jdbc_password`
314314
315315 * Value type is <<password,password>>
316316 * There is no default value for this setting.
317317
318318JDBC password
319319
320320[id="plugins-{type}s-{plugin}-jdbc_password_filepath"]
321- ===== `jdbc_password_filepath`
321+ ===== `jdbc_password_filepath`
322322
323323 * Value type is <<path,path>>
324324 * There is no default value for this setting.
325325
326326JDBC password filename
327327
328328[id="plugins-{type}s-{plugin}-jdbc_pool_timeout"]
329- ===== `jdbc_pool_timeout`
329+ ===== `jdbc_pool_timeout`
330330
331331 * Value type is <<number,number>>
332332 * Default value is `5`
@@ -335,7 +335,7 @@ Connection pool configuration.
335335The amount of seconds to wait to acquire a connection before raising a PoolTimeoutError (default 5)
336336
337337[id="plugins-{type}s-{plugin}-jdbc_user"]
338- ===== `jdbc_user`
338+ ===== `jdbc_user`
339339
340340 * This is a required setting.
341341 * Value type is <<string,string>>
@@ -344,7 +344,7 @@ The amount of seconds to wait to acquire a connection before raising a PoolTimeo
344344JDBC user
345345
346346[id="plugins-{type}s-{plugin}-jdbc_validate_connection"]
347- ===== `jdbc_validate_connection`
347+ ===== `jdbc_validate_connection`
348348
349349 * Value type is <<boolean,boolean>>
350350 * Default value is `false`
@@ -353,7 +353,7 @@ Connection pool configuration.
353353Validate connection before use.
354354
355355[id="plugins-{type}s-{plugin}-jdbc_validation_timeout"]
356- ===== `jdbc_validation_timeout`
356+ ===== `jdbc_validation_timeout`
357357
358358 * Value type is <<number,number>>
359359 * Default value is `3600`
@@ -362,39 +362,39 @@ Connection pool configuration.
362362How often to validate a connection (in seconds)
363363
364364[id="plugins-{type}s-{plugin}-last_run_metadata_path"]
365- ===== `last_run_metadata_path`
365+ ===== `last_run_metadata_path`
366366
367367 * Value type is <<string,string>>
368368 * Default value is `"/home/ph/.logstash_jdbc_last_run"`
369369
370370Path to file with last run time
371371
372372[id="plugins-{type}s-{plugin}-lowercase_column_names"]
373- ===== `lowercase_column_names`
373+ ===== `lowercase_column_names`
374374
375375 * Value type is <<boolean,boolean>>
376376 * Default value is `true`
377377
378378Whether to force the lowercasing of identifier fields
379379
380380[id="plugins-{type}s-{plugin}-parameters"]
381- ===== `parameters`
381+ ===== `parameters`
382382
383383 * Value type is <<hash,hash>>
384384 * Default value is `{}`
385385
386386Hash of query parameter, for example `{ "target_id" => "321" }`
387387
388388[id="plugins-{type}s-{plugin}-record_last_run"]
389- ===== `record_last_run`
389+ ===== `record_last_run`
390390
391391 * Value type is <<boolean,boolean>>
392392 * Default value is `true`
393393
394- Whether to save state or not in last_run_metadata_path
394+ Whether to save state or not in <<plugins-{type}s-{plugin}- last_run_metadata_path>>
395395
396396[id="plugins-{type}s-{plugin}-schedule"]
397- ===== `schedule`
397+ ===== `schedule`
398398
399399 * Value type is <<string,string>>
400400 * There is no default value for this setting.
@@ -406,7 +406,7 @@ There is no schedule by default. If no schedule is given, then the statement is
406406exactly once.
407407
408408[id="plugins-{type}s-{plugin}-sequel_opts"]
409- ===== `sequel_opts`
409+ ===== `sequel_opts`
410410
411411 * Value type is <<hash,hash>>
412412 * Default value is `{}`
@@ -420,7 +420,7 @@ examples of vendor-specific options can be found in this
420420documentation page: https://github.com/jeremyevans/sequel/blob/master/doc/opening_databases.rdoc
421421
422422[id="plugins-{type}s-{plugin}-sql_log_level"]
423- ===== `sql_log_level`
423+ ===== `sql_log_level`
424424
425425 * Value can be any of: `fatal`, `error`, `warn`, `info`, `debug`
426426 * Default value is `"info"`
@@ -429,7 +429,7 @@ Log level at which to log SQL queries, the accepted values are the common ones f
429429info and debug. The default value is info.
430430
431431[id="plugins-{type}s-{plugin}-statement"]
432- ===== `statement`
432+ ===== `statement`
433433
434434 * Value type is <<string,string>>
435435 * There is no default value for this setting.
@@ -449,38 +449,39 @@ here, ":target_id" is a named parameter. You can configure named parameters
449449with the `parameters` setting.
450450
451451[id="plugins-{type}s-{plugin}-statement_filepath"]
452- ===== `statement_filepath`
452+ ===== `statement_filepath`
453453
454454 * Value type is <<path,path>>
455455 * There is no default value for this setting.
456456
457457Path of file containing statement to execute
458458
459459[id="plugins-{type}s-{plugin}-tracking_column"]
460- ===== `tracking_column`
460+ ===== `tracking_column`
461461
462462 * Value type is <<string,string>>
463463 * There is no default value for this setting.
464464
465- If tracking column value rather than timestamp, the column whose value is to be tracked
465+ The column whose value is to be tracked if `use_column_value` is set to `true`
466466
467467[id="plugins-{type}s-{plugin}-tracking_column_type"]
468- ===== `tracking_column_type`
468+ ===== `tracking_column_type`
469469
470470 * Value can be any of: `numeric`, `timestamp`
471471 * Default value is `"numeric"`
472472
473473Type of tracking column. Currently only "numeric" and "timestamp"
474474
475475[id="plugins-{type}s-{plugin}-use_column_value"]
476- ===== `use_column_value`
476+ ===== `use_column_value`
477477
478478 * Value type is <<boolean,boolean>>
479479 * Default value is `false`
480480
481- Use an incremental column value rather than a timestamp
482-
481+ When set to `true`, uses the defined
482+ <<plugins-{type}s-{plugin}-tracking_column>> value as the `:sql_last_value`. When set
483+ to `false`, `:sql_last_value` reflects the last time the query was executed.
483484
484485
485486[id="plugins-{type}s-{plugin}-common-options"]
486- include::{include_path}/{type}.asciidoc[]
487+ include::{include_path}/{type}.asciidoc[]
0 commit comments