-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add scripts to configure R & Python duckdb
- Loading branch information
Showing
4 changed files
with
24 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
con <- DBI::dbConnect(duckdb::duckdb()) | ||
DBI::dbExecute(con, 'LOAD httpfs') | ||
DBI::dbExecute(con, glue::glue('SET s3_endpoint=\"{Sys.getenv("AWS_S3_ENDPOINT")}\"')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import os | ||
|
||
import duckdb | ||
|
||
duckdb.sql("LOAD httpfs") | ||
duckdb.sql(f"SET s3_endpoint=\"{os.getenv('AWS_S3_ENDPOINT')}\"") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
library(glue) | ||
library(duckdb) | ||
con <- DBI::dbConnect(duckdb::duckdb()) | ||
|
||
con <- dbConnect(duckdb()) | ||
|
||
dbExecute(con, glue('SET extension_directory=\"{Sys.getenv("HOME")}\"')) | ||
dbExecute(con, 'INSTALL httpfs') | ||
dbExecute(con, 'INSTALL aws') | ||
DBI::dbExecute(con, glue::glue('SET extension_directory=\"{Sys.getenv("HOME")}\"')) | ||
DBI::dbExecute(con, 'INSTALL httpfs') | ||
DBI::dbExecute(con, 'INSTALL aws') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters