DataSpell: cannot run sql in a sql file

version 2026.1.1

when I open an sql file in my project, and choosing the datasource and schema at the top, I expect that I should be able to hit cmd+enter and run sql in the file. however, the run icon in the upper left is greyed out. 

I can run sql from within a console, but I have many sql files that I use for debugging, and it would be a pain to have to copy paste then into freshly created console.

I tried this in pycharm (latest) and it works like a charm.

0

Hi Dave Castelnuovo,

Do you observe the same issue when creating a new empty project with only one SQL file in DataSpell? 

Could you please upload the idea.log file (Help | Show Log in …) to https://uploads.jetbrains.com/ and share the upload ID here once done?

0

uploaded logs and a screenshot to 2026_05_10_jtyMGfLiKh7K4C2Zi52GVL

it worked when I tried a brand new project with a single sql file that was created through file→new

the screenshot shows multiple sql files with different icons. you'll notice a couple have a service icon, and show the db they are connected to to the right. these files show the schema and datasource header at the top, except execute is greyed out, and cmd+enter doesnt execute the selected sql statement

the other sql files dont even show that header at the top

0

Dave Castelnuovo,

Thank you. I only found a screenshot under the upload ID 2026_05_10_jtyMGfLiKh7K4C2Zi52GVL. Could you please also attach the logs separately?

The screenshot shows multiple sql files with different icons. you'll notice a couple have a service icon, and show the db they are connected to to the right.

Just to double-check, was this behavior observed in an empty project after adding several files?

0

Upload id: 2026_05_10_qbwqy9Acn787ueukZNJzch (file: idea.log)

0

Judging by the logs, I assume you have dbt files (e.g., dbt_project.yml) in your project files. Is that correct? If so, the issue is likely related to PY-75216, for which we plan to make a fix in DBE-23991.

 

I tried this in pycharm (latest) and it works like a charm.

Did you try this in PyCharm with the very same project? If yes, did you have the 'dbt Support' plugin enabled there?

0

yep, thats it, thanks. and yes sql files in the same project work fine in pycharm. and yes, dbt support is not installed in pycharm but is in dataspell. 

0

Dave Castelnuovo, thanks for confirming! 

In this case, I’m afraid the only workaround for executing queries in SQL files is to disable the plugin in DataSpell until a fix is implemented in PY-75216 or DBE-23991.

0

请先登录再写评论。