amazon-web-servicesaws-iotaws-iot-analytics

AWS IoT Analytics queries for retrieving data from dataset using boto3


Can we use query while retrieving the data from the dataset in AWS IoT Analytics, I want data between 2 timestamps. Im using boto3 to fetch the data. I didn't see any option to use query in get dataset content Below is the boto3 code: response = client.get_dataset_content( datasetName='string', versionId='string' )

Does anyone have suggestions how to use query or how rerieve the data between 2 timestamp in AWS IoT Analytics?

Thanks, Pankaj


Solution

  • Frankly, the easiest thing would be to do your own time filtering (the result of get_dataset_content is a csv file).

    That's what QuickSight does to allow you to navigate the dataset in time.

    If this isn't feasible the alternative is to reprocess the datastore with an updated pipeline that filters out everything except the time range you're interested in (more information here). You should note that while it's tempting to use the startTime and endTime parameters for StartPipelineReprocessing, these are only approximate to the nearest hour.