The Firebolt Python SDK provides a Python Database API Specification (DB-API 2.0) compliant interface for connecting and interacting with Firebolt, a cloud data warehouse. It enables executing SQL queries, managing connections, and fetching results programmatically. The current version is 1.18.5, with frequent patch releases addressing bug fixes and minor improvements, and occasional minor version bumps for new features.
pip install firebolt-sdkVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to establish a connection to Firebolt using service account credentials (client ID/secret) and execute a simple query. It relies on environment variables for sensitive information, which is a recommended practice. The DB-API 2.0 compliant `Connection` and `Cursor` objects are used to interact with the database.
Prefer setting `FIREBOLT_CLIENT_ID` and `FIREBOLT_CLIENT_SECRET` environment variables or passing them directly to the `Connection` constructor over `FIREBOLT_USERNAME` and `FIREBOLT_PASSWORD`.
Always ensure `FIREBOLT_ENGINE_NAME` and `FIREBOLT_DATABASE` environment variables are set or explicitly pass `engine_name` and `database` parameters to the `Connection` constructor.
Simplify complex SQL statements where possible. Test queries thoroughly, especially those with intricate syntax. Ensure you are on the latest patch version of the SDK, as `sqlparse` related fixes are often included.
Double-check your Firebolt service account credentials or user credentials. Ensure they are correctly set as environment variables (e.g., `FIREBOLT_CLIENT_ID`, `FIREBOLT_CLIENT_SECRET`) or passed explicitly to the `Connection` constructor.
Verify the exact database and engine names in your Firebolt account. Confirm that the credentials used have appropriate permissions to access the specified resources.
Install the library using `pip install firebolt-sdk`. If you are using a virtual environment, ensure it is activated before installation and execution.
Ensure all necessary parameters are supplied. This can be done by setting corresponding environment variables (e.g., `FIREBOLT_ACCOUNT_NAME`, `FIREBOLT_DATABASE`, `FIREBOLT_ENGINE_NAME`, `FIREBOLT_CLIENT_ID`, `FIREBOLT_CLIENT_SECRET`) or by passing them directly as keyword arguments to `Connection()`.