Skip to content

Commit

Permalink
Merge pull request #3 from yougov-datascience/main
Browse files Browse the repository at this point in the history
Numbering output files instead of random string naming
  • Loading branch information
1beb committed Nov 19, 2021
2 parents 80ca1cc + d5290d8 commit 2a4b83d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions R/ark.R
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,8 @@ windowing_parallel <- function(sql_supports_windows)
con = con,
sql_supports_windows = sql_supports_windows,
filter_statement = filter_statement,
callback = callback
callback = callback,
filename = x
)
DBI::dbDisconnect(a_db_con)
}
Expand All @@ -334,7 +335,8 @@ ark_chunk <- function(db_con,
con,
sql_supports_windows,
filter_statement,
callback){
callback,
filename = NULL) {

if (sql_supports_windows) {
## Windowed queries are faster but not universally supported
Expand Down Expand Up @@ -372,7 +374,7 @@ ark_chunk <- function(db_con,

omit_header <- start != 1

streamable_table$write(data, con, omit_header = omit_header)
streamable_table$write(data, con, omit_header = omit_header, filename = filename)
}

## need to convert large integers to characters
Expand Down

0 comments on commit 2a4b83d

Please sign in to comment.