Specifications #
[dbconn://<specify_name>]
host = <host-name>, Default is current system hostname
source = <source-name>, Default is stanza-name
sourcetype = <parser-name>
repo = <repository-name>
frequency = <seconds> Interval to run the input
cron = <cron-expression>
Note: Cron has higher priority and will be considered for scheduling instead of frequency, if both are defined.
It is preferable to define only one, either cron or frequency.
db_type = mysql | postgresql | oracle | mssql
db_host = <database-endpoint>
db_port = <database-port>
db_name = <database-name>
query = <database-query>
mode = batch | rising
checkpoint_startpoint = <columnname on basis of which checkpointing will occur> Only for mode = rising
secret = <secret-stanza-name>
global = <global-stanza-name>
disabled = 0/1
Example #
[dbconn://postgres]
source = aurora_postgres
frequency = 86400
db_type = postgresql
db_host = database-1.cluster-xxxxxxxxxx.ap-south-1.rds.amazonaws.com
db_port = 5432
db_name = classicmodels
query = 'SELECT * FROM customers WHERE "customerNumber" > {} ORDER BY "customerNumber" ASC'
mode = rising
checkpoint_startpoint = customerNumber
global = dbglobal
secret = postcreds
[dbconn://auroramysql]
source = auroramysql
cron = 0 0 1 * *
db_type = mysql
db_host = database-2.cluster-xxxxxxxxxxx.ap-south-1.rds.amazonaws.com
db_port = 3306
db_name = classicmodels
query = 'SELECT * FROM customers'
mode = batch
global = dbglobal
secret = admincreds
[dbconn://oracle]
source = oracle
frequency = 86400
db_type = oracle
db_host = database-1.xxxxxxxxxx.ap-south-1.rds.amazonaws.com
db_port = 1521
db_name = ORCL
query = 'SELECT * FROM CUSTOMERS WHERE CUSTOMERNUMBER > {} ORDER BY CUSTOMERNUMBER ASC'
mode = rising
checkpoint_startpoint = customernumber
global = dbglobal
secret = admincreds
[dbconn://mssqlserver]
source = mssqlserver
cron = 0 0 1 * *
db_type = mssql
db_host = mssql.xxxxxxxxxx.ap-south-1.rds.amazonaws.com
db_port = 1433
db_name = classicmodels
query = 'SELECT * FROM customers WHERE customerNumber > {} ORDER BY customerNumber ASC'
mode = rising
checkpoint_startpoint = customernumber
global = dbglobal
secret = admincreds
Note #
Make sure that the stanza name you define in local/connector.conf is not already disabled in default/connector.conf, else it will get skipped.