I’m trying to write a historical query from a component in a module I’m developing. I’m using the standard gateway interface “runTagHistoryQuery” function. It’s all working very well, except I have to set it up with a fully qualified tag path in the client (histprov:historian:/drv:ignition-cody-pc:default:/tag:tags/ramp/ramp0). Obviously I think this is far from intuitive for someone to use so I’d like to whittle my tag path down to one or all of the following:
Now my question is, how do I take a less than fully qualified tag path from the client and turn it into the a fully qualified historical tag path. I can retrieve the default data source and default tag provider from the client context with:
ClientContext context = getAppContext(); defaultDatasource = context.getDefaultDatasourceName(); defaultTagProvider = context.getDefaultSQLTagsProviderName();
But I’m missing the system name. So I guess my question is
- What java Class would I use to get the system name?
- Am I even approaching this the right way or is there already a class to do this? (I’ve found classes to parse SQL tag paths but not historical).