Comments (2)
PR #172 seems to fix issue. @ramnathv can you double check branch cache_issue
fixes your initial issue.
remotes::install_github("dyfanjones/noctua", ref="cache_issue")
Working example:
library(DBI)
library(dplyr)
#>
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
#> The following objects are masked from 'package:base':
#>
#> intersect, setdiff, setequal, union
noctua::noctua_options(cache_size = 10)
con = dbConnect(noctua::athena())
df = dbGetQuery(con, "select * from iris")
#> Info: (Data scanned: 3.63 KB)
df = dbGetQuery(con, SQL("select * from iris"))
#> Info: (Data scanned: 3.63 KB)
# Check cache
noctua:::athena_option_env$cache_dt
#> QueryId Query State
#> 1: 181b8974-2288-4ea0-b7fb-d146daea61b8 select * from iris SUCCEEDED
#> StatementType WorkGroup UnloadDir
#> 1: DML primary
tbl_iris = tbl(con, "iris")
# Check cache
noctua:::athena_option_env$cache_dt
#> QueryId Query State
#> 1: 181b8974-2288-4ea0-b7fb-d146daea61b8 select * from iris SUCCEEDED
#> StatementType WorkGroup UnloadDir
#> 1: DML primary
tbl_iris
#> Info: (Data scanned: 3.63 KB)
#> # Source: table<iris> [?? x 5]
#> # Database: Athena 0.1.12 [default@eu-west-1/default]
#> sepal_length sepal_width petal_length petal_width species
#> <dbl> <dbl> <dbl> <dbl> <chr>
#> 1 5.1 3.5 1.4 0.2 setosa
#> 2 4.9 3 1.4 0.2 setosa
#> 3 4.7 3.2 1.3 0.2 setosa
#> 4 4.6 3.1 1.5 0.2 setosa
#> 5 5 3.6 1.4 0.2 setosa
#> 6 5.4 3.9 1.7 0.4 setosa
#> 7 4.6 3.4 1.4 0.3 setosa
#> 8 5 3.4 1.5 0.2 setosa
#> 9 4.4 2.9 1.4 0.2 setosa
#> 10 4.9 3.1 1.5 0.1 setosa
#> # … with more rows
# Check cache
noctua:::athena_option_env$cache_dt
#> QueryId Query
#> 1: 43970523-da56-4e59-8d7b-625e8bc7a8af SELECT *\nFROM "iris"\nLIMIT 11
#> 2: 181b8974-2288-4ea0-b7fb-d146daea61b8 select * from iris
#> State StatementType WorkGroup UnloadDir
#> 1: SUCCEEDED DML primary
#> 2: SUCCEEDED DML primary
Created on 2021-11-15 by the reprex package (v2.0.1)
Looks like repeat queries are being used multiple times, which is great news :D
from noctua.
This has now been pushed to the cran in release 2.4.0
from noctua.
Related Issues (20)
- 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
- [Question]: Requesting guidance and best practices - Athena shinyApp with noctua HOT 2
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.