Using Snowpark to Read Data

Snowpark meets you where your data lives. Whether your data sits in operational databases or arrives as files, Snowpark gives you a simple, Python-first way to pull it in, turn it into a DataFrame, and land it in Snowflake tables, so you can keep modeling, transforming, and analyzing without context switching.

Reading data from external sources using Snowpark Python DB-API

Use standard Python DB-API 2.0 drivers to pull data from external databases (SQL Server, Oracle, PostgreSQL, MySQL, Databricks) straight into a Snowpark DataFrame. Snowpark Python DB-API can run from your client (“local” mode) or inside Snowflake using stored procedures or notebooks (with external access integration). The result behaves like any other DataFrame you can use to join, transform, and write to Snowflake tables. For more information, see Using the Snowpark Python DB-API.

Reading data from XML files using Snowpark XML RowTag Reader

Use Snowpark XML to read large staged XML files efficiently: the reader splits the file on rowTag, loads each match as one row, and maps child elements into VARIANT columns (nested structure preserved) for immediate querying with Snowpark or SQL. You can also validate each row against an XSD with PERMISSIVE (quarantine invalid rows in _corrupt_record) or FAILFAST behavior. The output is a standard DataFrame you can transform and save to tables. For more information, see Using Snowpark XML RowTag Reader.