-
Notifications
You must be signed in to change notification settings - Fork 79
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
WIP - Clickhouse integration #507
Changes from all commits
0e745bd
a78d1fd
0e2cfc8
52dd48f
4ebafc9
e285d39
c2d3247
6d588be
180c36e
669da4f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -102,6 +102,19 @@ | |
{% do return(parameters) %} | ||
{% endmacro %} | ||
|
||
{% macro clickhouse__generate_elementary_profile_args(method, elementary_database, elementary_schema) %} | ||
{% do return([ | ||
_parameter("type", target.type), | ||
_parameter("host", target.host), | ||
_parameter("port", target.port), | ||
_parameter("user", target.user), | ||
_parameter("password", "<PASSWORD>"), | ||
_parameter("schema", elementary_schema), | ||
_parameter("driver", "<http|native>"), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this available through the target (e.g |
||
_parameter("secure", True), | ||
]) %} | ||
{% endmacro %} | ||
|
||
{% macro default__generate_elementary_profile_args(method, elementary_database, elementary_schema) %} | ||
Adapter "{{ target.type }}" is not supported on Elementary. | ||
{% endmacro %} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,11 @@ time_window_aggregation as ( | |
bucket_duration_hours, | ||
updated_at, | ||
avg(metric_value) over (partition by metric_name, full_table_name, column_name order by bucket_start asc rows between unbounded preceding and current row) as training_avg, | ||
{% if target.type == 'clickhouse' %} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We prefer to have the adapter specific code use |
||
stddevSamp(metric_value) over (partition by metric_name, full_table_name, column_name order by bucket_start asc rows between unbounded preceding and current row) as training_stddev, | ||
{% else %} | ||
stddev(metric_value) over (partition by metric_name, full_table_name, column_name order by bucket_start asc rows between unbounded preceding and current row) as training_stddev, | ||
{% endif %} | ||
count(metric_value) over (partition by metric_name, full_table_name, column_name order by bucket_start asc rows between unbounded preceding and current row) as training_set_size, | ||
last_value(bucket_end) over (partition by metric_name, full_table_name, column_name order by bucket_start asc rows between unbounded preceding and current row) training_end, | ||
first_value(bucket_end) over (partition by metric_name, full_table_name, column_name order by bucket_start asc rows between unbounded preceding and current row) as training_start | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain a bit about these numbers? how does it make it into UTC?