Registry / database / snowpark-connect-deps-2

snowpark-connect-deps-2

JSON →
library3.56.4pypypiunverified

The `snowpark-connect-deps-2` package provides supporting JAR dependencies essential for Snowflake's Snowpark Connect for Spark. Snowpark Connect enables developers to execute Apache Spark workloads directly on Snowflake's high-performance compute engine, leveraging familiar Spark DataFrame APIs without the overhead of managing a dedicated Spark cluster. This package, alongside `snowpark-connect-deps-1`, underpins the functionality of the user-facing `snowpark-connect` library, which is part of the broader Snowpark for Python ecosystem. It is currently at version 3.56.4 and follows a rapid release cadence in conjunction with the `snowpark-connect` library.

pip install snowpark-connect-deps-2
INSTALL
IMPORT
SIG · SNOWPARK-CONNECT-D
S
snowpark-connect-deps-2
databasepythonv3.56.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

This package is a backend dependency. Users do not directly import `snowpark-connect-deps-2`. The quickstart demonstrates how to use `snowpark-connect` (the user-facing library that depends on `snowpark-connect-deps-2`) to establish a Spark session and perform basic DataFrame operations with Snowflake. Ensure your Snowflake connection parameters are configured, preferably via environment variables, to establish the session.

import os from snowflake import snowpark_connect from pyspark.sql import SparkSession # Set environment variable to enable Spark Connect mode os.environ["SPARK_CONNECT_MODE_ENABLED"] = "1" # Configure connection parameters (replace with your Snowflake details) # It's recommended to use environment variables or a configuration file # for sensitive information like passwords. os.environ["SNOWFLAKE_ACCOUNT"] = os.environ.get("SNOWFLAKE_ACCOUNT", "your_account_identifier") os.environ["SNOWFLAKE_USER"] = os.environ.get("SNOWFLAKE_USER", "your_username") os.environ["SNOWFLAKE_PASSWORD"] = os.environ.get("SNOWFLAKE_PASSWORD", "your_password") os.environ["SNOWFLAKE_ROLE"] = os.environ.get("SNOWFLAKE_ROLE", "your_role") os.environ["SNOWFLAKE_WAREHOUSE"] = os.environ.get("SNOWFLAKE_WAREHOUSE", "your_warehouse") os.environ["SNOWFLAKE_DATABASE"] = os.environ.get("SNOWFLAKE_DATABASE", "your_database") os.environ["SNOWFLAKE_SCHEMA"] = os.environ.get("SNOWFLAKE_SCHEMA", "your_schema") # Start the Spark Connect session snowpark_connect.start_session() spark = snowpark_connect.get_session() # Example: Create a DataFrame and show data data = [("Alice", 1), ("Bob", 2), ("Charlie", 3)] df = spark.createDataFrame(data, ["Name", "ID"]) df.show() # Stop the Spark session when done spark.stop()
Debug
Known issues
gotchaThe `snowpark-connect-deps-2` package is a low-level dependency for `snowpark-connect`. Direct interaction or imports are not expected; issues often stem from environmental setup or `snowpark-connect` itself.
fix
Focus troubleshooting on the `snowpark-connect` library, Python environment, and JDK setup rather than this specific dependency package.
affects: All versions
gotchaSnowpark Connect for Spark often requires a correctly configured Java Development Kit (JDK) in your environment, typically Java 11 or 17. Without it, `snowpark-connect` might fail to initialize or run properly.
fix
Ensure a compatible JDK is installed and the `JAVA_HOME` environment variable is correctly set to its installation path. Tools like `jdk4py` (an optional dependency of `snowpark-connect`) can assist with programmatic JDK configuration.
affects: All versions
breakingSnowpark Connect for Spark implicitly converts certain Spark integral data types (`ByteType`, `ShortType`, `IntegerType`) to `LongType` when operating on data. This can lead to unexpected type changes.
fix
Be aware of these implicit conversions when defining schemas or expecting specific integer precision. Explicitly cast types if precise control is needed, or consult the Snowpark Connect for Spark compatibility guide.
affects: All versions of Snowpark Connect for Spark
gotchaSnowpark Connect for Spark has limitations regarding User-Defined Functions (UDFs) within lambda expressions. UDFs are generally not supported inside lambdas, including some built-in functions implemented as Snowflake UDFs.
fix
Refactor code to avoid embedding UDFs directly within lambda expressions. Use built-in SQL functions or standalone UDFs where possible for optimal performance and compatibility.
affects: All versions of Snowpark Connect for Spark
Errors
Common errors & fixes
AttributeError: module 'snowflake.snowpark' has no attribute '_internal'
This error or similar `DeprecationWarning: pkg_resources is deprecated` often indicates an issue with package resolution, potentially due to outdated `setuptools` or an environment conflict.
fix
Update `setuptools` (`pip install --upgrade setuptools`). If the issue persists, try recreating your virtual environment and reinstalling `snowflake-snowpark-python` and `snowpark-connect`.
java.lang.RuntimeException: [FATAL] No JVM found.
Snowpark Connect for Spark relies on Java, and this error indicates that a Java Virtual Machine (JVM) could not be located or properly initialized in the environment.
fix
Install a supported JDK (e.g., OpenJDK 11 or 17) and ensure the `JAVA_HOME` environment variable is correctly set to the root directory of your JDK installation. For example, `export JAVA_HOME=/path/to/jdk-17`.
org.apache.spark.sql.AnalysisException: Cannot resolve '`your_column`' given input columns
This typically occurs when a column name used in a Spark DataFrame operation does not exist in the DataFrame's schema, often due to case sensitivity differences between Spark and Snowflake, or incorrect transformations.
fix
Verify column names and their casing against the actual schema. Snowflake typically stores identifiers in uppercase by default, so ensure consistency or use proper quoting mechanisms if mixed-case identifiers are used. Review the Spark Connect compatibility guide for semantic differences.
Upgrade
Version history
3.56.4latest on PyPI · released Feb 26, 2026
Audit
Dependencies
pythonrequiredRequired Python interpreter versions as specified by the package metadata.
Agent activity
33 hits · last 30 days
node
28
OpenAI (training)
1
Resources