-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathconfig.example.yaml
More file actions
90 lines (85 loc) · 2.89 KB
/
config.example.yaml
File metadata and controls
90 lines (85 loc) · 2.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
queryflux:
externalAddress: http://localhost:8080
frontends:
trinoHttp:
enabled: true
port: 8080
postgresWire:
enabled: false
port: 5432
# Snowflake JDBC/ODBC/Python wire + SQL API v2 on one port (sessions are process-local).
# snowflakeHttp:
# enabled: false
# port: 8445
# sessionAffinityAcknowledged: false
persistence:
type: inMemory
# --- Postgres persistence examples (pick one style) ---
# Single URL:
# persistence:
# type: postgres
# url: postgres://queryflux:queryflux@localhost:5432/queryflux
# Or discrete fields (port defaults to 5432 if omitted):
# persistence:
# type: postgres
# host: localhost
# port: 5432
# user: queryflux
# password: queryflux
# database: queryflux
adminApi:
port: 9000
# Bootstrap admin credentials for the Admin REST API and Studio.
# Change the password via the Studio Security page after first login — the new
# bcrypt hash is stored in the database and these values are no longer used.
# Override via env vars: QUERYFLUX_ADMIN_USER / QUERYFLUX_ADMIN_PASSWORD.
username: admin
password: admin
# When persistence.type is postgres: how often (seconds) to poll the DB and refresh the in-memory
# RouterChain + cluster/group state (default 30 if omitted). Set to 0 to disable polling only;
# config still reloads immediately after routing/cluster/group writes via the admin API.
# configReloadIntervalSecs: 60
# queryHistoryRetentionDays: 90
clusterGroups:
# trino-default:
# engine: trino
# maxRunningQueries: 100
# clusters:
# - name: trino-1
# endpoint: http://localhost:8081
duckdb-local:
engine: duckDb
maxRunningQueries: 4
clusters:
- name: duckdb-1
# databasePath: /tmp/queryflux.duckdb
translation:
errorOnUnsupported: false
# Optional Python scripts run after every sqlglot translation.
# Each script must define: def transform(ast, src, dst) -> None
# `ast` is a sqlglot AST to mutate in-place, `src`/`dst` are dialect names.
# Import sqlglot.expressions as needed (for example: `import sqlglot.expressions as exp`).
# pythonScripts:
# - |
# import sqlglot.expressions as exp
#
# def transform(ast, src, dst) -> None:
# # Athena has no catalog layer — strip catalog from 3-part table references.
# # hive.my_db.my_table → my_db.my_table
# if dst == "athena":
# for table in ast.find_all(exp.Table):
# table.set("catalog", None)
routers:
- type: protocolBased
postgresWire: trino-default
# Example: route only when ALL conditions match (AND)
# - type: compound
# combine: all
# conditions:
# - type: protocol
# protocol: mysqlWire
# - type: header
# headerName: X-Env
# headerValue: prod
# targetGroup: duckdb-local
routingFallback: duckdb-local