我正在使用Simple_Salesforce使用salesforce api獲取大塊數據。我想知道在撥打電話時是否有指定日期範圍。我不斷收到以下錯誤。Simple_Salesforce:在日期範圍內進行批量SQL調用
query = 'SELECT Id, Name FROM Account WHERE createddate > 1451621381000'
sf.bulk.Account.query(query)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/simple_salesforce/bulk.py", line 157, in _get_batch_results
url_query_results = "{}{}{}".format(url, '/', result.json()[0])
IndexError: list index out of range
query = 'SELECT Id, Name FROM Account WHERE createddate > 2017-01-01'
這工作,這樣我就可以在條件過濾
query = "SELECT Id, CreatedDate FROM Tbl WHERE Id = '500G0000008LeHzIAK'"
dd = sf.bulk.Tbl.query(query)
df = pd.DataFrame(dd)
然而,迄今爲止似乎被保存在一個奇怪的方式,這將引發一個錯誤
query = "SELECT Id, CreatedDate FROM Case Tbl CreatedDate = '1328828872000L'"
query = "SELECT Id, CreatedDate FROM Case Tbl CreatedDate > '1328828872000L'"
dd = sf.bulk.Tbl.query(query)
df = pd.DataFrame(dd)
日期值樣子此:1463621383000L