pg_in_schema: PostgreSQL Schemas from Schema Tables

View source: R/pg-in-schema.R

pg_in_schemaR Documentation

PostgreSQL Schemas from Schema Tables

Description

Mutates a data frame by adding in_schema equal to the database schema-table tuple based on the PostgreSQL schema name and table name.

Usage

pg_in_schema(...)

Arguments

...

Arguments passed on to dplyr::collect

x

A data frame, data frame extension (e.g. a tibble), or a lazy data frame (e.g. from dbplyr or dtplyr). See Methods, below, for more details.

Value

Collected data frame with in_schema column of type list-encapsulated dbplyr_s structure representing the database schema-table.

Examples

## Not run: 
pg::pg_catalog.pg_tables(src) %>%
  dplyr::filter(!(schemaname %in% c("pg_catalog", "information_schema"))) %>%
  pg::pg_in_schema()

## End(Not run)

royratcliffe/pg documentation built on March 19, 2022, 7:22 a.m.