-
Notifications
You must be signed in to change notification settings - Fork 50
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
Model alternative for jaeger_index table #107
Comments
So do I. An alternative way is using CREATE MATERIALIZED VIEW IF NOT EXISTS jaeger.adapter_search_materialized ON CLUSTER '{cluster}'
TO jaeger.adapter_search_local AS SELECT
timestamp,
resource,
argUseCache,
traceId,
toDate(_tripDate) AS tripDate,
tripDirection,
tripSource,
toUInt16OrZero(_tripCount) AS tripCount,
tripSearchId,
durationUs
FROM (
SELECT
timestamp,
toInt32(tags.value[ indexOf(tags.key, 'resource.code') ]) AS resource,
toBool(tags.value[ indexOf(tags.key, 'use_cache') ] != 'false') AS argUseCache,
traceID AS traceId,
splitByChar(',', tags.value[ indexOf(tags.key, 'trip.date') ]) AS _tripDate,
splitByChar(',', tags.value[ indexOf(tags.key, 'trip.direction') ]) AS tripDirection,
splitByChar(',', tags.value[ indexOf(tags.key, 'trip.source') ]) AS tripSource,
splitByChar(',', tags.value[ indexOf(tags.key, 'trip.count') ]) AS _tripCount,
tags.value[ indexOf(tags.key, 'trip.search_id') ] AS tripSearchId,
durationUs
FROM jaeger.jaeger_index_local
WHERE operation = 'searchAndWaitResult'
) ARRAY JOIN _tripDate, tripDirection, tripSource, _tripCount |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On jaeger_index tables, the tags is coded as a nested array with key and values.
It is good for the only usage of Jaeger-query but in our company we are using jaeger also for analytics purposes.
Since Clickhouse 21.3, the Map type (https://clickhouse.com/docs/en/sql-reference/data-types/map/) is available. I think It could be a good alternative to Nested .
Do you have already made some performance (time and storage) tests with Map ?
Could it be an acceptable contribution (with a flag to not activate it by default) ?
The text was updated successfully, but these errors were encountered: