Understanding Historics implemenation


I want to understand a bit about the Historics implementation. Here is my current code block.

PreparedHistoricsQuery query = datasiftClient.historics().prepare(hashValue, start_time, end_time, queryName).sync();
this.historicsID = query.getId();
datasiftClient.push().createPull(PullJsonType.JSON_NEW_LINE, query, subscriptionName);
DataSiftResult historicsResult = datasiftClient.historics().start(query).sync();

My query here is, is this the correct implementation? Also, do we need the historicsID?


Hi pravakar,

This document describes the historics api step by step: https://dev.datasift.com/docs/products/stream/features/historics/historics-access/historics-api-step-step

This document also is useful on how historics tie in to Push: https://dev.datasift.com/docs/products/stream/features/delivery/push/push-api-step-step


Hi, I have already gone through the document which outlines the api usage. However, I am using the direct methods, so the query. Can you please have a look at the piece of code and let me know if we need the historics id or not?


I am referring the below link which doesn’t use the historics id.