Skip to content

Latest commit

 

History

History
53 lines (36 loc) · 1.54 KB

File metadata and controls

53 lines (36 loc) · 1.54 KB

Connecting R and SQLite with ADBC

Instructions

Prerequisites

  1. Install R

  2. Install dbc

  3. Install SQLite

    • On macOS, if you have Homebrew installed, run brew install sqlite
  4. Install R packages adbcdrivermanager, arrow, and tibble:

    install.packages(c("adbcdrivermanager", "arrow", "tibble"))

Connect to SQLite

  1. Install the SQLite ADBC driver:

    dbc install sqlite
  2. Customize the R script main.R as needed

    • Change the connection arguments in adbc_database_init()
      • Set uri to the location of the SQLite database file you want to query, or keep it set to games.sqlite to use the database file included with this example
    • If you changed the database file, also change the SQL SELECT statement in read_adbc()
  3. Run the R script:

    Rscript main.R