Description Usage Arguments Examples
View source: R/CreateOneJointTable.R
Get 1 table containing the information that main_joint_tables contained joined as given in "db_forced_rel" WITHOUT Renames
1 2 3 4 5 6 7 | create_joint_table(
db_fields,
db_forced_rel,
con = db$con,
Verbose = TRUE,
get_sql_query = TRUE
)
|
db_fields |
A DF with columns: "Include, KeyType, Table, Column, Type, RelationshipWithTable, RelationshipWithColumn, Transformation, Comment" about the User Selected fields and Relationships |
db_forced_rel |
A Named String Vector. The vector names MUST point to the main table to be used for the 1-Joint-Table as its LHS. e.g. c(Hours_SiteID = "Site_SiteID", Hours_EmployeeID = "Employee_ID") |
con |
is a dbConnect DBI connection object to a SQL Database |
Verbose |
A Boolean. Verbose = TRUE will output the consecutive joins as they happen |
get_sql_query |
A Boolean. get_sql_query = TRUE will create/edit the db$sql_main_joint_tables that output the SQL Code for the tables |
1 2 3 4 5 6 7 8 9 10 | Example:
db_forced_rel <- c(Hours_SiteID = "Site_SiteID", Hours_EmployeeID = "Employee_ID")
joint_table_Without_extended_joins <-
create_joint_table(db_fields,
db_forced_rel = c(Hours_SiteID = "Site_SiteID", Hours_EmployeeID = "Employee_ID"),
)
print(joint_table_Without_extended_joins)
#No renames are used and therefore no extended joins.
#This assumes that all tables can be joined together without any 1 table being needed twice.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.