I am a Java developer. I am new to niagara ax and the haystack project. My goal is to export custom history data to a CSV file.
I read the Guide Specification, and I think the haystack would provide a REST API so that my standalone java application could query the history data and save them into a CSV file. It would not modify the data source. Am I right? Is it the direct way to export the CSV via custom code? Is there any sample steps / code I could get started?
Thank you very much!!
Mike JarmySat 31 May 2014
If I understand your question correctly, I think you might be looking for NHaystack. Among other things, NHaystack can function as a means to export history data from an AX station over http, via haystack zinc format, which is similar to CSV.
So if all you want to do is get history data out of an AX station, and you don't want to use oBIX, then NHaystack will do what you want.
Note that NHaystack doesn't actually save data to a file for you, it just responds to an HTTP request by returning some zinc, which you can do whatever you want with.
If you really want CSV instead of zinc in the http response, you can modify the request header to ask for that. However, there is a library called haystack-java that can parse zinc for you on the client side, so you should probably look into that.
If I've misunderstood your question just let me know.
Kenson Leung Sat 31 May 2014
I am a Java developer. I am new to niagara ax and the haystack project. My goal is to export custom history data to a CSV file.
I read the Guide Specification, and I think the haystack would provide a REST API so that my standalone java application could query the history data and save them into a CSV file. It would not modify the data source. Am I right? Is it the direct way to export the CSV via custom code? Is there any sample steps / code I could get started?
Thank you very much!!
Mike Jarmy Sat 31 May 2014
If I understand your question correctly, I think you might be looking for NHaystack. Among other things, NHaystack can function as a means to export history data from an AX station over http, via haystack zinc format, which is similar to CSV.
So if all you want to do is get history data out of an AX station, and you don't want to use oBIX, then NHaystack will do what you want.
Note that NHaystack doesn't actually save data to a file for you, it just responds to an HTTP request by returning some zinc, which you can do whatever you want with.
If you really want CSV instead of zinc in the http response, you can modify the request header to ask for that. However, there is a library called haystack-java that can parse zinc for you on the client side, so you should probably look into that.
If I've misunderstood your question just let me know.