2012-08-22 19 views
1

我有一個針對Rally Analytics的查詢,該查詢返回的數據集大於pagesize。所以我想做另一個查詢來返回剩餘的數據集。我嘗試設置一個startindex值,但這不起作用,StartIndex保持爲0.Rally Analytics設置查詢的起始索引

    this.query = { 
         find:Ext.encode(requestedQuery.find), 
         StartIndex:20000, 
         pagesize:20000 //MAX_PAGESIZE 
        }; 

       _queryAnalyticsApi:function() { 
        Ext.Ajax.request({ 
         url:"https://rally1.rallydev.com/analytics/1.27/" + this.workspace + "/artifact/snapshot/query.js?" + Ext.Object.toQueryString(this.query) + 
          "&fields=" + JSON.stringify(this.requestedFields) + "&sort={_ValidFrom:1}", 
         method:"GET", 
         //need to change this to a POST 
         success:function (response) { 
          this._afterQueryReturned(JSON.parse(response.responseText)); 
         }, 
         scope:this 
        }); 
       }, 

回答

0

您要使用的參數稱爲start。此外,在後續頁面中,使用從數據的第一頁返回的ETLDate包含過濾器非常重要,以便您的結果在時間上保持一致。我們在AppSDK 2.0中創建了一個SnapshotStore,爲您處理所有這些複雜問題。很快找到它!

1

這是有效的,因爲結果集的屬性被稱爲StartIndex。如果可以在服務器上首先定義和處理粒度(即一天,一週),那麼它就不錯,所以它不必返回這樣的大數據集。

+1

我認爲Lookback API的長遠目標是在服務器上完成這些聚合中的某些聚合。 –