# Join data for events

**URL:** <https://discuss.elastic.co/t/join-data-for-events/177979>\
**Category:** Logstash\
**Created:** [April 23, 2019, 8:24am UTC](https://discuss.elastic.co/t/join-data-for-events/177979 "2019-04-23T08:24:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vijayakumar\_Kannan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vijayakumar_kannan/32/34873_2.png) [@Vijayakumar\_Kannan](https://discuss.elastic.co/u/Vijayakumar_Kannan)\
**Post date:** [April 23, 2019, 8:24am UTC](https://discuss.elastic.co/t/join-data-for-events/177979/1 "2019-04-23T08:24:31Z")

</div>

Dear All,

I want to get query view for filename against the username . filename comes from event2 and username comes from event1 for both events pid common.

Event 1 fields =\> timestamp pid username  
Event 2 fields =\> timestamp pid filename read/write

desired query view =\> event2\_timestamp event2\_pid event1\_username(match pid) event2\_read/write

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [April 23, 2019, 11:28am UTC](https://discuss.elastic.co/t/join-data-for-events/177979/2 "2019-04-23T11:28:33Z")

</div>

You may be able to do that using an [aggregate](https://www.elastic.co/guide/en/logstash/current/plugins-filters-aggregate.html) filter to combine the two lines.

---

<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:** [May 21, 2019, 11:28am UTC](https://discuss.elastic.co/t/join-data-for-events/177979/3 "2019-05-21T11:28:35Z")

</div>

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