Asynchronous states and operations
When you run a glue:CreateTable
request, the asynchronous creation of the
Data Catalog view begins. In the following sections, this document describes the
Status
of a Amazon Glue view that is available in a
glue:GetTable
response. For brevity, this section omits the full
response.
{ "Table": { ... "Status": { ... "Action": "CREATE", "State": "QUEUED", } } }
Both of the above attributes represent important diagnostic information which indicates the state of the asynchronous operation, as well as the actions that can be performed on this view. Below are the possible values that these attributes can take on.
Status.Action
CREATE
UPDATE
Status.State
QUEUED
IN_PROGRESS
SUCCESS
FAILED
It is also important to note that some updates on a Data Catalog view don't require an
asynchronous operation. For example, one may wish to update the
Description
attribute of the table. Since this does not require any
asynchronous operations, the resulting table metadata will not have any
Status
, and the attribute will be NULL
.
{ "Table": { ..., "Description": "I changed this attribute!" } }
Next, this topic explores how the above status information can impact operations that can be performed on an Amazon Glue view.
glue:CreateTable
There are no changes for this API when compared to how glue:CreateTable
functions for any Glue table. CreateTable
may be called for any table name that does not already exist.
glue:UpdateTable
This operation cannot be performed on an Amazon Glue view which has the following status information:
Action == CREATE and State == QUEUED
Action == CREATE and State == IN_PROGRESS
Action == CREATE and state == FAILED
Action == UPDATE and state == QUEUED
Action == UPDATE and state == IN_PROGRESS
To summarize, you can update a Data Catalog view only when it meets the following requirements.
It has been successfully created for the first time.
Action == CREATE and State == SUCCESS
It has reached a terminal state after an asynchronous update operation.
Action == UPDATE and State == SUCCESS
Action == UPDATE and State == FAILED
It has a
NULL
state attribute as a result of a synchronous update.
glue:DeleteTable
There are no changes for this operation when compared to how glue:DeleteTable
functions for any Amazon Glue table. You can delete a Data Catalog view regardless of its
state.
glue:GetTable
There are no changes for this operation when compared to how glue:GetTable
functions for any Amazon Glue table. However, you can't query a Data Catalog view from the
analytical engines until it has been successfully created for the first time.
Action == CREATE and State == SUCCESS
. After you create a
Data Catalog view successfully for the first time, you can query the view regardless of its
status.
Note
All of the information in this section applies to all table read APIs such as
GetTable
, GetTables
, and
SearchTables
.