if (FALSE) {
# These examples require an existing eyeris database
con <- eyeris_db_connect("/path/to/bids", "my-project")
# Process large query and write to CSV
process_chunked_query(
con,
"SELECT * FROM large_table WHERE condition = 'something'",
chunk_size = 50000,
output_file = "large_export.csv"
)
# Process large query with custom chunk processing
process_chunked_query(
con,
"SELECT * FROM large_table",
chunk_size = 25000,
process_chunk = function(chunk) {
# Custom processing here
processed_data <- some_analysis(chunk)
return(TRUE)
}
)
eyeris_db_disconnect(con)
}
Run the code above in your browser using DataLab