data_algebra/SparkSQL.py
def example_handle():
    """
    Return an example db handle for testing. Returns None if helper packages not present.

    """
    if not have_Spark:
        return None
    global cached_spark_context
    if cached_spark_context is None:
        cached_spark_context = pyspark.SparkContext()
    return SparkSQLModel().db_handle(
        SparkConnection(
            spark_context=cached_spark_context,
            spark_session=pyspark.sql.SparkSession.builder.appName(
                "pandasToSparkDF"
            ).getOrCreate(),
        )
    )

    Return an example db handle for testing. Returns None if helper packages not present.

    
Return an example db handle for testing. Returns None if helper packages not present.
Return an example db handle for testing . Returns None if helper packages not present .
def example_handle():
    if not have_Spark:
        return None
    global cached_spark_context
    if cached_spark_context is None:
        cached_spark_context = pyspark.SparkContext()
    return SparkSQLModel().db_handle(
        SparkConnection(
            spark_context=cached_spark_context,
            spark_session=pyspark.sql.SparkSession.builder.appName(
                "pandasToSparkDF"
            ).getOrCreate(),
        )
    )
def example_handle ( ) : if not have_Spark : return None global cached_spark_context if cached_spark_context is None : cached_spark_context = pyspark . SparkContext ( ) return SparkSQLModel ( ) . db_handle ( SparkConnection ( spark_context = cached_spark_context , spark_session = pyspark . sql . SparkSession . builder . appName ( "pandasToSparkDF" ) . getOrCreate ( ) , ) )
Return an example db handle for testing.
Return an example db handle for testing .
"""
    Return an example db handle for testing. Returns None if helper packages not present.

    """