Lower level API access, allows user to create and delete Athena Work Groups.
Creates a workgroup with the specified name (link).
The work group utilises parameters from the dbConnect
object, to determine the encryption and output location of the work group.
The s3_staging_dir, encryption_option and kms_key parameters are gotten from dbConnect
Helper function to create tag options for function create_work_group()
Deletes the workgroup with the specified name (link). The primary workgroup cannot be deleted.
Lists available workgroups for the account (link).
Returns information about the workgroup with the specified name (link).
Updates the workgroup with the specified name (link).
The workgroup's name cannot be changed. The work group utilises parameters from the dbConnect
object, to determine the encryption and output location of the work group.
The s3_staging_dir, encryption_option and kms_key parameters are gotten from dbConnect
create_work_group(
conn,
work_group = NULL,
enforce_work_group_config = FALSE,
publish_cloud_watch_metrics = FALSE,
bytes_scanned_cut_off = 10000000L,
requester_pays = FALSE,
description = NULL,
tags = tag_options(key = NULL, value = NULL)
)
tag_options(key = NULL, value = NULL)
delete_work_group(conn, work_group = NULL, recursive_delete_option = FALSE)
list_work_groups(conn)
get_work_group(conn, work_group = NULL)
update_work_group(
conn,
work_group = NULL,
remove_output_location = FALSE,
enforce_work_group_config = FALSE,
publish_cloud_watch_metrics = FALSE,
bytes_scanned_cut_off = 10000000L,
requester_pays = FALSE,
description = NULL,
state = c("ENABLED", "DISABLED")
)
A dbConnect
object, as returned by dbConnect()
The Athena workgroup name.
If set to TRUE
, the settings for the workgroup override client-side settings.
If set to FALSE
, client-side settings are used. For more information, see
Workgroup Settings Override Client-Side Settings.
Indicates that the Amazon CloudWatch metrics are enabled for the workgroup.
The upper data usage limit (cutoff) for the amount of bytes a single query in a workgroup is allowed to scan.
If set to TRUE
, allows members assigned to a workgroup to reference Amazon S3 Requester Pays buckets in queries.
If set to FALSE
, workgroup members cannot query data from Requester Pays buckets, and queries that retrieve data
from Requester Pays buckets cause an error. The default is false. For more information about Requester Pays buckets,
see Requester Pays Buckets in the Amazon Simple Storage Service Developer Guide.
The workgroup description.
A tag that you can add to a resource. A tag is a label that you assign to an AWS Athena resource (a workgroup).
Each tag consists of a key and an optional value, both of which you define. Tags enable you to categorize workgroups in Athena, for example,
by purpose, owner, or environment. Use a consistent set of tag keys to make it easier to search and filter workgroups in your account.
The maximum tag key length is 128 Unicode characters in UTF-8. The maximum tag value length is 256 Unicode characters in UTF-8.
You can use letters and numbers representable in UTF-8, and the following characters: "+ - = . _ : / @"
. Tag keys and values are case-sensitive.
Tag keys must be unique per resource. Please use the helper function tag_options()
to create tags for work group, if no tags are required please put NULL
for this parameter.
A tag key. The tag key length is from 1 to 128 Unicode characters in UTF-8. You can use letters and numbers representable in UTF-8, and the following characters: "+ - = . _ : / @"
.
Tag keys are case-sensitive and must be unique per resource.
A tag value. The tag value length is from 0 to 256 Unicode characters in UTF-8. You can use letters and numbers representable in UTF-8, and the following characters: "+ - = . _ : / @"
.
Tag values are case-sensitive.
The option to delete the workgroup and its contents even if the workgroup contains any named queries
If set to TRUE
, indicates that the previously-specified query results location (also known as a client-side setting) for queries in this workgroup should be ignored and set to null.
If set to FALSE
the out put location in the workgroup's result configuration will be updated with the new value.
For more information, see Workgroup Settings Override Client-Side Settings.
The workgroup state that will be updated for the given workgroup.
Returns NULL
but invisible
Returns list
but invisible
Returns NULL
but invisible
Returns list of available work groups
Returns list of work group meta data
Returns NULL
but invisible
if (FALSE) {
# Note:
# - Require AWS Account to run below example.
# - Different connection methods can be used please see `RAthena::dbConnect` documnentation
library(RAthena)
# Demo connection to Athena using profile name
con <- dbConnect(RAthena::athena())
# List current work group available
list_work_groups(con)
# Create a new work group
wg <- create_work_group(con,
"demo_work_group",
description = "This is a demo work group",
tags = tag_options(key= "demo_work_group", value = "demo_01"))
# List work groups to see new work group
list_work_groups(con)
# get meta data from work group
wg <- get_work_group(con, "demo_work_group")
# Update work group
wg <- update_work_group(con, "demo_work_group",
description = "This is a demo work group update")
# get updated meta data from work group
wg <- get_work_group(con, "demo_work_group")
# Delete work group
delete_work_group(con, "demo_work_group")
# Disconect from Athena
dbDisconnect(con)
}