querySinglePointHistData.sh 735 B

12345678910111213141516171819202122232425
  1. #!/usr/bin/env bash
  2. # 查询单点历史数据多数据值功能
  3. ROOT=$(cd `dirname $0`/../../; pwd)
  4. cd $ROOT
  5. source $ROOT/shell/tsdb/common.sh
  6. storagePath="root.test1.wf01.wt01"
  7. days=1
  8. pointIndex=1
  9. echo "----test query range days:$days"
  10. beginDate="2018-06-01 00:00:00"
  11. echo beginDate:beginDate
  12. for days in 1 2 3 4 7 15 30 60 90
  13. do
  14. endDate=$(date -d "${beginDate} ${days} days" +"%Y-%m-%d %H:%M:%S")
  15. #endDate="2022-12-02 00:00:00"
  16. echo endDate:$endDate
  17. java -cp ./lib/iotdb.jar demo.query.histQuery.QuerySinglePointHistData \
  18. --host $host --storagePath ${storagePath} --pointNamePrefix pointName1_ --pointIndex $pointIndex \
  19. --beginDate "$beginDate" --endDate "$endDate" \
  20. --showQueryResult 0 2>&1 | tee -a ./log/iotdb/out.log
  21. done