Learn R Programming

rquery (version 0.5.0)

describe_tables: Build a nice description of a table.

Description

Please see http://www.win-vector.com/blog/2017/05/managing-spark-data-handles-in-r/ for details. Note: one usually needs to alter the keys column which is just populated with all columns.

Usage

describe_tables(db, tablenames, ..., keyInspector = key_inspector_all_cols)

Arguments

db

database handle

tablenames

character, names of tables to describe.

...

force later arguments to bind by name.

keyInspector

function that determines prefered primary key set for tables.

Value

table describing the data.

Details

Please see vignette('DependencySorting', package = 'rquery') and vignette('joinController', package= 'rquery') for more details.

See Also

build_join_plan, graph_join_plan, actualize_join_plan

Examples

Run this code
# NOT RUN {
if (requireNamespace("DBI", quietly = TRUE) && requireNamespace("RSQLite", quietly = TRUE)) {
  my_db <- DBI::dbConnect(RSQLite::SQLite(), ":memory:")
  ex <- example_employee_date(my_db)
  print(describe_tables(my_db, ex$tableName,
                         keyInspector = key_inspector_sqlite))
  DBI::dbDisconnect(my_db)
}


# }

Run the code above in your browser using DataLab