Learn R Programming

joinspy (version 0.7.3)

analyze_join_chain: Analyze Multi-Table Join Chain

Description

Analyzes a sequence of joins to identify potential issues in the chain. Useful for debugging complex multi-table joins.

Usage

analyze_join_chain(tables, joins)

Value

A summary of the join chain analysis.

Arguments

tables

A named list of data frames to join.

joins

A list of join specifications, each with elements:

left

Name of left table

right

Name of right table

by

Join column(s)

See Also

join_spy(), check_cartesian()

Examples

Run this code
orders <- data.frame(order_id = 1:3, customer_id = c(1, 2, 2))
customers <- data.frame(customer_id = 1:3, region_id = c(1, 1, 2))
regions <- data.frame(region_id = 1:2, name = c("North", "South"))

analyze_join_chain(
  tables = list(orders = orders, customers = customers, regions = regions),
  joins = list(
    list(left = "orders", right = "customers", by = "customer_id"),
    list(left = "result", right = "regions", by = "region_id")
  )
)

Run the code above in your browser using DataLab