Dubious start and end dates in subscription


#1

I hit the /prepare for historics and I got the following response:

{u’dpus’: 30, u’id’: u’id_value’, u’availability’: {u’start’: datetime.datetime(2013, 6, 18, 19, 0), u’end’: datetime.datetime(2013, 6, 19, 19, 0), u’sources’: {u’twitter’: {u’status’: 100, u’augmentations’: {u’language’: 100, u’links’: 100, u’demographic’: 100, u’trends’: 100, u’meta’: 100, u’salience’: 100, u’klout’: 100}, u’versions’: [u’3’]}}}}

Then I hit the /push to subscribe to the historics and I got this:

{u’status’: u’active’, u’last_request’: None, u’user_id’: user_id, u’name’: u’name’, u’output_params’: [], u’created_at’: datetime.datetime(2014, 6, 4, 1, 14, 44), u’hash_type’: u’historic’, u’remaining_bytes’: None, u’start’: datetime.datetime(2014, 6, 4, 1, 14, 44), u’last_success’: None, u’output_type’: u’pull’, u’lost_data’: False, u’end’: datetime.datetime(1969, 12, 31, 18, 0), u’id’: u’the_id’, u’hash’: u’the_hash’}

Note the ‘start’ and ‘end’ keys. The ‘start’ has the same value as created_at (which is not what I was expecting). The ‘end’ has a scary value. What does it signify?

Then I hit the /historics/get endpoint for info regarding active subscriptions and I get this:

{u’status’: u’active’, u’last_request’: None, u’user_id’: user_id, u’name’: u’name’, u’output_params’: [], u’created_at’: datetime.datetime(2014, 6, 4, 1, 14, 44), u’end’: None, u’interaction_count’: 0, u’hash_type’: u’historic’, u’remaining_bytes’: None, u’start’: datetime.datetime(2014, 6, 4, 1, 14, 44), u’last_success’: None, u’lost_data’: False, u’output_type’: u’pull’, u’id’: u’the_id’, u’hash’: u’the_hash’}

The ‘start’ key in the above is not the start_date I mentioned while I was 'prepare’ing my historic query. Do I need to be worried about this?
Also, the ‘end’ key says ‘None’. Shouldn’t it be the end_date that I mentioned while 'prepare’ing my historic query?


#2

Hi,

Since all historic queries use push subscriptions the 'start' of the push subscription related to a historic will the time it is created. The end time of the push subscription will look a bit out of place because this is how Python displays '0' as a datetime.

In regard to your historics/get call I would like to dig a little deeper. Please head over to our support site and raise a ticket there and include the ID of your historic and which version of the Python client you are using. 


#3

Hi Paul,

As Jason pointed out in this thread http://dev.datasift.com/discussions/subscriptions-key-instead-data-key-historicsget-response#comment-2135, I seem to have gotten my API calls mixed up. Instead of doing a historics/get, I was doing a push/get and that is what was causing the trouble.

I did the right one now and the dates seems to be fine.

Thanks a lot!