## ----include = FALSE----------------------------------------------------------
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  eval = FALSE
)

## -----------------------------------------------------------------------------
# library(dplyneage)
# 
# # This just works - no install step required
# extract_lineage("SELECT id, name FROM customers") |>
#   lineage_flow()

## -----------------------------------------------------------------------------
# has_sqlglot()
# #> [1] TRUE

## -----------------------------------------------------------------------------
# # Point reticulate at your environment before loading dplyneage
# Sys.setenv(RETICULATE_PYTHON = "/path/to/your/python")
# 
# library(dplyneage)
# has_sqlglot()

## -----------------------------------------------------------------------------
# extract_lineage(
#   "SELECT c.name, order_date FROM customers c JOIN orders o ON c.id = o.customer_id",
#   schema = list(
#     customers = c("id", "name"),
#     orders = c("customer_id", "order_date")
#   )
# )

## -----------------------------------------------------------------------------
# extract_lineage(query, dialect = "duckdb")     # default
# extract_lineage(query, dialect = "postgres")
# extract_lineage(query, dialect = "snowflake")
# extract_lineage(query, dialect = "bigquery")
# extract_lineage(query, dialect = "mysql")

## -----------------------------------------------------------------------------
# # See which Python reticulate is using
# reticulate::py_config()
# 
# # List installed packages
# reticulate::py_list_packages()

