get_data: Get data from database

Description Usage Arguments Value

View source: R/get_data.R

Description

Fetch a table or a specific query of a table from a CISM database.

Usage

1
2
3
get_data(query = NULL, tab = NULL, dbname = NULL, host = NULL,
  port = NULL, user = NULL, password = NULL, connection_object = NULL,
  collect = TRUE)

Arguments

query

A mysql query as a chracter string of length 1

tab

As an alternative to query, the name of an entire table to return

dbname

The name of the database from which you are getting data. Examples include "openhds", "dss", "maltem_absenteeism", etc. If NULL the function will try to use the dbname in your connection_object; if the connection_object is NULL, the function will try to create a connection_object as described below.

host

The name of the host from which you are getting data. Examples include "sap.manhica.net". If NULL the function will try to use the host in your connection_object; if the connection_object is NULL, the function will try to create a connection_object as described below.

port

The name of the port from which you are getting data. This should be 3306 on-site, and 4706 off-site. If NULL the function will try to use the port in your connection_object; if the connection_object is NULL, the function will try to create a connection_object as described below.

user

The user. If NULL the function will try to use the user in your connection_object; if the connection_object is NULL, the function will try to create a connection_object as described below.

password

The password If NULL the function will try to use the pqssword in your connection_object; if the connection_object is NULL, the function will try to create a connection_object as described below.

connection_object

An open connection to a CISM database (as created through credentials_extract and credentials_connect or credentials_now); if NULL, the function will try to create a connection_object by retrieving user information from the credentials/credentials.yaml in or somewhere upwards of the working directory.

collect

Whether to collect into memory (using dplyr's connect function) the result or not

Value

A dataframe matching the results of either the query or tab arguments


joebrew/cism documentation built on May 19, 2019, 2:58 p.m.