sdk.result.merge_download_files()

elements.sdk.api.result

Merges Result Download files by Algorithm Computation and Data Type into a single CSV file

Parameters

  • algorithm_computation_id_to_data_type_to_downloaded_paths Dict[str, Dict[str, List[str]]] - Takes as input the output of the sdk.result.download() method, which downloads the Computation results per Observation.
  • [Optional]download_dir str - directory to download the merged files to

Returns

Dict[str, Dict[str, str]]: mapping of algorithm_computation_id_to_data_type_to_merged_file

File structure will be {algorithm_computation_id}/{data_type}.csv

Example(s)

# Download results by Algorithm Computation ID
algorithm_computation_id_to_data_type_to_downloaded_paths = await sdk.result.download(
  algorithm_computation_ids=["1115760f-5b74-4b53-94aa-4e1b2df7a4ae"]
)

# Merge downloaded files
algorithm_computation_id_to_data_type_to_merged_file = await sdk.result.merge_download_files(
  algorithm_computation_id_to_data_type_to_downloaded_paths
)

# Dict[str, Dict[str, str]: mapping of algorithm_computation_id_to_data_type_to_merged_file
{
  'gnss_clusters': '/1115760f-5b74-4b53-94aa-4e1b2df7a4ae/gnss_clusters.csv'
}