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

set instance's default olap connector as model's default output connector #6302

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cli/pkg/local/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ func (a *App) emitStartEvent(ctx context.Context) error {
connectorNames = append(connectorNames, connector.Name)
}

a.ch.Telemetry(ctx).RecordBehavioralLegacy(activity.BehavioralEventAppStart, attribute.StringSlice("connectors", connectorNames), attribute.String("olap_connector", a.Instance.OLAPConnector))
a.ch.Telemetry(ctx).RecordBehavioralLegacy(activity.BehavioralEventAppStart, attribute.StringSlice("connectors", connectorNames), attribute.String("olap_connector", a.Instance.ResolveOLAPConnector()))

return nil
}
Expand Down
2 changes: 1 addition & 1 deletion runtime/compilers/rillv1/parse_model.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ func (p *Parser) parseModel(ctx context.Context, node *Node) error {
// Build output details
outputConnector := tmp.Output.Connector
if outputConnector == "" {
outputConnector = inputConnector
outputConnector = p.defaultOLAPConnector()
}
outputProps := tmp.Output.Properties

Expand Down
2 changes: 1 addition & 1 deletion runtime/metricsview/executor_validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func TestValidateMetricsViewClickHouseNames(t *testing.T) {
rt, instanceID := testruntime.NewInstanceWithOptions(t, testruntime.InstanceOptions{
TestConnectors: []string{"clickhouse"},
Files: map[string]string{
"rill.yaml": "",
"rill.yaml": "olap_connector: clickhouse",
"model.sql": `
-- @connector: clickhouse
select parseDateTimeBestEffort('2024-01-01T00:00:00Z') as time, 'DK' as country, 1 as val union all
Expand Down
2 changes: 2 additions & 0 deletions runtime/resolvers/testdata/metrics_comparisons.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ project_files:
select parseDateTimeBestEffort('2024-01-03T00:00:00Z') as time, 'US' as country, 3 as val union all
select parseDateTimeBestEffort('2024-01-04T00:00:00Z') as time, 'US' as country, 4 as val union all
select parseDateTimeBestEffort('2024-01-05T00:00:00Z') as time, 'DK' as country, 5 as val
output:
connector: clickhouse
clickhouse_metrics.yaml:
type: metrics_view
model: clickhouse_data
Expand Down
2 changes: 2 additions & 0 deletions runtime/resolvers/testdata/metrics_sql_clickhouse.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
connectors:
- clickhouse
project_files:
rill.yaml:
olap_connector: clickhouse
ad_bids_mini.yaml:
type: model
connector: clickhouse
Expand Down
Loading