updateTable method
Updates a metadata table in the Data Catalog.
May throw AlreadyExistsException.
May throw ConcurrentModificationException.
May throw EntityNotFoundException.
May throw FederationSourceException.
May throw FederationSourceRetryableException.
May throw GlueEncryptionException.
May throw InternalServiceException.
May throw InvalidInputException.
May throw OperationTimeoutException.
May throw ResourceNotReadyException.
May throw ResourceNumberLimitExceededException.
Parameter databaseName :
The name of the catalog database in which the table resides. For Hive
compatibility, this name is entirely lowercase.
Parameter catalogId :
The ID of the Data Catalog where the table resides. If none is provided,
the Amazon Web Services account ID is used by default.
Parameter force :
A flag that can be set to true to ignore matching storage descriptor and
subobject matching requirements.
Parameter name :
The unique identifier for the table within the specified database that
will be created in the Glue Data Catalog.
Parameter skipArchive :
By default, UpdateTable always creates an archived version of
the table before updating it. However, if skipArchive is set
to true, UpdateTable does not create the archived version.
Parameter tableInput :
An updated TableInput object to define the metadata table in
the catalog.
Parameter transactionId :
The transaction ID at which to update the table contents.
Parameter updateOpenTableFormatInput :
Input parameters for updating open table format tables in GlueData
Catalog, serving as a wrapper for format-specific update operations such
as Apache Iceberg.
Parameter versionId :
The version ID at which to update the table contents.
Parameter viewUpdateAction :
The operation to be performed when updating the view.
Implementation
Future<void> updateTable({
required String databaseName,
String? catalogId,
bool? force,
String? name,
bool? skipArchive,
TableInput? tableInput,
String? transactionId,
UpdateOpenTableFormatInput? updateOpenTableFormatInput,
String? versionId,
ViewUpdateAction? viewUpdateAction,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSGlue.UpdateTable'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'DatabaseName': databaseName,
if (catalogId != null) 'CatalogId': catalogId,
if (force != null) 'Force': force,
if (name != null) 'Name': name,
if (skipArchive != null) 'SkipArchive': skipArchive,
if (tableInput != null) 'TableInput': tableInput,
if (transactionId != null) 'TransactionId': transactionId,
if (updateOpenTableFormatInput != null)
'UpdateOpenTableFormatInput': updateOpenTableFormatInput,
if (versionId != null) 'VersionId': versionId,
if (viewUpdateAction != null)
'ViewUpdateAction': viewUpdateAction.value,
},
);
}