Michael Toth 7/9/2015

How to write an R Data Frame to an SQL Table

Read Original

This technical article explains a method for writing an R data frame directly to a temporary SQL table using the `dbWriteTable` function. It demonstrates how to efficiently query a database for a subset of data (e.g., stock prices for specific tickers) by creating a temp table from an R data frame and performing a JOIN, avoiding inefficient bulk data retrieval. The example uses RPostgreSQL but is applicable to other SQL variants.

How to write an R Data Frame to an SQL Table

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser