Registry / data / dagster-gcp-pandas

dagster-gcp-pandas

JSON →
library0.29.9pypypi✓ verified 87d ago

The `dagster-gcp-pandas` library provides an I/O manager for persisting Pandas DataFrames to Google Cloud Storage (GCS) within Dagster assets. It leverages `pandas` and `gcsfs` for efficient data serialization (defaulting to Parquet). This library is part of the `dagster` ecosystem and its versioning is tightly coupled with the core `dagster` library.

pip install dagster-gcp-pandas
INSTALL
IMPORT
SIG · DAGSTER-GCP-PANDAS
D
dagster-gcp-pandas
datapythonv0.29.9
Install
24.9s avg
Import
—
Disk
575MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v0.29.9 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 578.7MB
glibc
py 3.10–3.920 runs
installs and imports cleanly · install 24.9s · import 0.000s · 542MB
575MB installed
● package 575MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

BigQueryPandasIOManager
✓ from dagster_gcp_pandas import BigQueryPandasIOManager
✗ from dagster_gcp_pandas import GCSPandasIOManager
BigQueryPandasTypeHandler
✓ from dagster_gcp_pandas import BigQueryPandasTypeHandler
bigquery_pandas_io_manager
✓ from dagster_gcp_pandas import bigquery_pandas_io_manager

This quickstart demonstrates how to define an asset that produces a Pandas DataFrame and uses `GCSPandasIOManager` to store it in a Google Cloud Storage bucket. It requires a GCS bucket to be configured and proper GCP authentication.

import pandas as pd from dagster import asset, Definitions from dagster_gcp_pandas import GCSPandasIOManager import os @asset def my_pandas_dataframe_asset() -> pd.DataFrame: """Produces a Pandas DataFrame.""" return pd.DataFrame({"value": [1, 2, 3], "label": ["A", "B", "C"]}) # Configure the GCSPandasIOManager to store DataFrames in a specified GCS bucket. # Ensure the GCS_BUCKET_NAME environment variable is set or replace "your-gcs-bucket-name". # You also need appropriate GCP credentials configured (e.g., GOOGLE_APPLICATION_CREDENTIALS). gcs_io_manager = GCSPandasIOManager( gcs_bucket=os.environ.get("GCS_BUCKET_NAME", "your-gcs-bucket-name"), gcs_prefix="dagster_assets/pandas" ) defs = Definitions( assets=[my_pandas_dataframe_asset], resources={ "io_manager": gcs_io_manager } ) # To run: # 1. Save this code as a Python file (e.g., my_project/repo.py) # 2. Set the GCS_BUCKET_NAME environment variable: # export GCS_BUCKET_NAME="your-actual-bucket-name" # 3. Ensure GCP credentials are set up (e.g., using `gcloud auth application-default login` # or `GOOGLE_APPLICATION_CREDENTIALS` environment variable pointing to a service account key). # 4. Execute: `dagster dev -f my_project/repo.py` # 5. Navigate to the Dagster UI (usually http://localhost:3000) and materialize the asset.
Debug
Known issues
breakingDagster libraries, including `dagster-gcp-pandas`, are versioned in lockstep with the core `dagster` library. Installing mismatched versions (e.g., `dagster==1.0.0` with `dagster-gcp-pandas==0.15.0`) can lead to `ModuleNotFoundError` or other runtime errors.
fix
Always install `dagster-gcp-pandas` and `dagster` with matching major and minor versions (e.g., `pip install dagster==1.x.y dagster-gcp-pandas==0.x.y`). Refer to the Dagster release notes for the correct library version mapping.
affects: <1.0.0 (old library versions with new core)
gotchaProper Google Cloud Platform (GCP) authentication and permissions are required for `dagster-gcp-pandas` to interact with GCS. Lack of credentials or insufficient permissions will result in `PermissionDenied` errors.
fix
Ensure the environment where Dagster runs has access to GCP credentials (e.g., `GOOGLE_APPLICATION_CREDENTIALS` environment variable, default credentials for GCE instances, or `gcloud auth application-default login`). The service account/user needs `Storage Object Viewer` and `Storage Object Creator` (or `Storage Object Admin`) roles on the target GCS bucket.
affects: All
gotchaThe `GCSPandasIOManager` defaults to Parquet format for serialization. If you expect or require other formats like CSV, JSON, or feather, you must explicitly configure the `file_extension` parameter.
fix
When initializing `GCSPandasIOManager`, set `file_extension` explicitly, e.g., `GCSPandasIOManager(gcs_bucket="my-bucket", file_extension=".csv")`.
affects: All
gotchaMisconfiguring the `gcs_bucket` or `gcs_prefix` parameters can lead to assets not being found when loading, or being written to unexpected locations within GCS.
fix
Carefully double-check the `gcs_bucket` and `gcs_prefix` values in your `GCSPandasIOManager` configuration. Ensure the bucket name is correct and the prefix matches where the data is expected to be stored/retrieved.
affects: All
Upgrade
Version history
0.29.9latest on PyPI · released Jun 11, 2026
Audit
Dependencies
dagsterrequiredCore Dagster framework, required for defining assets and resources.
dagster-gcprequiredProvides base GCS resource functionality which dagster-gcp-pandas builds upon.
pandasrequiredThe core data structure (DataFrame) that this library manages.
google-cloud-storageoptionalPython client for Google Cloud Storage, often required for underlying GCS interactions and authentication.
Agent activity
48 hits · last 30 days
node
40
OpenAI (training)
1
Resources
dagster-gcp-pandas — pip install dagster-gcp-pandas · libregistry