work_group | R Documentation |
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") )
conn |
A |
work_group |
The Athena workgroup name. |
enforce_work_group_config |
If set to |
publish_cloud_watch_metrics |
Indicates that the Amazon CloudWatch metrics are enabled for the workgroup. |
bytes_scanned_cut_off |
The upper data usage limit (cutoff) for the amount of bytes a single query in a workgroup is allowed to scan. |
requester_pays |
If set to |
description |
The workgroup description. |
tags |
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: |
key |
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: |
value |
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: |
recursive_delete_option |
The option to delete the workgroup and its contents even if the workgroup contains any named queries |
remove_output_location |
If set to |
state |
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
## Not run: # 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) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.