create_named_query
¶
create_named_query(
name: NameString,
database: DatabaseString,
query_string: QueryString,
*,
config_overrides: Optional[AthenaClientConfig] = None,
description: Optional[DescriptionString] = None,
client_request_token: Optional[IdempotencyToken] = None,
work_group: Optional[WorkGroupName] = None,
) -> CreateNamedQueryOutput
Creates a named query in the specified workgroup. Requires that you have access to the workgroup.
Parameters:
-
name(NameString) –The query name.
-
description(Optional[DescriptionString], default:None) –The query description.
-
database(DatabaseString) –The database to which the query belongs.
-
query_string(QueryString) –The contents of the query with all query statements.
-
client_request_token(Optional[IdempotencyToken], default:None) –A unique case-sensitive string used to ensure the request to create the query is idempotent (executes only once). If another
CreateNamedQueryrequest is received, the same response is returned and another query is not created. If a parameter has changed, for example, theQueryString, an error is returned.This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services SDK for Java) auto-generate the token for users. If you are not using the Amazon Web Services SDK or the Amazon Web Services CLI, you must provide this token or the action will fail.
-
work_group(Optional[WorkGroupName], default:None) –The name of the workgroup in which the named query is being created.
Raises:
-
InternalServerException–Indicates a platform issue, which may be due to a transient condition or outage.
-
InvalidRequestException–Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.
-
UnknownServiceError–The service returned an error code this client does not model.