# Module feasibity for tag history to-from No-SQL DB

**URL:** <https://forum.inductiveautomation.com/t/module-feasibity-for-tag-history-to-from-no-sql-db/12351>\
**Category:** Module Development\
**Created:** [November 12, 2016, 8:26pm UTC](https://forum.inductiveautomation.com/t/module-feasibity-for-tag-history-to-from-no-sql-db/12351 "2016-11-12T20:26:12Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [November 12, 2016, 8:26pm UTC](https://forum.inductiveautomation.com/t/module-feasibity-for-tag-history-to-from-no-sql-db/12351/1 "2016-11-12T20:26:12Z")

</div>

Is that feasible (with a reasonable complexity) to achieve a module for :

1. storing tag history data (with ignition history deadband) to a No-SQL DB
2. retrieving these history data for easy chart ?

![:scratch:](https://us1.discourse-cdn.com/inductiveautomation/original/1X/76d1620bec252bfac07050c889ff5a91dc8a9c25.gif ":scratch:")

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [November 14, 2016, 3:49pm UTC](https://forum.inductiveautomation.com/t/module-feasibity-for-tag-history-to-from-no-sql-db/12351/2 "2016-11-14T15:49:20Z")

</div>

Maybe?

First, it’s going to depend on what flavor of No-SQL you’re using. SQL databases have a lot in common with each other, No-SQL less so. And for each No-SQL database, there are varying levels of support for interacting with Java.

If this were my project, I’d start by seeing if there was something that would mimic a JDBC driver for my No-SQL database. (Like [unityjdbc.com/mongojdbc/mongo\_jdbc.php](http://www.unityjdbc.com/mongojdbc/mongo_jdbc.php) – not an endorsement, I just hear it mentioned commonly in NoSQL discussions.) That would let you treat your NoSQL database just like any other SQL database you connect to ignition, and you could store and retrieve tag history the same way.

I assume your purpose in using a NoSQL database for tag history is to get sparse columns to save space? If that’s the case, and you can’t find a driver you like for your NoSQL database, you can also look at keeping a shorter duration of detailed history and then using aggregated data for the rest of your history.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [November 16, 2016, 5:56pm UTC](https://forum.inductiveautomation.com/t/module-feasibity-for-tag-history-to-from-no-sql-db/12351/3 "2016-11-16T17:56:34Z")

</div>

The No-SQL DB will be a Time Serie DB : InfluxDB with is Java API.  
I was wondering if the part of the Ignition SDK for Tag History management (store and retrieve Data) is not too tied with SQL DB ?

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [November 16, 2016, 11:39pm UTC](https://forum.inductiveautomation.com/t/module-feasibity-for-tag-history-to-from-no-sql-db/12351/4 "2016-11-16T23:39:49Z")

</div>

Tag history providers themselves are an extension point (SQLTagHistoryProviderType). In your gateway hook’s setup method, you’ll call `context.getTagManager().addSQLTagHistoryProviderType(myProviderTypeInstance);`  
In your SQLTagHistoryProviderType, the createHistoryProvider method will return your new implementation of TagHistoryProvider. I imagine you’ll want that implementation to have an instance of an implementation of DataSink. Check the javadocs for both of those. These interfaces are just the starting points – you’ll need to trace through the methods to see what other things you’ll need to implement/subclass.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [November 17, 2016, 7:43pm UTC](https://forum.inductiveautomation.com/t/module-feasibity-for-tag-history-to-from-no-sql-db/12351/5 "2016-11-17T19:43:45Z")

</div>

Thanks kathy for the starting point.  
After a quick look at the javadoc about TagHistoryProviderType and DataSink, it seems to be quite difficult to implement a new TagHistoryProviderType.  
An example in the inductiveautomation/ignition-sdk-examples would be very usefull… 😉  
In the meantime, for a very limited proof of concept, I can create a standard sql provider and pick data in this temporary db to store then data into influxDb and operate data outside Ignition ☹

---

<div class="post-metadata">

**Author:** ![dmdrendall](https://avatars.discourse-cdn.com/v4/letter/d/f9ae1b/32.png) [@dmdrendall](https://forum.inductiveautomation.com/u/dmdrendall)\
**Post date:** [April 3, 2018, 10:42pm UTC](https://forum.inductiveautomation.com/t/module-feasibity-for-tag-history-to-from-no-sql-db/12351/6 "2018-04-03T22:42:33Z")

</div>

Any luck integrating InfluxDB?

I’ve recently been looking at this option, and saw you had considered it. I’m also looking at Neo4J and ArangoDB as graph DB’s, and imagine I’ll need to wire up the Arango via it’s API like Influx.

---

<div class="post-metadata">

**Author:** ![bloncar](https://avatars.discourse-cdn.com/v4/letter/b/b9bd4f/32.png) [@bloncar](https://forum.inductiveautomation.com/u/bloncar)\
**Post date:** [September 11, 2018, 2:04pm UTC](https://forum.inductiveautomation.com/t/module-feasibity-for-tag-history-to-from-no-sql-db/12351/7 "2018-09-11T14:04:32Z")

</div>

Are there any plans to add this to the examples?

---

<div class="post-metadata">

**Author:** ![PerryAJ](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/perryaj/32/3281_2.png) [@PerryAJ](https://forum.inductiveautomation.com/u/PerryAJ)\
**Post date:** [September 26, 2018, 5:57pm UTC](https://forum.inductiveautomation.com/t/module-feasibity-for-tag-history-to-from-no-sql-db/12351/8 "2018-09-26T17:57:44Z")

</div>

No plans. Doesn’t mean it can’t/won’t happen, just not something we have on our roadmap. Pull Requests are always welcome if someone else has a workable proof of concept.

---

<div class="post-metadata">

**Author:** ![V.balamurugan](https://avatars.discourse-cdn.com/v4/letter/v/b5a626/32.png) [@V.balamurugan](https://forum.inductiveautomation.com/u/V.balamurugan)\
**Post date:** [February 7, 2020, 5:16pm UTC](https://forum.inductiveautomation.com/t/module-feasibity-for-tag-history-to-from-no-sql-db/12351/9 "2020-02-07T17:16:33Z")

</div>

Please check the link :[Influx Ignition Module Third party](https://www.kymerasystems.com/kymera-influxdb-module/)
