Export Dataset
GET
/v2/datasets/export/{dataset_id}
const url = 'http://localhost:3000/v2/datasets/export/example?status=Live';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'http://localhost:3000/v2/datasets/export/example?status=Live'Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” dataset_id
required
string
Unique identifier for the dataset
Query Parameters
Section titled “Query Parameters ” status
string
Example
LiveResponses
Section titled “ Responses ”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" }}Success: ReadyToPublish Dataset exported successfully
{ "id": "api.datasets.export", "ver": "v2", "ts": "2024-11-19T12:48:11+05:30", "params": { "status": "SUCCESS", "resmsgid": "222847a0-32bf-4c63-be68-76f0e51258af" }, "responseCode": "OK", "result": { "id": "mydataset", "dataset_id": "mydataset", "name": "mydataset", "type": "event", "extraction_config": { "is_batch_event": true, "extraction_key": "events", "dedup_config": { "drop_duplicates": true, "dedup_key": "id", "dedup_period": 604800 } }, "validation_config": { "validate": true, "mode": "Strict" }, "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 } }, "additionalProperties": false }, "fare_details": { "key": "fare_details", "type": "object", "arrival_format": "object", "data_type": "object", "isRequired": false, "resolved": true, "properties": { "fare_amount": { "key": "fare_amount", "type": "number", "arrival_format": "number", "data_type": "number", "isRequired": false, "resolved": true, "isModified": true, "oneof": { "0": { "type": "integer" }, "1": { "type": "number" } } }, "extra": { "key": "extra", "type": "integer", "arrival_format": "number", "data_type": "integer", "isRequired": false, "resolved": true, "isModified": true, "oneof": { "0": { "type": "number" }, "1": { "type": "integer" } } }, "mta_tax": { "key": "mta_tax", "type": "number", "arrival_format": "number", "data_type": "number", "isRequired": false, "resolved": true }, "tip_amount": { "key": "tip_amount", "type": "integer", "arrival_format": "number", "data_type": "integer", "isRequired": false, "resolved": true, "isModified": true, "oneof": { "0": { "type": "number" }, "1": { "type": "integer" } } }, "tolls_amount": { "key": "tolls_amount", "type": "number", "arrival_format": "number", "data_type": "number", "isRequired": false, "resolved": true, "isModified": true, "oneof": { "0": { "type": "integer" }, "1": { "type": "number" } } }, "improvement_surcharge": { "key": "improvement_surcharge", "type": "number", "arrival_format": "number", "data_type": "number", "isRequired": false, "resolved": true }, "total_amount": { "key": "total_amount", "type": "integer", "arrival_format": "number", "data_type": "integer", "isRequired": false, "resolved": true, "isModified": true, "oneof": { "0": { "type": "number" }, "1": { "type": "integer" } } }, "congestion_surcharge": { "key": "congestion_surcharge", "type": "integer", "arrival_format": "number", "data_type": "integer", "isRequired": false, "resolved": true } }, "additionalProperties": false } }, "additionalProperties": false }, "denorm_config": { "redis_db_host": "localhost", "redis_db_port": 6379, "denorm_fields": [] }, "router_config": { "topic": "mydataset" }, "dataset_config": { "file_upload_path": [ "container/api-service/user_uploads/chunk-1 (4) (1)_5ec855.json" ], "indexing_config": { "olap_store_enabled": true, "lakehouse_enabled": true, "cache_enabled": false }, "keys_config": { "data_key": "", "partition_key": "", "timestamp_key": "obsrv_meta.syncts" }, "cache_config": { "redis_db_host": "localhost", "redis_db_port": 6379, "redis_db": 0 } }, "transformations_config": [], "connectors_config": [], "tags": [], "status": "ReadyToPublish", "version": 1, "created_by": "SYSTEM", "updated_by": "SYSTEM", "version_key": "1731420131072", "api_version": "v2", "sample_data": { "mergedEvent": { "tripID": "4c77e9d5-538d-4eb7-8db1-4c2c32860aa8", "VendorID": "2", "tpep_pickup_datetime": "2023-11-02 00:18:42", "tpep_dropoff_datetime": "2023-11-02 00:24:38", "passenger_count": "1", "trip_distance": "1.60", "RatecodeID": "1", "store_and_fwd_flag": "N", "PULocationID": "236", "DOLocationID": "239", "payment_type": "2", "primary_passenger": { "email": "Willa67@gmail.com", "mobile": "1-720-981-6399 x77055" }, "fare_details": { "fare_amount": 7, "extra": 0.5, "mta_tax": 0.5, "tip_amount": 0, "tolls_amount": 0, "improvement_surcharge": 0.3, "total_amount": 8.3, "congestion_surcharge": 0 } } }, "entry_topic": "local.ingest", "created_date": "2024-11-11T21:31:21.390Z", "updated_date": "2024-11-12T08:32:27.931Z" }}Headers
Section titled “Headers ” 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=5Bad 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" }}Headers
Section titled “Headers ” 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=5Not 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" }}Headers
Section titled “Headers ” 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