startMaterializedViewRefreshTaskRun method

Future<StartMaterializedViewRefreshTaskRunResponse> startMaterializedViewRefreshTaskRun({
  1. required String catalogId,
  2. required String databaseName,
  3. required String tableName,
  4. bool? fullRefresh,
})

Starts a materialized view refresh task run, for a specified table and columns.

May throw AccessDeniedException. May throw EntityNotFoundException. May throw InvalidInputException. May throw MaterializedViewRefreshTaskRunningException. May throw OperationTimeoutException. May throw ResourceNumberLimitExceededException.

Parameter catalogId : The ID of the Data Catalog where the table reside. If none is supplied, the account ID is used by default.

Parameter databaseName : The name of the database where the table resides.

Parameter tableName : The name of the table to generate run the materialized view refresh task.

Parameter fullRefresh : Specifies whether this is a full refresh of the task run.

Implementation

Future<StartMaterializedViewRefreshTaskRunResponse>
    startMaterializedViewRefreshTaskRun({
  required String catalogId,
  required String databaseName,
  required String tableName,
  bool? fullRefresh,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSGlue.StartMaterializedViewRefreshTaskRun'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'CatalogId': catalogId,
      'DatabaseName': databaseName,
      'TableName': tableName,
      if (fullRefresh != null) 'FullRefresh': fullRefresh,
    },
  );

  return StartMaterializedViewRefreshTaskRunResponse.fromJson(
      jsonResponse.body);
}