Data Source use cases
Write to a local file
Last modified on June 13, 2026
Related topics
Set custom preferences for RStudio WorkspacesThe python-domino libraryWork with local dataTrack external dataDocumentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
redshift = DataSourceClient().get_datasource("redshift-test")
res = redshift.query("SELECT * FROM wines LIMIT 1000")
# to_parquet() accepts a path or file-like object
# the whole result is loaded and written once
res.to_parquet("./wines_1000.parquet")
client <- DominoDataR::datasource_client()
table <- DominoDataR::query(client, "redshift-test", "SELECT* FROM wines LIMIT 1000")
# We can use https://arrow.apache.org/docs/r/reference/write_parquet.html since we leverage the arrow library
arrow::write_parquet(table, "./wines_1000.parquet")
redshift = DataSourceClient().get_datasource("redshift-test")
res = redshift.query("SELECT * FROM wines LIMIT 1000")
# See Pandas.to_csv documentation for all options
csv_options = {header: True, quotechar: "'"}
res.to_pandas().to_csv("./wines_1000.csv", **csv_options)
client <- DominoDataR::datasource_client()
table <- DominoDataR::query(client, "redshift-test", "SELECT* FROM wines LIMIT 1000")
# We can use https://arrow.apache.org/docs/r/reference/write_csv_arrow.html since we leverage the arrow library
arrow::write_csv_arrow(table, "./wines_1000.csv")
Related topics
Set custom preferences for RStudio WorkspacesThe python-domino libraryWork with local dataTrack external dataWas this page helpful?