Learn R Programming

ReDaMoR (version 0.8.2)

read_SQL_data_model: Read a data model from an SQL file from the MySQL Workbench

Description

Read a data model from an SQL file from the MySQL Workbench

Usage

read_SQL_data_model(f, typeRef = "MySQLWB", mysqlcomments = TRUE)

readSQLDataModel(...)

Value

A RelDataModel object

Arguments

f

the SQL file to read

typeRef

the reference for type conversion (Default: "MySQLWB"; see list_type_ref())

mysqlcomments

if MySQL comments (starting with #) should be removed (Default: TRUE)

...

params for read_SQL_data_model

Functions

  • readSQLDataModel(): Deprecated version of read_SQL_data_model

Details

Database, table and field names should be surrounded by "`".

Examples

Run this code
## Read the model ----
hpo_from_sql <- read_SQL_data_model(
   system.file("examples/HPO-model.sql", package="ReDaMoR")
)
## Confront to data ----
confrontation_report <- confront_data(
   hpo_from_sql,
   path=list.files(
      system.file("examples/HPO-subset", package="ReDaMoR"),
      full.names=TRUE
   ),
   returnData=TRUE
)

Run the code above in your browser using DataLab