# Real time data not syncing from oracle to Elasticsearch index

**URL:** <https://discuss.elastic.co/t/real-time-data-not-syncing-from-oracle-to-elasticsearch-index/309298>\
**Category:** Logstash\
**Created:** [July 11, 2022, 8:20am UTC](https://discuss.elastic.co/t/real-time-data-not-syncing-from-oracle-to-elasticsearch-index/309298 "2022-07-11T08:20:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![suresh\_u](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/suresh_u/32/107394_2.png) [@suresh\_u](https://discuss.elastic.co/u/suresh_u)\
**Post date:** [July 11, 2022, 8:20am UTC](https://discuss.elastic.co/t/real-time-data-not-syncing-from-oracle-to-elasticsearch-index/309298/1 "2022-07-11T08:20:43Z")

</div>

Hi Team,

I am using Logstash to sync data from Oracle to ES.  
When I update in Oracle db the same changes are not reflecting in ES.  
Could you please help to resolve the issue?

Below is the Logstash configuration that I am using ::

input {  
jdbc {  
jdbc\_driver\_library =\> "C:\Users\admin\logstash-7.17.4\ojdbc8.jar"  
jdbc\_driver\_class =\> "Java::oracle.jdbc.driver.OracleDriver"  
jdbc\_connection\_string =\> "jdbc:oracle:thin:@domain:1521/temp"  
jdbc\_user =\> "user"  
jdbc\_password =\> "user23"  
schedule =\> "\*/1 \* \* \* \* \*"  
statement =\> "SELECT req.ID,req.BU\_COUNTRY,req.BUID,req.CFO\_ACTION,req.CFO\_SUB\_TYPE,req.CFO\_TYPE,req.DELIVERY\_METHOD,req.DOC\_NUMBER,req.CORRELATION\_ID,req.ORIGINATOR,req.ORDER\_NUMBER,req.STATUS\_CODE\_ID,req.CREATED\_DATE,req.LAST\_UPDATE\_DATE,req.DELIVERY\_DATE,req.MSG\_ID,req.RESPONSE\_CODE,req.IS\_ACTIVE,code.STATUS\_DESC FROM request req,statuscodes code WHERE req.STATUS\_CODE\_ID=code.ID AND req.last\_update\_date \> :sql\_last\_value AND req.originator='org' AND req.cfo\_type='debit'"  
use\_column\_value =\> true  
tracking\_column =\> "last\_update\_date"  
tracking\_column\_type =\> "timestamp"  
clean\_run =\> true  
}  
}  
filter {

if ![delivery\_date] {  
mutate {  
rename =\> { "delivery\_date" =\> "actualDeliveryDate" }  
remove\_field =\> ["delivery\_date"]  
}  
}  
date {  
match =\> ["createdDate", "yyyy-MM-dd'T'HH:mm:ss.SSSz", "ISO8601"]  
}  
date {  
match =\> ["updatedDate", "yyyy-MM-dd'T'HH:mm:ss.SSSz", "ISO8601"]  
}  
mutate {  
remove\_field =\> ["@version", "@timestamp","order\_number","msg\_id","response\_code","is\_active","buid","cfo\_sub\_type","tags","cfo\_action","correlation\_id","originator"]  
convert =\> {  
"createdDate" =\> "string"  
}  
convert =\> {  
"updatedDate" =\> "string"  
}  
gsub =\> ["createdDate", ".\d{3}", ""]  
gsub =\> ["updatedDate", ".\d{3}", ""]  
rename =\> { "bu\_country" =\> "country" }  
rename =\> { "cfo\_type" =\> "cfoSubType" }  
rename =\> { "delivery\_method" =\> "deliveryMeth" }  
rename =\> { "status\_code\_id" =\> "txnStatusCode" }  
rename =\> { "created\_date" =\> "createdDate" }  
rename =\> { "status\_desc" =\> "txnStatus" }  
rename =\> { "last\_update\_date" =\> "updatedDate" }   
copy =\> { "id" =\> "esid" }  
}  
grok  
{  
remove\_field =\> ["doc\_number"]  
match =\> {  
"doc\_number" =\> "%{DATA:transactionNumber}-%{GREEDYDATA:poNum}"   
}  
}  
grok  
{  
remove\_field =\> ["time"]  
remove\_field =\> ["delivery\_date"]  
match =\> {  
"delivery\_date" =\> "%{GREEDYDATA:actualDeliveryDate}T%{GREEDYDATA:time}"

```
}

```

}  
}  
output {  
elasticsearch{  
hosts =\> ["[https://domain:9200](https://domain:9200)","[https://domain:9200](https://domain:9200)","[https://domain:9200](https://domain:9200)"]  
index =\> "testlogstash"  
user =\> "admin"  
password =\> "admin"  
ssl =\> true  
ssl\_certificate\_verification =\> true  
cacert =\> 'C:\Users\admin\logstash-7.17.4\nonprodescertificate.cer'  
document\_id =\> "%{id}"  
doc\_as\_upsert =\> true  
}  
stdout {  
codec =\> rubydebug  
}  
}

Thanks,  
Suresh.

---

<div class="post-metadata">

**Author:** ![suresh\_u](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/suresh_u/32/107394_2.png) [@suresh\_u](https://discuss.elastic.co/u/suresh_u)\
**Post date:** [July 12, 2022, 8:24am UTC](https://discuss.elastic.co/t/real-time-data-not-syncing-from-oracle-to-elasticsearch-index/309298/2 "2022-07-12T08:24:34Z")

</div>

Can anyone please suggest?

---

<div class="post-metadata">

**Author:** ![suresh\_u](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/suresh_u/32/107394_2.png) [@suresh\_u](https://discuss.elastic.co/u/suresh_u)\
**Post date:** [July 12, 2022, 11:02am UTC](https://discuss.elastic.co/t/real-time-data-not-syncing-from-oracle-to-elasticsearch-index/309298/3 "2022-07-12T11:02:44Z")

</div>

sorry It's my bad.  
After executed Update operation in Sql developer, I forgot to commit which will save permanently.  
Solution:  
UPDATE table-name  
SET last\_update\_date = systimestamp  
WHERE id = 1253816;  
**commit;** This is important

Thanks,  
Suresh.

---

<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:** [August 9, 2022, 11:03am UTC](https://discuss.elastic.co/t/real-time-data-not-syncing-from-oracle-to-elasticsearch-index/309298/4 "2022-08-09T11:03:17Z")

</div>

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