MySQLQuery: Query data from a MySQL server

Description Usage Arguments Value Author(s)

Description

This function performs all the actions needed to run a query that returns tabular data from a MySQL server. It handles connecting, querying and disconnecting. The query can either be passed directly as a string or as a path to a file containing a SQL statement.

The yaml file must contain host, dbname, user and password. Port is optional, if not present in the yaml file, the default for MySQL will be used.

Usage

1
MySQLQuery(query, id, yamlFile = "~/db.yml")

Arguments

query

The query to be ran. It can be a file with SQL or a character vector

id

The server ID in the yaml config file

yamlFile

The server configuration yaml file

Value

A dataframe with the result of the query

Author(s)

Ricardo Vladimiro


rvladimiro/dafR documentation built on June 26, 2019, 4:37 a.m.