@@ -340,7 +340,7 @@ async def get_latest_tabular_data(
340340 return response .time_captured .ToDatetime (), response .time_synced .ToDatetime (), struct_to_dict (response .payload )
341341
342342 async def export_tabular_data (
343- self , part_id : str , resource_name : str , resource_subtype : str , method_name : str , interval : Optional [CaptureInterval ] = None
343+ self , part_id : str , resource_name : str , resource_subtype : str , method_name : str , start_time : Optional [datetime ] = None , end_time : Optional [ datetime ] = None
344344 ) -> List [ExportTabularDataResponse ]:
345345 """Obtain unified tabular data and metadata from the specified data source.
346346
@@ -361,20 +361,20 @@ async def export_tabular_data(
361361 resource_name (str): The name of the requested resource that captured the data.
362362 resource_subtype (str): The subtype of the requested resource that captured the data.
363363 method_name (str): The data capture method name.
364- interval (CaptureInterval ): Optional time interval to retrieve data for. Contains start and end fields as protobuf
365- Timestamps defining the time range to query .
364+ start_time (datetime ): Optional start time for requesting a specific range of data.
365+ end_time (datetime): Optional end time for requesting a specific range of data .
366366
367367 Returns:
368368 List[ExportTabularDataResponse]: The unified tabular data and metadata.
369369
370370 For more information, see `Data Client API <https://docs.viam.com/appendix/apis/data-client/>`_.
371371 """
372372
373+ interval = CaptureInterval (start = datetime_to_timestamp (start_time ), end = datetime_to_timestamp (end_time ))
373374 request = ExportTabularDataRequest (
374375 part_id = part_id , resource_name = resource_name , resource_subtype = resource_subtype , method_name = method_name , interval = interval
375376 )
376- response : List [ExportTabularDataResponse ] = await self ._data_client .ExportTabularData (request , metadata = self ._metadata )
377- return response
377+ return await self ._data_client .ExportTabularData (request , metadata = self ._metadata )
378378
379379 async def binary_data_by_filter (
380380 self ,
0 commit comments