<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tag History Archives | DMC, Inc.</title>
	<atom:link href="https://static.dmcinfo.com/blog/tag/tag-history/feed/index.xml" rel="self" type="application/rss+xml" />
	<link></link>
	<description></description>
	<lastBuildDate>Tue, 05 May 2026 17:41:42 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.2</generator>

<image>
	<url>https://static.dmcinfo.com/wp-content/uploads/2025/04/site-icon-150x150.png</url>
	<title>Tag History Archives | DMC, Inc.</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Migrating Tag History in Ignition&#8217;s Tag Historian</title>
		<link>https://static.dmcinfo.com/blog/18050/migrating-tag-history-in-ignitions-tag-historian/</link>
		
		<dc:creator><![CDATA[Isabelle Chan]]></dc:creator>
		<pubDate>Wed, 23 Nov 2022 15:12:12 +0000</pubDate>
				<category><![CDATA[HMI and SCADA]]></category>
		<category><![CDATA[Ignition]]></category>
		<category><![CDATA[ignition]]></category>
		<category><![CDATA[Tag Historian]]></category>
		<category><![CDATA[Tag History]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/18050/migrating-tag-history-in-ignitions-tag-historian/</guid>

					<description><![CDATA[<p>The Ignition Tag Historian module is a powerful tool that efficiently stores tag history in designated SQL tables. This data can be accessed through scripting, reporting, and historical bindings and has built-in features such as automatic purging and partitioning to avoid overloading the database. The module also allows for easy viewing of tag trends by [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/18050/migrating-tag-history-in-ignitions-tag-historian/">Migrating Tag History in Ignition&#8217;s Tag Historian</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p class="wp-block-paragraph">The Ignition Tag Historian module is a powerful tool that efficiently stores tag history in designated SQL tables. This data can be accessed through scripting, reporting, and historical bindings and has built-in features such as automatic purging and partitioning to avoid overloading the database. The module also allows for easy viewing of tag trends by allowing users to drag and drop tags on Vision&apos;s Easy Chart and Perspective&apos;s Power Chart components.</p>

<p class="wp-block-paragraph">Despite the great capabilities of the Tag Historian, the format in which data is stored can complicate the process of directly querying&nbsp;these tables. As a result, migrating tag history from one tag to another after say, renaming or moving a tag, may prove challenging. These types of migrations may need to be performed after reorganizing the tag structure of a project or replacing a sensor while maintaining continuous tag history data.</p>

<h2 class="wp-block-heading">The Example</h2>

<p class="wp-block-paragraph">For simplicity&apos;s sake, we will go over an example in which a new tag is added to a project under these conditions:</p>

<ol class="wp-block-list" type="1">
 <li value="1">The old and new tags are standalone tags not found in any UDTs.</li>
 <li>The tag group of the tags did not change.</li>
 <li>Neither the gateway nor the gateway name changed.</li>
 <li>Only one gateway is used.</li>
</ol>

<p class="wp-block-paragraph">It&apos;s worth noting that&nbsp;tag history can still be migrated when some or none of the above conditions apply! There are several nuances each of the conditions requires that one must consider when performing migration. Knowledge of all Ignition built-in historian tables is key to ensuring a successful migration for more complex conditions. Due to the simplicity of the example used, we will only focus on two tables.</p>

<p class="wp-block-paragraph">Let&apos;s start off with a single tag called &quot;<strong>TagX</strong>&quot;. We want to transfer the history of this tag to a new tag, &quot;<strong>TagY</strong>&quot;, that we&apos;ll introduce later. According to this Power Chart image, <strong>TagX</strong> has been active since at least 12:40PM and has been holding at a steady value of 2.</p>

<figure class="wp-block-image"><img decoding="async" alt="Power Chart displaying history for TagX" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/powerchart_TagX.png"  /></figure>

<h2 class="wp-block-heading">Tag Historian Tables</h2>

<p class="wp-block-paragraph">We can find this tag in one of Ignition&apos;s historian tables, <strong>sqlth_te</strong>. This contains all of the non-data information about a tag. The information in this table is a great starting point to understanding the other tables created by the historian. The most important columns are:</p>

<ul class="wp-block-list" type="disc">
 <li><strong>id</strong>: A&nbsp;unique identifier for a tag</li>
 <li><strong>tagpath</strong>: The tag path (without the provider), all lowercase</li>
 <li><strong>scid</strong>: id of the tag group that tag is in</li>
 <li><strong>created</strong>: An epoch timestamp of when the tag began storing tag history</li>
 <li><strong>retired</strong>: An epoch timestamp of when the tag stopped storing tag history or was deleted</li>
</ul>

<figure class="wp-block-image"><img decoding="async" alt="Database query browser displaying sqlth_te table" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/sqlth_te-TagX_1.png"  /></figure>

<p class="wp-block-paragraph">We also have the tables in which the history is actually stored. If monthly partitioning is set up, the name of the table will look something like <strong>sqlt_data_A_B_C</strong> where A is the driver id or gateway identifier, B is the year, and C is the month. In this example, our data table is <strong>sqlt_data_1_2022_11</strong>, so we know that this data was taken in November of 2022. The columns here log the actual values of the tags storing history. The columns in this table are:</p>

<ul class="wp-block-list" type="disc">
 <li><strong>tagid</strong>: The id from the sqlth_te table</li>
 <li><strong>___value</strong>: The value recorded for the tag</li>
 <li><strong>dataintegrity</strong>: The quality code of the value recorded</li>
 <li><strong>t_stamp</strong>: The epoch timestamp at which the value was recorded</li>
</ul>

<p class="wp-block-paragraph">We can also see <strong>TagX</strong>, which has a <strong>tagid</strong> of 5, started at a value of 0, and then transitioned to a value of 2 at 12:40PM.</p>

<figure class="wp-block-image"><img decoding="async" alt="Database query browser displaying data table" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/sqlth_data-TagX.png"  /></figure>

<h2 class="wp-block-heading">Adding TagY</h2>

<p class="wp-block-paragraph">Next, we introduce a new tag called &quot;<strong>TagY</strong>&quot;, assigned a <strong>tagid </strong>of 6 by Ignition, that begins collecting information at 12:52.</p>

<figure class="wp-block-image"><img decoding="async" alt="Database query browser displaying the sqlth_te table with TagX and TagY" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/sqlth_te-TagXY.png"  /></figure>

<p class="wp-block-paragraph">From 12:52 to about 12:53, both tags are reading a value of 2. The sensor for <strong>TagX</strong> goes offline just before 12:53, leaving only <strong>TagY</strong> online. At about 12:58, <strong>TagY</strong> then drops down to 1.</p>

<figure class="wp-block-image"><img decoding="async" alt="Power Chart displaying history for TagX and TagY" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/powerchart_TagXY.png"  /></figure>

<figure class="wp-block-image"><img decoding="async" alt="Database query browser displaying the data table for both TagX and TagY" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/sqlth_data-TagXY.png"  /></figure>

<h2 class="wp-block-heading">Performing the History Migration</h2>

<p class="wp-block-paragraph">To transfer the history of <strong>TagX</strong> to <strong>TagY</strong>, all we have to do is run a simple update query to replace the tagpath of <strong>TagX</strong> with the tagpath of <strong>TagY</strong>. The following script examples use Ignition&apos;s script console to query the database. Because these scripts are only querying the database, one may use whatever query tool they prefer.</p>

<figure class="wp-block-image"><img decoding="async" alt="Script console running a query " src="https://static.dmcinfo.com/wp-content/uploads/2025/05/query.png"  /></figure>

<p class="wp-block-paragraph">The <strong>sqlth_te</strong> table now looks like this.</p>

<figure class="wp-block-image"><img decoding="async" alt="Database query browser displaying the sqlth_te table for TagY" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/sqlth_te-TagY.png"  /></figure>

<p class="wp-block-paragraph">While <strong>sql_data_1_2022_11</strong> will still look the same, the tag history of <strong>TagX </strong>has transferred over to <strong>TagY</strong>. The history for <strong>TagY </strong>now goes beyond 12:52PM, its start time and <strong>TagX </strong>is no longer in the tag browser for the Power Chart component. We can also see that Ignition continues to collect and store history for <strong>TagY </strong>when the value rises to 3 at 1:11PM.</p>

<figure class="wp-block-image"><img decoding="async" alt="Power Chart displaying that TagX's history has been transferred over to TagY" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/powerchart_TagY3.png"  /></figure>

<p class="wp-block-paragraph"><strong>Learn more about DMC&apos;s&nbsp;<a href="https://static.dmcinfo.com/services/manufacturing-automation-and-intelligence/hmi-and-scada-programming/ignition-programming">Ignition expertise</a>, and&nbsp;<a href="https://static.dmcinfo.com/contact">contact us</a>&nbsp;to get started on your next&nbsp;<a href="https://static.dmcinfo.com/services/manufacturing-automation-and-intelligence/hmi-and-scada-programming">HMI</a>,&nbsp;<a href="https://static.dmcinfo.com/services/manufacturing-automation-and-intelligence/hmi-and-scada-programming">SCADA</a>, or&nbsp;<a href="https://static.dmcinfo.com/services/manufacturing-automation-and-intelligence/manufacturing-execution-systems-services">MES&nbsp;</a>project!</strong></p>
<p>The post <a href="https://static.dmcinfo.com/blog/18050/migrating-tag-history-in-ignitions-tag-historian/">Migrating Tag History in Ignition&#8217;s Tag Historian</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
