9 Replies Latest reply on Jun 22, 2015 3:36 AM by Eugene Lee

    Read Internal Tables with PI OLEDB?

    flatbill

      Hi, I have an Internal Table setup in AF. It is a simple 'lookup' table, that holds text descriptions that go with some numeric values.  I would like to read from this Internal Table using PI OLEDB Enterprise.

      Anybody know how I can set this up, perhaps some kind of view in PI SQL Commander?

      Thanks.

      Bill

        • Re: Read Internal Tables with PI OLEDB?
          lmlcoch

          Hi Bill, PI OLEDB Enterprise is not exposing these imported AF tables, so this is not possible. Can you elaborate on your use case? Perhaps there's an alternative solution.

          • Re: Read Internal Tables with PI OLEDB?
            dng

            Hi Bill,

             

            As Lubos has mentioned, you cannot access the AF Tables via PI OLEDB Enterprise currently. We do have an enhancement request for this functionality in a future release.

             

            For workarounds, please refer to this previous thread for some suggestions: AF Table as a data source. Would any of the proposed workaround work for your use case?

              • Re: Read Internal Tables with PI OLEDB?
                flatbill

                Hi, thanks, I will use one of the suggested work arounds.  I have used the first work around suggestion before, creating AF attributes and then using a table lookup data reference.  This introduces a different problem, though; getting the element attribute to carry into an event frame.  The looked-up value seems to be visible in the event frame only when I use up a PI tag for it.   The third work around suggestion (hard code the list into a SQL View) is straight forward for programmer type people, but it hides the data from those pesky non-programmer types.   But, I appreciate the alternatives you pointed out here.

                Bill

                  • Re: Read Internal Tables with PI OLEDB?
                    dng

                    Hi Bill,

                     

                    Yea.. it looks like if you would like to reference an attribute configured in the referenced element of the event frame, only PI Point data references are currently supported. You could, however, configure a Table Lookup attribute directly in the event frame. Will that be helpful in your scenario?

                      • Re: Read Internal Tables with PI OLEDB?
                        flatbill

                        Hi, I was able to configure a Table Lookup attribute directly in the event frame, as you suggested. Due to my table structure, I need to reference the Element's Template Name... Seems tricky doing this on the event frame... Something like %ElementTemplate%.

                        I found that %ElementDescription% works, so I am using that. (I changed all the Element Descriptions to match the template name).  It would be nice to instead reference the Template Name that the Event Frame's Referenced  2015-06-18 17-39-10_Greenshot image editor - 2015-06-18 17-06-03___USNX388_ModuleDB - PI System Expl.pngElement is based on;  Can you help me with the correct syntax for %ElementTemplate% ?

                        See attached screenshot example, I would like to retrieve the value 'Coder' from the Template name.

                        If this is not possible, I am OK using the Description instead.

                        Thanks Lots!

                        Bill