Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update SqlTarget to support parsing queries from files #555

Merged
merged 3 commits into from
May 18, 2023

Conversation

kamka427
Copy link
Contributor

What does this do?

Add the ability to parse SQL queries from files.

Why is it a good idea?

Parsing files instead of using query strings reduces code length and improves code readability.

Context

Complex panels and dashboards use multiple long queries. Parsing them from files shortens the code length and leads to a more readable and maintainable codebase. The implementation supports parametrizing the queries with dictionary as an attribute to help writing queries with variables.

Copy link
Collaborator

@JamesGibo JamesGibo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, I can see this being a really useful feature.
May even extend this support to other datasource types.

@JamesGibo JamesGibo merged commit 2a30b44 into weaveworks:main May 18, 2023
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