Description Usage Arguments Value Examples
View source: R/presto_utilities.R
Returns a db connection for sending DBI queries to an EMR Presto DB instance
1 | emr_presto_get_db_connection(instance_dns)
|
instance_dns |
the DB connection object to use with the standard DBI API
1 2 3 4 5 6 | cluster_id <- emr_presto_launch_instance("Test Cluster", instance_type = "c5.4xlarge", instance_count = 4)
instance_dns <- emr_presto_get_instance_dns_name(cluster_id)
con <- emr_presto_get_db_connection(instance_dns)
res <- dbSendQuery(con, 'SELECT 1')
all_rows <- dbFetch(res, -1)
emr_presto_stop_instance(cluster_id)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.