4 Replies Latest reply on Apr 1, 2016 7:16 PM by jstarnes

    Renaming of element results in faulty asset element Hierarchy

    Ann.Sniekers

      My current PI-AF hierachy is as follows:

       

      • FieldName
        • Wells
          • Well name (which was originally identical to FieldName)

       

      When renaming the well (which had the same name as the FieldName - however no coupling beyond the name) to Well01 - I started to get issues when executing the query to obtain values of the attributes of the Well.

      I would expect to query these attributes by using the path: FieldName\Wells\Well01\attribute (which is also the path you get by right clicking on the attribute and press "copy path").

      However not sure why but PI-AF indicates that the correct query should be Well01\Wells\Attribute.

      Bottom line - PI-AF thinks the FieldName has changed instead of the well Name.

       

      I restarted all services which did NOT solve the issue.

       

      Any ideas? Is this a known bug?

       

      Thanks in advance

       

      Ann

        • Re: Renaming of element results in faulty asset element Hierarchy
          gregor

          Hello Ann,

           

          The behavior you describe indeed sounds unusual. I assume there are some relationships or object inheritance that may not be obvious immediately.

          Can you describe step-by-step how this issue can be reproduced?

          If you get the correct path to Attributes via "copy path", where do you see the unexpected picture? 

            • Re: Renaming of element results in faulty asset element Hierarchy
              Ann.Sniekers

              Dear Gregor,

               

              Reproduction:

              Step 1: have a structure setup as Name\Wells\Name. Put some attributes in the lowest element

              Step 2: rename the lowest level to Name1. (by copying the path we get: Name\Wells\Name1.)

               

              However by trying (via PI SQL commander) to query an attribute within Name1 (see below) I got no value back (knowing there is a value available).

                   SELECT eh.Name as elementName, ea.Name as attributeName, da.Time as Time, da.Value as Value

                   FROM PROD.Asset.ElementHierarchy eh

                   INNER JOIN PROD.Asset.ElementAttribute ea ON (ea.ElementID = eh.ElementID)

                   INNER JOIN PROD.Data.ft_InterpolateDiscrete da ON (da.ElementAttributeID = ea.ID)

                   WHERE eh.Path = '\Name\Wells\' AND

                   eh.Name = 'Name1' AND

                   ea.Name = 'AttributeName1' AND

                   da.Time = '2016/03/26 06:00:00'

                   OPTION (FORCE ORDER, EMBED ERRORS)

               

              When executing the query below I learned that PI-AF expects the query above with "\Name1\Wells\" as path.

                   SELECT eh.*

                   FROM PROD.Asset.ElementHierarchy eh

                   order by Path, Name

                   OPTION (FORCE ORDER, EMBED ERRORS)

               

              Kind regards

               

              Ann

              1 of 1 people found this helpful