% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/parquet-metadata.R
\name{read_parquet_schema}
\alias{read_parquet_schema}
\title{Read the schema of a Parquet file}
\usage{
read_parquet_schema(file, options = parquet_options())
}
\arguments{
\item{file}{Path to a Parquet file.}

\item{options}{Return value of \code{\link[=parquet_options]{parquet_options()}}, options that
potentially modify the Parquet to R type mappings.}
}
\value{
\if{html}{\out{<div class="sourceCode">}}\preformatted{Data frame, the schema of the file. It has one row for
each node (inner node or leaf node). For flat files this means one
root node (inner node), always the first one, and then one row for
each "real" column. For nested schemas, the rows are in depth-first
search order. Most important columns are:
- `file_name`: file name.
- `r_col`: integer, the column index in R, starting from one.
  `NA` for the root node. For Parquet files without list columns
  this is simply the column index in the file. A list column has
  multiple schema rows, and they all have the same `r_col`.
- `name`: column name.
- `r_type`: the R type that corresponds to the Parquet type.
  Might be `NA` if [read_parquet()] cannot read this column. See
  [nanoparquet-types] for the type mapping rules.
- `type`: data type. One of the low level data types.
- `type_length`: length for fixed length byte arrays.
- `repettion_type`: character, one of `REQUIRED`, `OPTIONAL` or
  `REPEATED`.
- `logical_type`: a list column, the logical types of the columns.
  An element has at least an entry called `type`, and potentially
  additional entries, e.g. `bit_width`, `is_signed`, etc.
- `num_children`: number of child nodes. Should be a non-negative
  integer for the root node, and `NA` for a leaf node.
}\if{html}{\out{</div>}}
}
\description{
This function should work on all files, even if \code{\link[=read_parquet]{read_parquet()}} is
unable to read them, because of an unsupported schema, encoding,
compression or other reason.
}
\seealso{
\code{\link[=read_parquet_metadata]{read_parquet_metadata()}} to read more metadata,
\code{\link[=read_parquet_info]{read_parquet_info()}} to show only basic information.
\code{\link[=read_parquet]{read_parquet()}}, \code{\link[=write_parquet]{write_parquet()}}, \link{nanoparquet-types}.
}
