GitHub user dosubot[bot] added a comment to the discussion: [SQL Lab] Option to Disable Auto-Run of Queries
<!-- Greeting --> Hi @sandy4597niko! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the superset team. <!-- Answer --> There is currently no global configuration option in superset_config.py (or any backend setting) to disable auto-running queries by default in Superset SQL Lab. The auto-run behavior is controlled by the autorun property in the query editor state, which is managed on a per-editor (tab) basis within the frontend application logic and persisted per session or tab—not through a global backend config. By default, the initial state for new SQL Lab editors has autorun set to false, which means queries should not auto-run unless triggered by specific UI actions or logic (such as duplicating a tab or opening a saved query) [reference](https://github.com/apache/superset/blob/20519158d2ab6325f7564b16615a99fe0ebe7a38/superset-frontend/src/SqlLab/reducers/getInitialState.ts). However, when you select a table in the schema browser, Superset may still trigger a data preview (typically a SELECT * query) for that table. This preview is not governed by a global autorun setting and is part of the frontend's behavior. There is no backend or superset_config.py switch to disable this preview query. Preventing it would require modifying the frontend code to change or remove the logic that triggers the preview when a table is selected. As a workaround, you can avoid clicking on tables in the schema browser to prevent triggering the preview, or consider customizing the frontend code if you need to enforce this behavior organization-wide. If you are comfortable with frontend development, you can look into the SQL Lab components responsible for table selection and data preview to disable or alter this feature. If you need more detailed guidance on where to look in the codebase for this logic, let me know! <!-- Dosu Comment Footer --> *To reply, just mention my name [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/2b89060d-53c0-4ff1-b28d-568b39da9a76?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/2b89060d-53c0-4ff1-b28d-568b39da9a76?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/2b89060d-53c0-4ff1-b28d-568b39da9a76?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/2b89060d-53c0-4ff1-b28d-568b39da9a76?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/2b89060d-53c0-4ff1-b28d-568b39da9a76?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/2b89060d-53c0-4ff1-b28d-568b39da9a76?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/2b89060d-53c0-4ff1-b28d-568b39da9a76?feedback_type=other)</sup> [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/33688) GitHub link: https://github.com/apache/superset/discussions/33688#discussioncomment-13367269 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
