# Referencing a field instead of Index

**URL:** <https://discuss.elastic.co/t/referencing-a-field-instead-of-index/59207>\
**Category:** Logstash\
**Created:** [August 29, 2016, 4:18pm UTC](https://discuss.elastic.co/t/referencing-a-field-instead-of-index/59207 "2016-08-29T16:18:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sombilat](https://avatars.discourse-cdn.com/v4/letter/s/779978/32.png) [@sombilat](https://discuss.elastic.co/u/sombilat)\
**Post date:** [August 29, 2016, 4:18pm UTC](https://discuss.elastic.co/t/referencing-a-field-instead-of-index/59207/1 "2016-08-29T16:18:36Z")

</div>

Here's the scenario:  
We have a JDBC configuration, lets call it JDBC. We are not outputting an Index for this. Which extracts data every hour to an output file in a target dir. The File JDBC generates, is picked up by an index called Billing\_requests.

Now, I have to place a field which indicates the time it extracted. Just to better associate the data's relevance from billing\_requests to the time JDBC executes. Now we do not use a document\_id for billing\_requests as each record should be unique. So, we let Logstash do the Id's so that it will be definitely unique

Is there a way to reference the \_path field in billing\_requests Index from the JDBC.conf file? Normally you specify the document\_id to associate with \_id of billing\_requests. But is there a way to reference the field?  
Like,

```
if (billing_requests.field(_path) == 'FileName.txt') {
  -----<operations>-----
}
```

---

<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:** [July 6, 2017, 4:41am UTC](https://discuss.elastic.co/t/referencing-a-field-instead-of-index/59207/2 "2017-07-06T04:41:05Z")

</div>

Closed on July 6, 2017, 4:41am UTC


