client = boto3.client('redshift-data')
# this seems asynchronous
response = client.execute_statement(
ClusterIdentifier='xyz',
Database='dev',
DbUser='user1',
Sql='select * from table1;',
StatementName='test1',
WithEvent=False
)
describe = client.describe_statement(Id=response['Id'])
print(describe['Status']) # PICKED, SUBMITTED
After executing a sql, it takes some time to get the final response.
Especially when sql = vacuum table1;
Without any waiting mechanism, the status returned is PICKED
or SUBMITTED
.
Are there any redshift waiters like these , or do I need to manually wait until the status changes to FAILED
or SUCCESS