Learn R Programming

frictionless (version 1.2.0)

get_schema: Get the Table Schema of a Data Resource

Description

Returns the Table Schema of a Data Resource (in a Data Package), i.e. the content of its schema property, describing the resource's fields, data types, relationships, and missing values. The resource must be a Tabular Data Resource.

Usage

get_schema(package, resource_name)

Value

List describing a Table Schema.

Arguments

package

Data Package object, as returned by read_package() or create_package().

resource_name

Name of the Data Resource.

Details

See vignette("table-schema") to learn more about Table Schema.

Examples

Run this code
# Load the example Data Package
package <- example_package()

# Get the Table Schema for the resource "observations"
schema <- get_schema(package, "observations")
str(schema)

Run the code above in your browser using DataLab