cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to use GLOW in Databricks Premium on AWS?

kasuskasus1
New Contributor III

Hi!

Have connected workspace to AWS, but when I execute in a new notebook:

 

 

%python
%pip install glow.py

import glow
from pyspark.sql import SparkSession

# Create a Spark session
spark = (SparkSession.builder
         .appName("Genomics Analysis")
         .getOrCreate())

# Register Glow with the Spark session
glow.register(spark)

 

 

I get:

 

 

TypeCheckError: argument "session" (pyspark.sql.connect.session.SparkSession) is not an instance of pyspark.sql.session.SparkSession
File <command-7248535564102662>, line 10
      5 spark = SparkSession.builder \
      6     .appName("Genomics Analysis") \
      7     .getOrCreate()
      9 # Register Glow with the Spark session
---> 10 glow.register(spark)

 

 

Any ideas how this is supposed to work? AI and googling did not help...

Cheers!
1 ACCEPTED SOLUTION

Accepted Solutions

kasuskasus1
New Contributor III

Solved this with the help of colleagues at last. First of all, it won't work with Serverless mode, so a cluster is required. Once the cluster is created in Compute section, on Library tab add those 2 libraries:

Screenshot 2025-02-18 at 12.13.41.png

Then running:

import glow
from pyspark.sql.session import SparkSession

glow.register(spark)

 

works just fine!
Cheers!

View solution in original post

1 REPLY 1

kasuskasus1
New Contributor III

Solved this with the help of colleagues at last. First of all, it won't work with Serverless mode, so a cluster is required. Once the cluster is created in Compute section, on Library tab add those 2 libraries:

Screenshot 2025-02-18 at 12.13.41.png

Then running:

import glow
from pyspark.sql.session import SparkSession

glow.register(spark)

 

works just fine!
Cheers!

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group