# Get Remote Tag Provider Info via Script

**URL:** <https://forum.inductiveautomation.com/t/get-remote-tag-provider-info-via-script/53972>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [December 9, 2021, 8:46pm UTC](https://forum.inductiveautomation.com/t/get-remote-tag-provider-info-via-script/53972 "2021-12-09T20:46:25Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![jespinmartin1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jespinmartin1/32/57175_2.png) [@jespinmartin1](https://forum.inductiveautomation.com/u/jespinmartin1)\
**Post date:** [December 9, 2021, 8:46pm UTC](https://forum.inductiveautomation.com/t/get-remote-tag-provider-info-via-script/53972/1 "2021-12-09T20:46:25Z")

</div>

Any Change to get **Remote Gateway** Information via script

From Image I would like to get both _Gateway_ and _Provider_  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/3/e302c8122f3ea6483a03ac9e2aa981254d55368a.png)

I’m afraid that I have to query internaldb

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [December 9, 2021, 9:36pm UTC](https://forum.inductiveautomation.com/t/get-remote-tag-provider-info-via-script/53972/2 "2021-12-09T21:36:59Z")

</div>

> [@jespinmartin1](#):
>
> I’m afraid that I have to query internaldb

I think you're right.

---

<div class="post-metadata">

**Author:** ![jespinmartin1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jespinmartin1/32/57175_2.png) [@jespinmartin1](https://forum.inductiveautomation.com/u/jespinmartin1)\
**Post date:** [December 9, 2021, 9:40pm UTC](https://forum.inductiveautomation.com/t/get-remote-tag-provider-info-via-script/53972/3 "2021-12-09T21:40:51Z")

</div>

I haven’t done something like that yet. Any example you can provide please!  
The correct classes to use maybe 😑

---

<div class="post-metadata">

**Author:** ![jespinmartin1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jespinmartin1/32/57175_2.png) [@jespinmartin1](https://forum.inductiveautomation.com/u/jespinmartin1)\
**Post date:** [December 9, 2021, 11:18pm UTC](https://forum.inductiveautomation.com/t/get-remote-tag-provider-info-via-script/53972/4 "2021-12-09T23:18:31Z")

</div>

Cant import `com.inductiveautomation.gateway.tags`. I think that is the module I need, right?

```auto
com.inductiveautomation.ignition.common.script.JythonExecException
Traceback (most recent call last):
  File "<function:runAction>", line 4, in runAction
ImportError: No module named gateway

	caused by org.python.core.PyException
Traceback (most recent call last):
  File "<function:runAction>", line 4, in runAction
ImportError: No module named gateway

```

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [December 9, 2021, 11:23pm UTC](https://forum.inductiveautomation.com/t/get-remote-tag-provider-info-via-script/53972/5 "2021-12-09T23:23:58Z")

</div>

This may help

> [@Connecting to adhoc SQLite database from Jython?](https://forum.inductiveautomation.com/t/connecting-to-adhoc-sqlite-database-from-jython/52698):
>
> Has anyone successfully connected to an adhoc SQLite database before in Jython? I would normally use the sqlite3 library but it’s C-based. I only want to connect to it briefly to pull out some config. If you must know, I want to connect to the Ignition config.idb to export some tables to JSON format so that I can document configuration and also compare config between gateway, so I want to get in and out. Otherwise, would creating a connection to it via the gateway config cause issues? I would …

---

<div class="post-metadata">

**Author:** ![jespinmartin1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jespinmartin1/32/57175_2.png) [@jespinmartin1](https://forum.inductiveautomation.com/u/jespinmartin1)\
**Post date:** [December 9, 2021, 11:34pm UTC](https://forum.inductiveautomation.com/t/get-remote-tag-provider-info-via-script/53972/6 "2021-12-09T23:34:28Z")

</div>

This is looking better, almost there.  
After that, how do you collect results from `session`?

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [December 9, 2021, 11:52pm UTC](https://forum.inductiveautomation.com/t/get-remote-tag-provider-info-via-script/53972/7 "2021-12-09T23:52:04Z")

</div>

Not sure sorry, no personal experience. Pinging @nminchin

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [December 9, 2021, 11:53pm UTC](https://forum.inductiveautomation.com/t/get-remote-tag-provider-info-via-script/53972/8 "2021-12-09T23:53:22Z")

</div>

`session.rawQueryMaps` will return a dataset

---

<div class="post-metadata">

**Author:** ![jespinmartin1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jespinmartin1/32/57175_2.png) [@jespinmartin1](https://forum.inductiveautomation.com/u/jespinmartin1)\
**Post date:** [December 10, 2021, 12:45am UTC](https://forum.inductiveautomation.com/t/get-remote-tag-provider-info-via-script/53972/9 "2021-12-10T00:45:28Z")

</div>

Ohh True, I did not notice it.  
Do you know how to import Subclasses?

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [December 10, 2021, 12:58am UTC](https://forum.inductiveautomation.com/t/get-remote-tag-provider-info-via-script/53972/10 "2021-12-10T00:58:01Z")

</div>

Do you mean like:

```auto
from library.thing import sub-thing

```

?

---

<div class="post-metadata">

**Author:** ![jespinmartin1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jespinmartin1/32/57175_2.png) [@jespinmartin1](https://forum.inductiveautomation.com/u/jespinmartin1)\
**Post date:** [December 10, 2021, 1:05am UTC](https://forum.inductiveautomation.com/t/get-remote-tag-provider-info-via-script/53972/11 "2021-12-10T01:05:36Z")

</div>

Can you import this one? 😮  
[RemoteHistorianSettingsRecord (inductiveautomation.com)](http://files.inductiveautomation.com/sdk/javadoc/ignition81/8.1.1/com/inductiveautomation/gateway/tags/history/distributed/client/RemoteHistorianSettingsRecord.html)

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [December 10, 2021, 1:08am UTC](https://forum.inductiveautomation.com/t/get-remote-tag-provider-info-via-script/53972/12 "2021-12-10T01:08:21Z")

</div>

Should be able to use:

```auto
from com.inductiveautomation.gateway.tags.history.distributed.client import RemoteHistorianSettingsRecord

```

You’ll need to know how to actually use it though… which is the hard/impossible part without IA’s proper documentation / help from IA guys/gals

---

<div class="post-metadata">

**Author:** ![jespinmartin1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jespinmartin1/32/57175_2.png) [@jespinmartin1](https://forum.inductiveautomation.com/u/jespinmartin1)\
**Post date:** [December 10, 2021, 1:11am UTC](https://forum.inductiveautomation.com/t/get-remote-tag-provider-info-via-script/53972/13 "2021-12-10T01:11:21Z")

</div>

That’s the thing. Some classes are not importable because a lack of module name.  
But those non importable are subclasses of importable classes.  
Take a look to the one I sent, its super is com…PersistentRecord, which is importable.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [December 10, 2021, 1:14am UTC](https://forum.inductiveautomation.com/t/get-remote-tag-provider-info-via-script/53972/14 "2021-12-10T01:14:26Z")

</div>

Yeah, I still fumble my way around the javadocs with a fairly low hit-rate until I get help from the forum from the IA guys. It feels more like stabbing in the dark in space trying to hit pluto, until you get help

---

<div class="post-metadata">

**Author:** ![jespinmartin1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jespinmartin1/32/57175_2.png) [@jespinmartin1](https://forum.inductiveautomation.com/u/jespinmartin1)\
**Post date:** [December 10, 2021, 1:15am UTC](https://forum.inductiveautomation.com/t/get-remote-tag-provider-info-via-script/53972/15 "2021-12-10T01:15:43Z")

</div>

```auto
com.inductiveautomation.ignition.common.script.JythonExecException
Traceback (most recent call last):
  File "<function:runAction>", line 3, in runAction
ImportError: No module named gateway

	caused by org.python.core.PyException
Traceback (most recent call last):
  File "<function:runAction>", line 3, in runAction
ImportError: No module named gateway

```

Like that haha

---

<div class="post-metadata">

**Author:** ![jespinmartin1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jespinmartin1/32/57175_2.png) [@jespinmartin1](https://forum.inductiveautomation.com/u/jespinmartin1)\
**Post date:** [December 10, 2021, 1:16am UTC](https://forum.inductiveautomation.com/t/get-remote-tag-provider-info-via-script/53972/16 "2021-12-10T01:16:23Z")

</div>

haha agree. Ok I’ll take the one from the other post. Thanks

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [December 10, 2021, 1:19am UTC](https://forum.inductiveautomation.com/t/get-remote-tag-provider-info-via-script/53972/17 "2021-12-10T01:19:51Z")

</div>

just FYI, you can only get the gateway context (`IgnitionGateway`) from the gateway scope (so you can’t run this in a Vision client)

---

<div class="post-metadata">

**Author:** ![jespinmartin1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jespinmartin1/32/57175_2.png) [@jespinmartin1](https://forum.inductiveautomation.com/u/jespinmartin1)\
**Post date:** [December 10, 2021, 1:20am UTC](https://forum.inductiveautomation.com/t/get-remote-tag-provider-info-via-script/53972/18 "2021-12-10T01:20:24Z")

</div>

Oh yeah, already knew that. Thanks

---

<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:** [December 10, 2021, 2:11am UTC](https://forum.inductiveautomation.com/t/get-remote-tag-provider-info-via-script/53972/19 "2021-12-10T02:11:07Z")

</div>

Also note that not all gateway classes are exposed to scripting at all. Specifically, classes supplied by modules instead of the platform. Module classes are only accessible via deliberate scripting support from the module, or rather intricate reflection techniques.

---

<div class="post-metadata">

**Author:** ![danielps1818](https://avatars.discourse-cdn.com/v4/letter/d/ecae2f/32.png) [@danielps1818](https://forum.inductiveautomation.com/u/danielps1818)\
**Post date:** [January 22, 2026, 8:54am UTC](https://forum.inductiveautomation.com/t/get-remote-tag-provider-info-via-script/53972/20 "2026-01-22T08:54:59Z")

</div>

HI!

Does anyone know if there is an easier way to get this info (now that we are 5 years later)?

I need to read the gateway name from the remote tag provider so I can properly use the historian module _(historian module needs system name, provider and full path)_.

Thanks!

[Next page](https://forum.inductiveautomation.com/t/get-remote-tag-provider-info-via-script/53972.md?page=2)
