Skip to content

Commit

Permalink
[dagster-polars] Preventing import errors when users don't have gcp m…
Browse files Browse the repository at this point in the history
…odules installed (#25708)

## Summary & Motivation
Addressing #25705

## How I Tested These Changes
Created a new virtual environment in which I installed the
dagster-polars package from the local source. Then created a script
which imported dagster_polars, reproducing the ImportError. Then I added
the exception for dagster-polars[gcp], which allowed the package to
import successfully.

## Changelog

> Preventing dagster-polars from raising ImportError when bigquery
libraries are not installed
  • Loading branch information
zyd14 authored Nov 5, 2024
1 parent 9f16bda commit a156e32
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

__all__.extend(["PolarsBigQueryIOManager", "PolarsBigQueryTypeHandler"])
except ImportError as e:
if "google-cloud-bigquery" in str(e):
if "google-cloud-bigquery" in str(e) or "dagster-polars[gcp]" in str(e):
pass
else:
raise e

0 comments on commit a156e32

Please sign in to comment.