Skip to content

Export Dataset

GET
/v2/datasets/export/{dataset_id}
curl --request GET \
--url 'http://localhost:3000/v2/datasets/export/example?status=Live'
dataset_id
required
string

Unique identifier for the dataset

status
string
Example
Live

OK

Media type application/json
object
Examples

Success: Live Dataset export success

{
"id": "api.datasets.export",
"ver": "v2",
"ts": "2024-11-19T12:46:01+05:30",
"params": {
"status": "SUCCESS",
"resmsgid": "ae57c620-2858-40f9-9d8e-33f8f259449d"
},
"responseCode": "OK",
"result": {
"id": "content-data-v2",
"dataset_id": "content-data-v2",
"type": "master",
"name": "content-data-v2",
"validation_config": {
"validate": true,
"mode": "Strict"
},
"extraction_config": {
"is_batch_event": true,
"extraction_key": "events",
"dedup_config": {
"drop_duplicates": true,
"dedup_key": "id",
"dedup_period": 604800
}
},
"data_schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"tripID": {
"key": "tripID",
"type": "string",
"arrival_format": "text",
"data_type": "string",
"isRequired": false,
"resolved": false
},
"VendorID": {
"key": "VendorID",
"type": "string",
"arrival_format": "text",
"data_type": "string",
"isRequired": false,
"resolved": true
},
"tpep_pickup_datetime": {
"key": "tpep_pickup_datetime",
"type": "string",
"arrival_format": "text",
"data_type": "date-time",
"isRequired": false,
"resolved": false
},
"tpep_dropoff_datetime": {
"key": "tpep_dropoff_datetime",
"type": "string",
"arrival_format": "text",
"data_type": "date-time",
"isRequired": false,
"resolved": false
},
"passenger_count": {
"key": "passenger_count",
"type": "string",
"arrival_format": "text",
"data_type": "string",
"isRequired": false,
"resolved": true
},
"trip_distance": {
"key": "trip_distance",
"type": "string",
"arrival_format": "text",
"data_type": "string",
"isRequired": false,
"resolved": true
},
"RatecodeID": {
"key": "RatecodeID",
"type": "string",
"arrival_format": "text",
"data_type": "string",
"isRequired": false,
"resolved": true
},
"store_and_fwd_flag": {
"key": "store_and_fwd_flag",
"type": "string",
"arrival_format": "text",
"data_type": "string",
"isRequired": false,
"resolved": true
},
"PULocationID": {
"key": "PULocationID",
"type": "string",
"arrival_format": "text",
"data_type": "string",
"isRequired": false,
"resolved": true
},
"DOLocationID": {
"key": "DOLocationID",
"type": "string",
"arrival_format": "text",
"data_type": "string",
"isRequired": false,
"resolved": true
},
"payment_type": {
"key": "payment_type",
"type": "string",
"arrival_format": "text",
"data_type": "string",
"isRequired": false,
"resolved": true
},
"primary_passenger": {
"key": "primary_passenger",
"type": "object",
"arrival_format": "object",
"data_type": "object",
"isRequired": false,
"resolved": true,
"properties": {
"email": {
"key": "email",
"type": "string",
"arrival_format": "text",
"data_type": "string",
"isRequired": false,
"resolved": true
},
"mobile": {
"key": "mobile",
"type": "string",
"arrival_format": "text",
"data_type": "string",
"isRequired": false,
"resolved": true
}
}
},
"fare_details": {
"key": "fare_details",
"type": "object",
"arrival_format": "object",
"data_type": "object",
"isRequired": false,
"resolved": true,
"properties": {
"fare_amount": {
"key": "fare_amount",
"type": "string",
"arrival_format": "text",
"data_type": "string",
"isRequired": false,
"resolved": true
},
"extra": {
"key": "extra",
"type": "string",
"arrival_format": "text",
"data_type": "string",
"isRequired": false,
"resolved": true
},
"mta_tax": {
"key": "mta_tax",
"type": "string",
"arrival_format": "text",
"data_type": "string",
"isRequired": false,
"resolved": true
},
"tip_amount": {
"key": "tip_amount",
"type": "string",
"arrival_format": "text",
"data_type": "string",
"isRequired": false,
"resolved": true
},
"tolls_amount": {
"key": "tolls_amount",
"type": "string",
"arrival_format": "text",
"data_type": "string",
"isRequired": false,
"resolved": true
},
"improvement_surcharge": {
"key": "improvement_surcharge",
"type": "string",
"arrival_format": "text",
"data_type": "string",
"isRequired": false,
"resolved": true
},
"total_amount": {
"key": "total_amount",
"type": "string",
"arrival_format": "text",
"data_type": "string",
"isRequired": false,
"resolved": true
},
"congestion_surcharge": {
"key": "congestion_surcharge",
"type": "string",
"arrival_format": "text",
"data_type": "string",
"isRequired": false,
"resolved": true
}
}
}
},
"additionalProperties": true
},
"dedup_config": {
"drop_duplicates": true,
"dedup_key": "tripID",
"dedup_period": 604800
},
"denorm_config": {
"redis_db_host": "localhost",
"redis_db_port": 6379,
"denorm_fields": []
},
"router_config": {
"topic": "content-data-v2"
},
"dataset_config": {
"file_upload_path": [
"container/api-service/user_uploads/chunk-2_addedf.json"
],
"indexing_config": {
"olap_store_enabled": true,
"lakehouse_enabled": false,
"cache_enabled": false
},
"keys_config": {
"timestamp_key": "tpep_pickup_datetime",
"data_key": "",
"partition_key": ""
},
"cache_config": {
"redis_db_host": "localhost",
"redis_db_port": 6379,
"redis_db": 7
}
},
"tags": [],
"status": "Live",
"created_by": "SYSTEM",
"updated_by": "SYSTEM",
"data_version": 1,
"api_version": "v2",
"version": 1,
"sample_data": {
"mergedEvent": {
"tripID": "ccbb970c-4d10-4247-be0c-a480996f3429",
"VendorID": "1",
"tpep_pickup_datetime": "2023-02-26 00:36:10",
"tpep_dropoff_datetime": "2023-09-15 00:45:45",
"passenger_count": "2",
"trip_distance": "1.70",
"RatecodeID": "1",
"store_and_fwd_flag": "N",
"PULocationID": "238",
"DOLocationID": "263",
"payment_type": "1",
"primary_passenger": {
"email": "Jacey_Hintz@yahoo.com",
"mobile": "247-492-3370"
},
"fare_details": {
"fare_amount": "8.5",
"extra": "0.5",
"mta_tax": "0.5",
"tip_amount": "2.45",
"tolls_amount": "0",
"improvement_surcharge": "0.3",
"total_amount": "12.25",
"congestion_surcharge": ""
}
}
},
"entry_topic": "local.ingest",
"created_date": "2024-10-14T06:23:44.588Z",
"updated_date": "2024-10-14T06:23:44.588Z"
}
}
X-Powered-By
string
Example
Express
Content-Length
integer
Example
5155
ETag
string
Example
W/"1423-Tx46QCrIX8So3vSGVkd865IYeEY"
Date
string
Example
Tue, 19 Nov 2024 07:16:01 GMT
Connection
string
Example
keep-alive
Keep-Alive
string
Example
timeout=5

