# Datatype and querymode

**URL:** <https://forum.inductiveautomation.com/t/datatype-and-querymode/3584>\
**Category:** Ignition\
**Created:** [November 10, 2011, 8:45pm UTC](https://forum.inductiveautomation.com/t/datatype-and-querymode/3584 "2011-11-10T20:45:35Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robert](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@Robert](https://forum.inductiveautomation.com/u/Robert)\
**Post date:** [November 10, 2011, 8:45pm UTC](https://forum.inductiveautomation.com/t/datatype-and-querymode/3584/1 "2011-11-10T20:45:35Z")

</div>

What are the possible values for these columns in the sqlth\_te table?  
And what do they mean?  
 ![:scratch:](https://us1.discourse-cdn.com/inductiveautomation/original/1X/76d1620bec252bfac07050c889ff5a91dc8a9c25.gif ":scratch:")

---

<div class="post-metadata">

**Author:** ![nathan](https://avatars.discourse-cdn.com/v4/letter/n/c5a1d2/32.png) [@nathan](https://forum.inductiveautomation.com/u/nathan)\
**Post date:** [November 10, 2011, 10:04pm UTC](https://forum.inductiveautomation.com/t/datatype-and-querymode/3584/2 "2011-11-10T22:04:18Z")

</div>

I was hoping that this [SQLTags Custom Driver Guide](http://files.inductiveautomation.com.s3.amazonaws.com/guides/sqltags_custom_driver_guide.pdf) would help, but it was written prior to SQLTags History. So I guess I’m not much help with your question. Hopefully this guide is useful to someone, though.

---

<div class="post-metadata">

**Author:** ![Robert](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@Robert](https://forum.inductiveautomation.com/u/Robert)\
**Post date:** [November 10, 2011, 10:39pm UTC](https://forum.inductiveautomation.com/t/datatype-and-querymode/3584/3 "2011-11-10T22:39:55Z")

</div>

Thanks Nathan,

I have that on my desk 🙂 Perhaps it could be expanded for tag history?

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [November 10, 2011, 10:55pm UTC](https://forum.inductiveautomation.com/t/datatype-and-querymode/3584/4 "2011-11-10T22:55:41Z")

</div>

DataType - the “type class” of the tag, used to tell which column the data comes from.  
0 - Int  
1 - Float  
2 - String  
3 - Date/Time

QueryMode - another name for “interpolation” mode, or the “category” of data.  
0 - Discrete/Digital  
3 - Analog

How’d it go from 0 to 3? 1 used to be analog, but with 7.3 we had to change what analog meant (with compression), so 1=Old style analog, while 3=new compressed analog. 2 means the same as 1, but as a selectable option, which isn’t actually selectable right now (it was used for testing/dev, but we didn’t think it made sense in the release).

For what it’s worth, I’ll throw in a bonus note about what the different analog modes mean:  
1 or 2, old style - simple deadband. With 2 values stored, the system only interpolates from V2.timestamp-SC\_Exec\_Rate.  
3, new style - SLIM compression. With 2 values, the system interpolates across the full range from V1.timstamp-\>V2.timestamp.

The repercussions for this are that graphing the raw data looks more correct with the new system, but discrete values incorrectly classified look worse.

Ok, way more than you asked for.

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [November 10, 2011, 10:58pm UTC](https://forum.inductiveautomation.com/t/datatype-and-querymode/3584/5 "2011-11-10T22:58:44Z")

</div>

> [@](#):
>
> Perhaps it could be expanded for tag history?

Yes, I suppose we should update it. I also need to update it for the new option of writing to properties through the write queue table, instead of through config change. (Note: the write queue changes are backwards compatible, so don't worry if this is the first time you've heard of the change).

And of course, soon we'll have to add in better support for property value changes and custom properties...

Regards,

---

<div class="post-metadata">

**Author:** ![Robert](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@Robert](https://forum.inductiveautomation.com/u/Robert)\
**Post date:** [November 10, 2011, 11:12pm UTC](https://forum.inductiveautomation.com/t/datatype-and-querymode/3584/6 "2011-11-10T23:12:00Z")

</div>

> [@Colby.Clegg](#):
>
> custom properties...

Oooo, you big tease. How long do I have to wait for this?

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [November 11, 2011, 12:02am UTC](https://forum.inductiveautomation.com/t/datatype-and-querymode/3584/7 "2011-11-11T00:02:12Z")

</div>

I really hope we can work it in to the changes we’re making for 7.4. Can’t say for sure yet, but we’ll see.

Regards,

---

<div class="post-metadata">

**Author:** ![Robert](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@Robert](https://forum.inductiveautomation.com/u/Robert)\
**Post date:** [June 8, 2012, 6:20pm UTC](https://forum.inductiveautomation.com/t/datatype-and-querymode/3584/8 "2012-06-08T18:20:56Z")

</div>

I’ve lost track of this,

do we have the ability to directly reference custom tag properties? Do I have to wait for 7.5?

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [June 14, 2012, 5:22pm UTC](https://forum.inductiveautomation.com/t/datatype-and-querymode/3584/9 "2012-06-14T17:22:03Z")

</div>

Sorry, no, still no custom properties. The properties on UDTs can’t be accessed from outside, and they don’t exist yet in external tags either. We really looked at doing this, but ultimately couldn’t work it in to the very limited schedule (5 weeks) we had for 7.5.

Regards,

---

<div class="post-metadata">

**Author:** ![Robert](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@Robert](https://forum.inductiveautomation.com/u/Robert)\
**Post date:** [June 14, 2012, 9:02pm UTC](https://forum.inductiveautomation.com/t/datatype-and-querymode/3584/10 "2012-06-14T21:02:26Z")

</div>

Oh well, at least your still thinking about it.
