get_dataset

DatasetsApi.get_dataset(id, role_id, projection_expression=None, request=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)

Get dataset details

Returns full metadata for a single dataset. The caller must have at least read-only access on the dataset (via direct sharing, tag-based access, or domain-level access); otherwise AUTH-1011 is returned. The response shape varies based on dataset attributes: By DatasetType: - internal / external: Returns operational fields (ConnectionDetails, DatasetS3Path, Schedules, MalwareDetectionOptions, etc.) - view: Returns ViewVersions, SqlStatement, CurrentVersion, AssumeRole. Materialized views may include RefreshStatus and LastRefreshCompletionTime. By TargetLocation: - redshift: Adds ConnectionDetails (host, port, JDBC/ODBC strings), parses DatasetKeyOptions and ColumnTableConstraints from stored strings to objects, marks primary key columns with is_not_null in DatasetSchema. - lf (Lake Formation): Adds DataPermissions array. Filters DatasetSchema to only columns the caller can see (via Athena metadata or TBAC rules). For read-only users, DataProfile is redacted. - s3: Adds AreAIServicesEnabled, IsTranslateAIResultsEnabled, IsBDAExtractionEnabled. - dynamodb: Compares DatasetSchema columns against the Glue catalog and auto-repairs Glue if columns are missing. Special query modes: - request=get_eda_profiling_status: Returns only DatasetId, EdaStatus, EdaMessage, EdaStaleness, EdaStalenessMessage (bypasses full enrichment). - request=get_conversion_params: Returns the data_conversion_parameters.json file content. Only valid for Redshift datasets; returns GE-1034 for other targets. Projection: When projectionExpression is provided, only the specified comma-separated field names are included in the response.

Parameters:
  • id (str) – Dataset UUID. (required)

  • role_id (str) – Amorphic role ID of the calling user. (required)

  • projection_expression (str) – Comma-separated list of field names to include in the response. When omitted, all fields are returned. Use this to reduce payload size when you only need specific fields. Example: GET /datasets/{id}?projectionExpression=DatasetId,DatasetName,Domain,TargetLocation,DatasetStatus This returns only those 5 fields instead of the full dataset object.

  • request (str) – Special return mode. When set, the response shape changes completely: - get_eda_profiling_status: Returns only EDA profiling fields (DatasetId, EdaStatus, EdaMessage, EdaStaleness, EdaStalenessMessage). Use this to poll profiling progress without fetching full dataset details. Example: GET /datasets/{id}?request=get_eda_profiling_status - get_conversion_params: Returns Redshift data conversion parameters JSON. Only valid for Redshift-target datasets; returns GE-1034 for other targets. Example: GET /datasets/{id}?request=get_conversion_params

  • _request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

  • _content_type (str, Optional) – force content-type for the request.

  • _headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.

  • _host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.

Return type:

RegisteredDataset

Returns:

Returns the result object.

Request and Response Examples

HTTP: GET /datasets/{id}

Success (HTTP 200)

Dataset details. Response shape depends on query parameters: - No `request` param: Full RegisteredDataset object (or projected subset). - `request=get_eda_profiling_status`: Object with DatasetId, EdaStatus, EdaMessage, EdaStaleness, EdaStalenessMessage. - `request=get_conversion_params`: Object with DataConversionParameters.

Internal S3 dataset (detail response)

{
  "DatasetId": "49e02003-289e-41e9-a9f2-28a733349481",
  "DatasetName": "monthly_orders",
  "DisplayName": "Monthly Orders",
  "DatasetDescription": "Monthly sales orders data",
  "Domain": "sales",
  "DatasetType": "internal",
  "TargetLocation": "s3",
  "FileType": "csv",
  "RegistrationStatus": "completed",
  "IsActive": "yes",
  "AccessType": "owner",
  "IsOwner": true,
  "DatasourceType": "api",
  "DatasourceId": "ds-001",
  "DatasourceName": "amorphic",
  "DatasetStatus": "active",
  "DatasetS3Path": "s3://dlz-bucket/sales/monthly_orders/",
  "MalwareDetectionOptions": {
    "ScanForMalware": false,
    "AllowUnscannableFiles": true
  },
  "DataMetricsCollectionOptions": {
    "IsMetricsCollectionEnabled": false
  },
  "AreAIServicesEnabled": true,
  "IsTranslateAIResultsEnabled": true,
  "IsBDAExtractionEnabled": false,
  "DataStewards": [],
  "Schedules": [],
  "DatasetSchema": [
    {
      "name": "order_id",
      "type": "string"
    },
    {
      "name": "amount",
      "type": "decimal"
    }
  ],
  "Keywords": [
    "sales",
    "orders"
  ]
}

EDA profiling status (request=get_eda_profiling_status)

{
  "DatasetId": "49e02003-289e-41e9-a9f2-28a733349481",
  "EdaStatus": "COMPLETED",
  "EdaMessage": "EDA profiling completed successfully",
  "EdaStaleness": "STALE",
  "EdaStalenessMessage": "Data has changed since last profiling"
}

Errors

Documented error codes: IPV-1002, AUTH-1011, DS-1002, GE-1034.

HTTP 400

Invalid input or access denied

Dataset does not exist

{
  "Message": "IPV-1002 - Invalid DatasetId - 49e02003-289e-41e9-a9f2-28a733349481, resource not found."
}

User lacks access to the dataset

{
  "Message": "AUTH-1011 - User is not authorized to view resource details"
}

Dataset is inactive (non-view only)

{
  "Message": "DS-1002 - Dataset 49e02003-289e-41e9-a9f2-28a733349481 is inactive."
}

get_conversion_params on non-Redshift dataset

{
  "Message": "GE-1034 - Target location of dataset is s3. Only redshift supports data conversion parameters."
}

HTTP 500

Unexpected internal error