We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Custom preset for table filter (configable via QueryConfig)
The text was updated successfully, but these errors were encountered:
Done implement, example usage with defaultParams and filterParamPresets:
defaultParams
filterParamPresets
import { ColumnFormat } from '@/types/column-format' import { type QueryConfig } from '@/types/query-config' export const historyQueriesConfig: QueryConfig = { name: 'history-queries', description: 'Contains information about executed queries: start time, duration of processing, error messages', sql: ` SELECT ... FROM system.query_log WHERE if ({type: String} != '', type = {type: String}, type != 'QueryStart') AND if ({duration_1m: String} = '1', query_duration >= 60, true) AND if ({event_time: String} != '', toDate(event_time) = toDate({event_time: String}), true) AND if ({database: String} != '' AND {table: String} != '', has(tables, format('{}.{}', {database: String}, {table: String})), true) ORDER BY event_time DESC LIMIT 1000 `, columns: [ ... ], columnFormats: { ... }, defaultParams: { type: '', duration_1m: '', event_time: '', database: '', table: '', }, filterParamPresets: [ { name: 'type = QueryStart', key: 'type', value: 'QueryStart', }, { name: 'query_duration > 1m', key: 'duration_1m', value: '1', }, ], }
Sorry, something went wrong.
No branches or pull requests
Custom preset for table filter (configable via QueryConfig)
The text was updated successfully, but these errors were encountered: