# Inherits logstash jdbc config

**URL:** <https://discuss.elastic.co/t/inherits-logstash-jdbc-config/152526>\
**Category:** Logstash\
**Created:** [October 15, 2018, 3:40pm UTC](https://discuss.elastic.co/t/inherits-logstash-jdbc-config/152526 "2018-10-15T15:40:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ggingras](https://avatars.discourse-cdn.com/v4/letter/g/7feea3/32.png) [@ggingras](https://discuss.elastic.co/u/ggingras)\
**Post date:** [October 15, 2018, 3:40pm UTC](https://discuss.elastic.co/t/inherits-logstash-jdbc-config/152526/1 "2018-10-15T15:40:09Z")

</div>

Hi,

I have 6 differents logstash config file to synchronize 6 Oracle tables with their given elastic index.

I was wondering if it was possible to inherit common JDBC config so I do not have to repeat myself in all those files. Here an example of what I would like to be inherited from a common file :

File 1 :

```
    jdbc {
    	jdbc_validate_connection => true
    	jdbc_driver_library => "C:\dev\logstash-6.3.2\bin\ojdbc\ojdbc8.jar"
    	jdbc_driver_class => "Java::oracle.jdbc.driver.OracleDriver"
    	jdbc_connection_string => "jdbc:oracle:thin:@ORACLE_SERVER:1521/ORACLE_DB"
    	jdbc_user => "ORACLE_SCHEMA"
    	jdbc_password => "${db_password}"	
    	statement_filepath => "C:\dev\logstash-6.3.2\config\insert_address.sql"
		
		use_column_value => true
		tracking_column => "alias_for_id"
		last_run_metadata_path => "c:\userindent preformatted text by 4 spaces> "id"
	last_run_metadata_path => "c:\users\ggingras\.logstash-street-last-run-add"
	
	#run every minute
	schedule => "* * * * *"
	clean_run => true
}

```

File 2:

```
jdbc {
	jdbc_validate_connection => true
	jdbc_driver_library => "C:\dev\logstash-6.3.2\bin\ojdbc\ojdbc8.jar"
	jdbc_driver_class => "Java::oracle.jdbc.driver.OracleDriver"
	jdbc_connection_string => "jdbc:oracle:thin:@ORACLE_SERVER:1521/ORACLE_DB"
	jdbc_user => "ORACLE_SCHEMA"
	jdbc_password => "${db_password}"		
	statement_filepath => "C:\dev\logstash-6.3.2\config\insert_street.sql"
	
	use_column_value => true
	tracking_column => "id"
	last_run_metadata_path => "c:\users\ggingras\.logstash-street-last-run-add"
	
	#run every minute
	schedule => "* * * * *"
	clean_run => true
}

```

Can I inherit the following lines from a common file :

```
jdbc_validate_connection => true
jdbc_driver_library => "C:\dev\logstash-6.3.2\bin\ojdbc\ojdbc8.jar"
jdbc_driver_class => "Java::oracle.jdbc.driver.OracleDriver"
jdbc_connection_string => "jdbc:oracle:thin:@ORACLE_SERVER:1521/ORACLE_DB"
jdbc_user => "ORACLE_SCHEMA"
jdbc_password => "${db_password}"		

```

Thanks

Gaetan

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 12, 2018, 3:54pm UTC](https://discuss.elastic.co/t/inherits-logstash-jdbc-config/152526/2 "2018-11-12T15:54:01Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
