Hi, I want to query data from different tables in the database, then display these data in the Table component by datetime , but ignition will Generate a table every month,like “sqlt_data_1_2017_10”,“sqlt_data_1_2017_09” , how query data from these table ,maybe I want query 1 year .
What about just using system.tag.queryTagHistory?
It already traverses the partitions for you and returns a dataset which you can plug into your table component.
thanks, I use this script:
endTime = system.date.now()
startTime = system.date.addMinutes(endTime, -30)
system.tag.queryTagHistory(paths=[‘Press_Hiset’], startDate = startTime,endDate = endTime, returnSize=1, aggregationMode=“Maximum”, returnFormat=‘Wide’)
there is a error : syntax error on token : ‘EQUAL’(Line 2 , Char 9)
I ran the script and did not get any errors. The error you posted sounds like a syntax problem though. Try getting this to work in the script console if you have not already.
And don’t forget that
system.tag.queryTagHistory() returns a dataset – you have to assign that to a variable or to a component’s dataset property.
Thank you! It’s work ok