Bad Request

Media type application/json
object
Example
{
"id": "api.datasets.export",
"ver": "v2",
"ts": "2024-11-19T12:50:43+05:30",
"params": {
"status": "FAILED",
"resmsgid": "2097228c-7872-4217-a06a-0ec08e3dc67d"
},
"responseCode": "BAD_REQUEST",
"result": {},
"error": {
"code": "DATASET_EXPORT_FAILURE",
"message": "Dataset with status:Draft cannot be exported"
}
}
X-Powered-By
string
Example
Express
Content-Length
integer
Example
291
ETag
string
Example
W/"123-E2lDLItXYvKnJxGcDJ3Q0OKjqQY"
Date
string
Example
Tue, 19 Nov 2024 07:20:43 GMT
Connection
string
Example
keep-alive
Keep-Alive
string
Example
timeout=5

Not Found

Media type application/json
object
Example
{
"id": "api.datasets.export",
"ver": "v2",
"ts": "2024-11-19T12:45:10+05:30",
"params": {
"status": "FAILED",
"resmsgid": "fd6fdae2-a002-4c15-81e2-3cce539a2a5a"
},
"responseCode": "NOT_FOUND",
"result": {},
"error": {
"code": "DATASET_NOT_FOUND",
"message": "Dataset with the given dataset_id:v1-copy not found to export"
}
}
X-Powered-By
string
Example
Express
Content-Length
integer
Example
301
ETag
string
Example
W/"12d-vO+8bWB6kFOrTzeJmTIRlcTcYCQ"
Date
string
Example
Tue, 19 Nov 2024 07:15:10 GMT
Connection
string
Example
keep-alive
Keep-Alive
string
Example
timeout=5