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

Improve auto-completion for query builder by using search string #939

Open
javisst opened this issue Jul 3, 2024 · 0 comments
Open

Improve auto-completion for query builder by using search string #939

javisst opened this issue Jul 3, 2024 · 0 comments

Comments

@javisst
Copy link

javisst commented Jul 3, 2024

Currently the auto completion for the query builder is initialized once with fixed values by the following query.

adx-<tablename>
| where isnotempty(<column_name>)
| take 50000
| distinct <column_name>
| take 251

The query to initialize the values is fixed to sample 50000 values and then take 251 distinct values from that sample.

For code see here:

parts.push('take 50000');
parts.push(`distinct ${column}`);
parts.push('take 251');

Since we have more than 251 distinct values the auto complete does not show the correct values even when typing the correct prefixes.
It seems like Grafana UI generally triggers a correct search (with search term), but this data source does not use it.

My improvement idea would be to correctly implement the auto complete function and use the typed search term for the auto completion if available.

adx-<tablename>
| where isnotempty(<column_name>)
| where <column_name> contains <search_string>
| take 50000
| distinct <column_name>
| take 251
@javisst javisst changed the title Improve auto-complete for query builder by using search string Improve auto-completion for query builder by using search string Jul 3, 2024
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

No branches or pull requests

1 participant