# How to cross reference tag history in ignition with a particular tagid in database

**URL:** <https://forum.inductiveautomation.com/t/how-to-cross-reference-tag-history-in-ignition-with-a-particular-tagid-in-database/68537>\
**Category:** Ignition\
**Created:** [January 12, 2023, 11:59am UTC](https://forum.inductiveautomation.com/t/how-to-cross-reference-tag-history-in-ignition-with-a-particular-tagid-in-database/68537 "2023-01-12T11:59:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bogdan\_Persa](https://avatars.discourse-cdn.com/v4/letter/b/ba8739/32.png) [@Bogdan\_Persa](https://forum.inductiveautomation.com/u/Bogdan_Persa)\
**Post date:** [January 12, 2023, 11:59am UTC](https://forum.inductiveautomation.com/t/how-to-cross-reference-tag-history-in-ignition-with-a-particular-tagid-in-database/68537/1 "2023-01-12T11:59:28Z")

</div>

Good morning,

Because we are generating PowerBI reports based on historical ignition data, I am finding the need for a methodical approach to cross reference a particular tag's history from Ignition, to its database tagID. Is there a way to do this?

Thank you in advance,

Bogdan

---

<div class="post-metadata">

**Author:** ![Steve\_Laubach](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steve_laubach/32/60900_2.png) [@Steve\_Laubach](https://forum.inductiveautomation.com/u/Steve_Laubach)\
**Post date:** [January 12, 2023, 1:55pm UTC](https://forum.inductiveautomation.com/t/how-to-cross-reference-tag-history-in-ignition-with-a-particular-tagid-in-database/68537/2 "2023-01-12T13:55:00Z")

</div>

I think you're asking about the data that is stored in "sqlth\_te".

I wouldn't recommend querying Ignition Historian data in SQL because it is usually pretty inelegant to do that with tables partitioning, etc.

I would first look if these methods give you the functionality you're looking for:  
[https://docs.inductiveautomation.com/display/DOC81/system.tag.queryTagHistory](https://docs.inductiveautomation.com/display/DOC81/system.tag.queryTagHistory)  
[https://docs.inductiveautomation.com/display/DOC81/system.tag.queryTagCalculations](https://docs.inductiveautomation.com/display/DOC81/system.tag.queryTagCalculations)

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [January 12, 2023, 6:40pm UTC](https://forum.inductiveautomation.com/t/how-to-cross-reference-tag-history-in-ignition-with-a-particular-tagid-in-database/68537/3 "2023-01-12T18:40:32Z")

</div>

Generally speaking, the best service-agnostic approach is a Webdev endpoint that calls `system.tag.queryTagHistory` and returns a JSON dump of the data you're interested in. That's pretty straightforward to ingest in tools like PowerBI, Tableau, etc.
