Comments (2)
Sorry for the delay on this. I have was fixing a cran issue for paws.common. Here are the accepted parameters for dbConnect when working with noctua
: https://dyfanjones.github.io/noctua/reference/dbConnect-AthenaDriver-method.html
noctua
should be able to do something fairly similar to odbc:
con <- DBI::dbConnect(
noctua::athena(),
s3_staging_dir = "[your S3 bucket]",
region_name = "[your AWS region bucket]",
schema_name = "[your schema's name]",
aws_access_key_id = rstudioapi::askForPassword("AWS Access Key"),
aws_secret_access_key = rstudioapi::askForPassword("AWS Secret Key")
)
You can also turn off rstudio's connection tab, as this slows down the connection.
con <- DBI::dbConnect(
noctua::athena(),
s3_staging_dir = "[your S3 bucket]",
region_name = "[your AWS region bucket]",
schema_name = "[your schema's name]",
aws_access_key_id = rstudioapi::askForPassword("AWS Access Key"),
aws_secret_access_key = rstudioapi::askForPassword("AWS Secret Key"),
rstudio_conn_tab = FALSE
)
If you have any common characteristic between your user base you can set them as environmental variables or in the .aws/config
file for example. I.e. they are all using the same AWS Account and thus using the same AWS Region.
region_name
would usually stay static (environmental variable: AWS_REGION)
s3_staging_dir
would usually stay static (environmental variable: AWS_ATHENA_S3_STAGING_DIR)
con <- DBI::dbConnect(
noctua::athena(),
schema_name = "[your schema's name]",
aws_access_key_id = rstudioapi::askForPassword("AWS Access Key"),
aws_secret_access_key = rstudioapi::askForPassword("AWS Secret Key"),
rstudio_conn_tab = FALSE
)
Another alternative is if you know the Athena work group you are using you could set your s3_staging_dir there and noctua
would use that instead.
con <- DBI::dbConnect(
noctua::athena(),
schema_name = "[your schema's name]",
work_group = "[your work group]",
aws_access_key_id = rstudioapi::askForPassword("AWS Access Key"),
aws_secret_access_key = rstudioapi::askForPassword("AWS Secret Key"),
rstudio_conn_tab = FALSE
)
I hope this helps.
from noctua.
Thanks @DyfanJones for all the great tips.
Some follow-up questions:
- Do I need to install noctua and its dependencies on the shiny server?
- Do I need any Posit Professional Drivers etc - as mentioned here- https://solutions.posit.co/connections/db/best-practices/drivers/
- Do you have some kind of vignette or a tutorial
Thanks
from noctua.
Related Issues (20)
- Caching issue HOT 2
- Method to set unload at a package level HOT 1
- Release noctua 2.4.0 on to cran
- Prevent Noctua from printing Data Scanned -information HOT 7
- Release noctua 2.5.0 HOT 3
- Release noctua 2.6.0 HOT 1
- Sub-query fails with dplyr interface indicating "Only one sql statement is allowed" HOT 6
- cran-2.6.1 release
- Can I set various parameters in `.aws/config` file and have `DBI::dbConnect()` read those directly from that file? HOT 5
- Add catalog support HOT 26
- Column Bucketing
- Allow for Partition columns to change data types
- Can't write/append an empty data frame
- Connecting using long-term-creds returns Error 400 HOT 5
- dbFetch(..., n=small number) is quite slow when run on a large result set HOT 4
- `dbExistsTable()` doesn't work anymore HOT 3
- fix: for dbplyr 2.3.3.9000 +
- dbExistsTable() returns an incorrect result when the table name is defined by Id() or SQL() HOT 1
- InvalidRequestException with dbGetQuery HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from noctua.