refresh_materialized_dataset¶
- DatasetsApi.refresh_materialized_dataset(id, role_id, content_type=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Refresh a materialized dataset view
Triggers an asynchronous refresh of a materialized DWH view dataset. Sets RefreshStatus to refresh_in_progress and invokes the create/update view Lambda asynchronously. Caller must have editor or owner access on the dataset (via role_id). Dataset must be DatasetType=view, ViewType=materialized, and IsActive=yes. No request body. Not idempotent while a refresh is already in progress (DWH-1018).
- Parameters:
id (str) – Dataset ID of the materialized view to refresh. Must exist (else IPV-1002). (required)
role_id (str) – Amorphic role ID the request is authorized against. Must be a role the user belongs to with editor/owner permission on the view. (required)
content_type (str) – Optional Content-Type header.
_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:
- Returns:
Returns the result object.
Request and Response Examples¶
HTTP: PUT /datasets/{id}/refresh-view
Parameter examples¶
Name |
In |
Example |
|---|---|---|
|
path |
|
Success (HTTP 200)¶
Refresh triggered. Message is “Dataset refresh is in progress.” RefreshStatus is set to refresh_in_progress until completion.
Request / response example
{
"Message": "Dataset refresh is in progress."
}
Errors¶
Documented error codes: IPV-1002, DWH-1021, DWH-1020, DWH-1018, DWH-1019, RTE-1001.
HTTP 400
Validation or authorization failure. Body is {“Message”: “<CODE> - <text>”}. Common codes: IPV-1002 (invalid DatasetId), DWH-1021 (not a materialized view), DWH-1020 (inactive view), DWH-1018 (refresh or delete already in progress).
DatasetId not found
{
"Message": "IPV-1002 - Invalid parameter DatasetId with value b1e6c2a0-9f4d-4c7a-8f2e-1a2b3c4d5e6f"
}
Not a materialized view
{
"Message": "DWH-1021 - Only materialized views can be refreshed!"
}
View inactive in DWH
{
"Message": "DWH-1020 - An active view does not exist in the data ware house"
}
Refresh already running
{
"Message": "DWH-1018 - Cannot refresh a view with RefreshStatus - refresh_in_progress"
}
HTTP 500
Backend/generic failure. Body is {“Message”: “<CODE> - <text>”} (e.g. DWH-1019 DynamoDB update failure, RTE-1001).
Request / response example
{
"Message": "RTE-1001 - An error occurred."
}