Hi, I would like to retrieve this value from SQL Server (directly PIFD).. can someone tell me which table and column to look for the value/data? Thanks
@Chew Chee: This approach to dig data directly from PIFD database is not a good long term solution even if you get it to work. The primary problem is that the database schema could change in the future and invalidate the entire query. Could you try to explain what you are looking for so we can provide some hints or solutions?
Two data access products called PI OLEDB Enterprise provider and PI JDBC enable you to query the PIFD database. I invite you to take a look of these products through 1-hour format webinar describing what you should know about. Use the link here to know more on PI OLEDB Enterprise and consult the library (Library > vCampus PI Products Kit > Data Access Technologies > PI JDBC 2010 R2 Administrator Guide) for PI JDBC.
I want to add to Mathieu's response. You are urged to use our data access products such as what Mathieu described above and the AF SDK rather than directly access the PIFD database. As Mathieu already pointed out, we may (mostly like WILL) change the database schema in the future and if you use our data access product, you will not run into any compatibility issues.
Thank You both for your quick response. Will use the PI OLEDB. Thanks Mathieu for the guide. Will dig into.
Mathiue/ Steve: I want to get a list of ElementAttribute and its Category. I know that Pi OLEDB Enterprise 'Left outer join' functionality yet to be released -- Read the posting on Feb 21 2012. A way to get around ?
I want to get a complete list of Element Attribute's name, ElementName, ElementTemplateAttributeName & Category. Any help is greatly appreciated.
The LEFT OUTER JOIN functionality is part of the PI OLEDB Enterprise 2010 R3 release - it was released and then shortly after we retired it as we found an issue that justified retiring it.
The good news is, we fixed this issue and made a "Release Candidate" version available on the vCampus Download Center, so that this community can kick its tires before we re-release to public. So I encourage you to go ahead and download the PI OLEDB Enterprise 2010 R3 Release Candidate that's available under the Data Access Technologies section of the vCampus Download Center, and let us know if that addresses your issue!
In the meantime, here's an example query to start from, in case you cannot use the Release Candidate...
SELECT eh.Name ElementName, ea.Name AttributeName, cat.Name CategoryName
FROM NuGreen.Asset.ElementHierarchy eh
INNER JOIN NuGreen.Asset.ElementAttribute ea ON ea.ElementID = eh.ElementID
INNER JOIN NuGreen.Asset.ElementAttributeCategory eacat ON eacat.ElementAttributeID = ea.ID
INNER JOIN NuGreen.Asset.Category cat ON cat.ID = eacat.CategoryID
WHERE eh.Path = '\Some\Element\Path\'
AND eh.Name = 'ElementName'
Thanks Steve. I got the RC version.. the left outer join is working like a charm! :) The performance is better too! Love it!
Retrieving data ...