update_db_fields_from_db_con: Updates the db_fields to the newest SQL Schema, keeping your...

Description Usage Arguments Examples

Description

Returns the db_fields variable with columns: KeyType, Table, Column, Type, Comment, RelationshipWithTable, RelationshipWithColumn, Transformation

Usage

1
2
3
4
5
6
7
8
9
update_db_fields_from_db_con(
  csv_path,
  csv_output = NULL,
  ExcludeIdentities = FALSE,
  ExcludeForeignKeys = TRUE,
  Update_DBEnv_DBFields = FALSE,
  ExcludeAuditingFields = FALSE,
  ExcludeSYSDIAGRAMS = TRUE
)

Arguments

csv_path

A String. The path of the db_fields .csv file.

csv_output

A Boolean or a File Path as String. If FALSE then the changes will only return as a variable. If TRUE then the original db_fields file (csv_path) will be updated. If it's a File Path String then the original file remains intact and changes are saved on that File Path

ExcludeIdentities

A Boolean. The default inclusion behaviour for SQL Table Identities. If we're going to perform more joins afterwards or if we need to have a reference as to which table each column belongs to, then we shouldn't exclude them; if we only care about extrapolating information from each specific row, then we can exclude them by default and edit to include just the row identifier ID.

ExcludeForeignKeys

A Boolean. If we need to perform manual joins afterwards or keep a reference as to with which table there's a connection, then we need them; otherwise we can safely exclude them

Update_DBEnv_DBFields

A Boolean. If set to TRUE, you can have an internal main db_fields accessible via db$db_fields usually acting as the main db_fields. Default is FALSE as having local db_fields variables is the default behaviour.

ExcludeAuditingFields.

A Boolean. If TRUE, any SQL Columns ending with "_OrigEntryOn", "_OrigEntryBy", "_EntryOn", "_EntryBy", "_CompName", "_Remote" or "_Username" will have INCLUDE == FALSE by default

ExcludeSYSDIAGRAMS.

A Boolean. If TRUE, any SQL Columns on the table "sysdiagrams" will have INCLUDE == FALSE by default

Examples

1
db_fields <- update_db_fields_from_db_con("db_fields.csv")

N1h1l1sT/dbautojoinr documentation built on Jan. 24, 2021, 10:15 a.m.