updateTable method
- required String databaseName,
- required TableInput tableInput,
- String? catalogId,
- bool? skipArchive,
Updates a metadata table in the Data Catalog.
May throw EntityNotFoundException. May throw InvalidInputException. May throw InternalServiceException. May throw OperationTimeoutException. May throw ConcurrentModificationException. May throw ResourceNumberLimitExceededException. May throw GlueEncryptionException.
Parameter databaseName
:
The name of the catalog database in which the table resides. For Hive
compatibility, this name is entirely lowercase.
Parameter tableInput
:
An updated TableInput
object to define the metadata table in
the catalog.
Parameter catalogId
:
The ID of the Data Catalog where the table resides. If none is provided,
the AWS account ID is used by default.
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.
Implementation
Future<void> updateTable({
required String databaseName,
required TableInput tableInput,
String? catalogId,
bool? skipArchive,
}) async {
ArgumentError.checkNotNull(databaseName, 'databaseName');
_s.validateStringLength(
'databaseName',
databaseName,
1,
255,
isRequired: true,
);
ArgumentError.checkNotNull(tableInput, 'tableInput');
_s.validateStringLength(
'catalogId',
catalogId,
1,
255,
);
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,
'TableInput': tableInput,
if (catalogId != null) 'CatalogId': catalogId,
if (skipArchive != null) 'SkipArchive': skipArchive,
},
);
}