snowflake.snowpark.DataFrameReader.schema

DataFrameReader.schema(schema: StructType) DataFrameReader[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.48.0/src/snowflake/snowpark/dataframe_reader.py#L643-L659)

Define the schema for CSV or XML files that you want to read.

Parameters:

schema – Schema configuration for the CSV or XML file to be read.

Returns:

a DataFrameReader instance with the specified schema configuration for the data to be read.