Skip to contents

This function lets the user query a PostgreSQL database. Previously was called queryDummy but was replaced and deprecated for a more general function by using the from parameter.

Usage

queryDB(query, from, creds = NA)

Arguments

query

Character. SQL Query

from

Character. Credential's user (see get_creds())

creds

Character. Credential's directory (see get_creds())

Value

data.frame. Result of fetching the query data.

Examples

if (FALSE) { # \dontrun{
# Query a PostgreSQL database
query <- "SELECT * FROM my_table LIMIT 10"
result <- queryDB(query, from = "my_database")
head(result)
} # }