Skip to content

Conversation

fjuliofontes
Copy link

@fjuliofontes fjuliofontes commented Oct 1, 2025

What type of PR is this?

  • Feature
  • New Query Runner (Data Source)

Description

This PR adds support for Cloudflare D1 as a new query runner for Redash (v25.8.0).
The integration allows users to connect to a D1 database and run SQL queries directly from Redash.

Compatibility: Tested against the current Cloudflare D1 (SQLite-based) implementation. Expected to work with all active D1 versions.

Required Parameters:

Cloudflare D1 API URL

Example:

https://api.cloudflare.com/client/v4/accounts/ACCOUNT_ID/d1/database/DATABASE_ID/query

Cloudflare API Token

ACCOUNT_API_TOKEN

How is this tested?

  • Manually

Manual testing details:

Verified connection to a Cloudflare D1 instance.
Ran multiple queries (SELECT, CREATE, INSERT) and confirmed results are returned properly in Redash.
Checked error handling for invalid queries and connection issues.

Related Tickets & Documents

N/A

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

register query_example

@fjuliofontes
Copy link
Author

Hi guys,
I would a appreciate if someone that has the development environment already setup could run the make format for this PR. I'm currently using docker images for the tests so I don't have all the required packages installed on my mac.

(redashvenv1) $ make format
pre-commit run --all-files
isort....................................................................Passed
black....................................................................Passed
flake8...................................................................Passed

Thanks

@yoshiokatsuneo
Copy link
Contributor

@fjuliofontes

Thank you for the PR !
I think just running "make format" inside container should be enough, assuming the code is volume mounted.

@fjuliofontes
Copy link
Author

@fjuliofontes

Thank you for the PR ! I think just running "make format" inside container should be enough, assuming the code is volume mounted.

Hi @yoshiokatsuneo,

Yes, I'm running on a docker environment. I've attempted to run "make format" inside the container but it does not work. It asks for the git repository.

@yoshiokatsuneo
Copy link
Contributor

@fjuliofontes

How about running command like below on your Redash directory ?

$ docker compose run --rm server /bin/bash
...
redash@c1e0f575e89c:/app$ make format
pre-commit run --all-files
[INFO] Initializing environment for https://github.com/psf/black.
[INFO] Initializing environment for https://github.com/charliermarsh/ruff-pre-commit.
[INFO] Installing environment for https://github.com/psf/black.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/charliermarsh/ruff-pre-commit.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
black....................................................................Passed
ruff.....................................................................Passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants