# How to combine two dataset based table using dataset as components

**URL:** <https://forum.inductiveautomation.com/t/how-to-combine-two-dataset-based-table-using-dataset-as-components/75985>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [July 6, 2023, 11:25am UTC](https://forum.inductiveautomation.com/t/how-to-combine-two-dataset-based-table-using-dataset-as-components/75985 "2023-07-06T11:25:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gorakh\_kopnar](https://avatars.discourse-cdn.com/v4/letter/g/a9adbd/32.png) [@Gorakh\_kopnar](https://forum.inductiveautomation.com/u/Gorakh_kopnar)\
**Post date:** [July 6, 2023, 11:25am UTC](https://forum.inductiveautomation.com/t/how-to-combine-two-dataset-based-table-using-dataset-as-components/75985/1 "2023-07-06T11:25:05Z")

</div>

Hi I am trying combine two dataset in ignition perspective .where I have one session property returns dataset and another having query based dataset . How can combine two dataset

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [July 6, 2023, 11:28am UTC](https://forum.inductiveautomation.com/t/how-to-combine-two-dataset-based-table-using-dataset-as-components/75985/2 "2023-07-06T11:28:20Z")

</div>

This would normally be scripted. Share some example data of the two sources, and an example of how you want them combined (UNION-like versus JOIN-like, or perhaps just columns side-by-side..).

---

<div class="post-metadata">

**Author:** ![Gorakh\_kopnar](https://avatars.discourse-cdn.com/v4/letter/g/a9adbd/32.png) [@Gorakh\_kopnar](https://forum.inductiveautomation.com/u/Gorakh_kopnar)\
**Post date:** [July 7, 2023, 5:36am UTC](https://forum.inductiveautomation.com/t/how-to-combine-two-dataset-based-table-using-dataset-as-components/75985/3 "2023-07-07T05:36:09Z")

</div>

Any example you have

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [July 7, 2023, 6:03am UTC](https://forum.inductiveautomation.com/t/how-to-combine-two-dataset-based-table-using-dataset-as-components/75985/4 "2023-07-07T06:03:37Z")

</div>

Are you wanting to add the columns from one dataset to the other. This is what Phil means by "JOIN-like." If so, do they have the same number of rows? If so, you can simply use [system.dataset.addColumn](https://docs.inductiveautomation.com/display/DOC81/system.dataset.addColumn).

If not, do they share a common column with a unique identifier that can be used to stitch the data together.  
**Here is an example:**  
[• Combining two datasets based on a primary key](https://forum.inductiveautomation.com/t/added-column-shows-in-designer-but-not-in-client/63199/9)

On the other hand, are you trying to simply add the rows from one dataset to the rows of another? This is what is meant by "UNION-like."

For this, you can simply use [system.dataset.appendDataset](https://docs.inductiveautomation.com/display/DOC81/system.dataset.appendDataset)

The answer could be simple or complex depending on your use case, and the possibilities are quite diverse, so if the above examples are not what you are looking for, then be more specific, and I'm certain somebody around here can give you the example you need.
