dataface 0.3.1.dev78__py3-none-any.whl → 0.3.2.dev22__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- d3_format/spec.py +45 -0
- dataface/DATAFACE_SYNTAX.md +1 -1
- dataface/agent_api/__init__.py +17 -2
- dataface/agent_api/_paths.py +25 -50
- dataface/agent_api/board_artifact.py +12 -2
- dataface/agent_api/describe.py +4 -9
- dataface/agent_api/docs/yaml-reference.md +64 -26
- dataface/agent_api/migrate.py +101 -0
- dataface/agent_api/project_session.py +13 -1
- dataface/agent_api/query.py +1 -6
- dataface/agent_api/validate.py +5 -10
- dataface/cli/_error_format.py +13 -0
- dataface/cli/_project.py +77 -0
- dataface/cli/commands/board_artifact.py +5 -5
- dataface/cli/commands/describe.py +5 -5
- dataface/cli/commands/mcp.py +14 -12
- dataface/cli/commands/migrate.py +51 -0
- dataface/cli/commands/query.py +6 -6
- dataface/cli/commands/render.py +21 -31
- dataface/cli/commands/search.py +6 -5
- dataface/cli/commands/serve.py +19 -9
- dataface/cli/commands/validate.py +6 -5
- dataface/cli/main.py +43 -4
- dataface/core/attribution.py +191 -0
- dataface/core/compile/__init__.py +4 -0
- dataface/core/compile/channel.py +232 -119
- dataface/core/compile/compiler.py +78 -13
- dataface/core/compile/face_warnings.py +24 -8
- dataface/core/compile/inherit_resolver.py +126 -64
- dataface/core/compile/introspection.py +28 -30
- dataface/core/compile/jinja.py +2 -1
- dataface/core/compile/label_data.py +154 -0
- dataface/core/compile/link_keys.py +127 -0
- dataface/core/compile/merge.py +45 -48
- dataface/core/compile/migrations.py +520 -0
- dataface/core/compile/models/chart/authored/_base.py +2 -15
- dataface/core/compile/models/chart/authored/point_map.py +1 -3
- dataface/core/compile/models/chart/normalized/_base.py +5 -4
- dataface/core/compile/models/chart/normalized/callout.py +2 -2
- dataface/core/compile/models/chart/resolved/_base.py +2 -2
- dataface/core/compile/models/chart/resolved/callout.py +1 -1
- dataface/core/compile/models/chart/resolved/pie.py +55 -1
- dataface/core/compile/models/config.py +6 -2
- dataface/core/compile/models/primitives.py +7 -13
- dataface/core/compile/models/query/authored.py +107 -37
- dataface/core/compile/models/query/normalized.py +28 -2
- dataface/core/compile/models/refs.py +5 -1
- dataface/core/compile/models/source.py +91 -8
- dataface/core/compile/models/style/resolved/__init__.py +1 -1
- dataface/core/compile/models/style/resolved/_base.py +11 -14
- dataface/core/compile/models/style/resolved/_cascade.py +16 -5
- dataface/core/compile/models/style/resolved/area.py +2 -2
- dataface/core/compile/models/style/resolved/line.py +2 -2
- dataface/core/compile/models/style/resolved/pie.py +2 -3
- dataface/core/compile/models/style/resolved/table.py +8 -3
- dataface/core/compile/models/style/theme/marks.py +1 -1
- dataface/core/compile/models/variable/authored.py +2 -2
- dataface/core/compile/normalize_charts.py +5 -8
- dataface/core/compile/normalize_queries.py +59 -4
- dataface/core/compile/normalize_variables.py +2 -2
- dataface/core/compile/palette.py +1 -1
- dataface/core/compile/parser.py +4 -1
- dataface/core/compile/resolve/__init__.py +47 -7
- dataface/core/compile/resolve/_axes.py +313 -0
- dataface/core/compile/resolve/_channels.py +120 -0
- dataface/core/compile/resolve/_chart_rows.py +29 -0
- dataface/core/compile/resolve/_dispatch.py +316 -0
- dataface/core/compile/resolve/_domain.py +465 -0
- dataface/core/compile/resolve/_kwargs.py +238 -0
- dataface/core/compile/resolve/_layers.py +241 -0
- dataface/core/compile/resolve/_links.py +66 -0
- dataface/core/compile/resolve/_marks.py +141 -0
- dataface/core/compile/resolve/_palette.py +187 -0
- dataface/core/compile/resolve/_table.py +131 -0
- dataface/core/compile/resolve/area.py +502 -0
- dataface/core/compile/resolve/bar.py +412 -0
- dataface/core/compile/resolve/geo.py +416 -0
- dataface/core/compile/resolve/heatmap.py +113 -0
- dataface/core/compile/resolve/line.py +314 -0
- dataface/core/compile/resolve/pie.py +287 -0
- dataface/core/compile/resolve/pie_attachment.py +170 -0
- dataface/core/compile/resolve/scatter.py +222 -0
- dataface/core/compile/resolve/simple.py +158 -0
- dataface/core/compile/schema_renderers/json_schema.py +12 -3
- dataface/core/compile/single_series_allocation.py +1 -1
- dataface/core/compile/source_map.py +96 -59
- dataface/core/compile/sql_guard.py +80 -22
- dataface/core/compile/style_cascade.py +45 -10
- dataface/core/compile/variables.py +82 -2
- dataface/core/compile/vega_lite/__init__.py +2 -1
- dataface/core/dashboard.py +5 -9
- dataface/core/defaults/default_config.yml +6 -0
- dataface/core/defaults/themes/editorial.yaml +2 -2
- dataface/core/defaults/themes/neon.yaml +1 -1
- dataface/core/defaults/themes/plain.yaml +2 -2
- dataface/core/defaults/themes/stark.yaml +1 -1
- dataface/core/defaults/themes/vivid.yaml +5 -5
- dataface/core/diagnostics/__init__.py +7 -1
- dataface/core/diagnostics/ansi.py +22 -0
- dataface/core/diagnostics/codes_compile.py +32 -1
- dataface/core/diagnostics/codes_execute.py +57 -8
- dataface/core/diagnostics/codes_query.py +7 -5
- dataface/core/diagnostics/codes_render.py +36 -23
- dataface/core/diagnostics/execution.py +16 -2
- dataface/core/execute/adapters/adapter_registry.py +29 -6
- dataface/core/execute/adapters/base.py +9 -5
- dataface/core/execute/adapters/dbt_adapter.py +95 -40
- dataface/core/execute/adapters/dbt_adapter_factory.py +36 -6
- dataface/core/execute/adapters/dbt_utils.py +83 -4
- dataface/core/execute/adapters/duckdb_adapter.py +22 -4
- dataface/core/execute/adapters/http_adapter.py +2 -2
- dataface/core/execute/adapters/native_attribution.py +66 -0
- dataface/core/execute/adapters/query_header.py +96 -0
- dataface/core/execute/adapters/schema_adapter.py +2 -2
- dataface/core/execute/adapters/sql_adapter.py +43 -68
- dataface/core/execute/adapters/sqlite_adapter.py +20 -6
- dataface/core/execute/adapters/values_adapter.py +2 -2
- dataface/core/execute/cache_keys.py +10 -4
- dataface/core/execute/chart_data_provider.py +1 -1
- dataface/core/execute/chart_resolution.py +278 -0
- dataface/core/execute/dbt_jinja.py +9 -0
- dataface/core/execute/recording.py +6 -4
- dataface/core/execute/source_resolver.py +23 -12
- dataface/core/font_measure.py +108 -0
- dataface/core/fonts.py +218 -49
- dataface/core/registered_views/variable_planner.py +7 -74
- dataface/core/render/board_replay.py +15 -0
- dataface/core/render/chart/arc_attached_table.py +19 -368
- dataface/core/render/chart/auto_link.py +3 -3
- dataface/core/render/chart/callout.py +1 -1
- dataface/core/render/chart/data_table_attachment.py +14 -3
- dataface/core/render/chart/emitters/_cartesian.py +8 -0
- dataface/core/render/chart/emitters/_channels.py +49 -9
- dataface/core/render/chart/emitters/_label_overlap.py +5 -1
- dataface/core/render/chart/emitters/_measured_label_padding.py +1 -1
- dataface/core/render/chart/emitters/_overlay.py +1 -1
- dataface/core/render/chart/emitters/area.py +23 -10
- dataface/core/render/chart/emitters/bar.py +18 -5
- dataface/core/render/chart/emitters/heatmap.py +1 -0
- dataface/core/render/chart/emitters/line.py +28 -12
- dataface/core/render/chart/emitters/pie.py +62 -53
- dataface/core/render/chart/features/endpoint_labels.py +1 -1
- dataface/core/render/chart/features/value_labels.py +1 -1
- dataface/core/render/chart/kpi.py +2 -2
- dataface/core/render/chart/table.py +48 -88
- dataface/core/render/chart/table_support.py +7 -22
- dataface/core/render/chart/time_unit_detect.py +129 -5
- dataface/core/render/chart/title_overflow.py +1 -1
- dataface/core/render/chart/type_inference.py +111 -104
- dataface/core/render/chart/vega_lite.py +47 -245
- dataface/core/render/controls.py +5 -5
- dataface/core/render/face_resolve.py +64 -17
- dataface/core/render/face_to_dict.py +1 -1
- dataface/core/render/faces.py +87 -43
- dataface/core/render/font_support.py +64 -103
- dataface/core/render/fonts/SourceSerif4Variable.ttf +0 -0
- dataface/core/render/fonts/{_emoji_font_face.css → _font_face.css} +1 -0
- dataface/core/render/layout_sizing.py +147 -125
- dataface/core/render/renderer.py +22 -2
- dataface/core/render/sizing.py +26 -57
- dataface/core/render/svg_utils.py +2 -3
- dataface/core/render/template_loader.py +7 -9
- dataface/core/render/templates/page.css +2 -2
- dataface/core/render/templates/svg/styles.css +1 -1
- dataface/core/render/terminal.py +5 -14
- dataface/core/render/terminal_charts.py +45 -46
- dataface/core/render/terminal_text.py +1 -7
- dataface/core/render/variables_strip.py +7 -6
- dataface/core/render/warnings/value_labels_crowd_width.py +1 -1
- dataface/core/serve/server.py +2 -2
- dataface/data/schemas/board-resolved/board-resolved.schema.json +581 -252
- dataface/data/schemas/yaml/0.3.1.json +1 -0
- dataface/data/schemas/yaml/manifest.json +7 -0
- dataface/integrations/highlighting.py +2 -2
- {dataface-0.3.1.dev78.dist-info → dataface-0.3.2.dev22.dist-info}/METADATA +3 -2
- {dataface-0.3.1.dev78.dist-info → dataface-0.3.2.dev22.dist-info}/RECORD +186 -159
- mdsvg/__init__.py +5 -3
- mdsvg/fonts.py +130 -35
- mdsvg/parser.py +108 -51
- mdsvg/renderer.py +300 -43
- mdsvg/style.py +18 -3
- mdsvg/types.py +8 -1
- dataface/core/compile/resolve/_resolve.py +0 -3324
- dataface/core/registered_views/link_keys.py +0 -45
- dataface/core/render/chart/labels.py +0 -76
- dataface/core/render/font_measurement.py +0 -35
- dataface/core/render/fonts/SourceSerif4-Regular.ttf +0 -0
- dataface/core/render/shared_y_datasets.py +0 -33
- dataface/core/render/stable_domain.py +0 -365
- /dataface/data/highlighting/{face/v1.json → face.json} +0 -0
- {dataface-0.3.1.dev78.dist-info → dataface-0.3.2.dev22.dist-info}/WHEEL +0 -0
- {dataface-0.3.1.dev78.dist-info → dataface-0.3.2.dev22.dist-info}/entry_points.txt +0 -0
- {dataface-0.3.1.dev78.dist-info → dataface-0.3.2.dev22.dist-info}/licenses/LICENSE +0 -0
d3_format/spec.py
CHANGED
|
@@ -49,6 +49,51 @@ class FormatSpec:
|
|
|
49
49
|
trim: bool = False # ~ flag
|
|
50
50
|
type: str = "" # "" means default (g-ish) behavior
|
|
51
51
|
|
|
52
|
+
def __str__(self) -> str:
|
|
53
|
+
"""Serialize back to a d3-format spec string, in grammar order.
|
|
54
|
+
|
|
55
|
+
Omits every default-valued token, so a parsed spec serializes back to
|
|
56
|
+
something an author would write rather than a fully-explicit
|
|
57
|
+
expansion. ``zero`` implies ``fill == "0"`` and ``align == "="`` (the
|
|
58
|
+
collapse in ``parse``), so the zero-pad flag is emitted alone rather
|
|
59
|
+
than alongside a redundant ``0=`` fill and align.
|
|
60
|
+
|
|
61
|
+
Raises:
|
|
62
|
+
ValueError: If ``zero`` is set but ``fill``/``align`` have been
|
|
63
|
+
mutated away from ``"0"``/``"="``. The d3 grammar cannot
|
|
64
|
+
express that combination -- ``parse`` collapses ``zero`` back
|
|
65
|
+
to ``fill="0"``, ``align="="`` unconditionally -- so silently
|
|
66
|
+
keeping the flag and dropping the fill would misrepresent the
|
|
67
|
+
spec. Clear ``zero`` first if an explicit fill/align is wanted.
|
|
68
|
+
"""
|
|
69
|
+
if self.zero and (self.fill != "0" or self.align != "="):
|
|
70
|
+
raise ValueError(
|
|
71
|
+
"FormatSpec has zero=True with fill="
|
|
72
|
+
f"{self.fill!r}, align={self.align!r}; the d3 grammar can "
|
|
73
|
+
"only express zero-pad as fill='0', align='='. Clear zero "
|
|
74
|
+
"if you want this fill/align combination."
|
|
75
|
+
)
|
|
76
|
+
tokens: list[str] = []
|
|
77
|
+
if not self.zero and (self.fill != " " or self.align != ">"):
|
|
78
|
+
tokens.append(self.fill)
|
|
79
|
+
tokens.append(self.align)
|
|
80
|
+
if self.sign != "-":
|
|
81
|
+
tokens.append(self.sign)
|
|
82
|
+
if self.symbol:
|
|
83
|
+
tokens.append(self.symbol)
|
|
84
|
+
if self.zero:
|
|
85
|
+
tokens.append("0")
|
|
86
|
+
if self.width is not None:
|
|
87
|
+
tokens.append(str(self.width))
|
|
88
|
+
if self.comma:
|
|
89
|
+
tokens.append(",")
|
|
90
|
+
if self.precision is not None:
|
|
91
|
+
tokens.append(f".{self.precision}")
|
|
92
|
+
if self.trim:
|
|
93
|
+
tokens.append("~")
|
|
94
|
+
tokens.append(self.type)
|
|
95
|
+
return "".join(tokens)
|
|
96
|
+
|
|
52
97
|
|
|
53
98
|
def parse(spec: str) -> FormatSpec:
|
|
54
99
|
"""Parse a d3-format spec string into a FormatSpec.
|
dataface/DATAFACE_SYNTAX.md
CHANGED
|
@@ -394,7 +394,7 @@ queries:
|
|
|
394
394
|
|
|
395
395
|
# Inline values (no database)
|
|
396
396
|
sample:
|
|
397
|
-
type: values # Optional —
|
|
397
|
+
type: values # Optional — implied by `rows:`, `columns:`, or `values:`
|
|
398
398
|
columns: [name, score]
|
|
399
399
|
values:
|
|
400
400
|
- [Alice, 92.4]
|
dataface/agent_api/__init__.py
CHANGED
|
@@ -37,6 +37,9 @@ CLI/MCP files that contain logic beyond parse-and-dispatch.
|
|
|
37
37
|
"""
|
|
38
38
|
|
|
39
39
|
from dataface.agent_api import skills as skills
|
|
40
|
+
from dataface.agent_api._paths import (
|
|
41
|
+
project_sources_for_face as project_sources_for_face,
|
|
42
|
+
)
|
|
40
43
|
from dataface.agent_api.describe import (
|
|
41
44
|
DescribeFaceArgs,
|
|
42
45
|
DescribeFaceResult,
|
|
@@ -47,6 +50,11 @@ from dataface.agent_api.init import (
|
|
|
47
50
|
InitResult as InitResult,
|
|
48
51
|
init_project as init_project,
|
|
49
52
|
)
|
|
53
|
+
from dataface.agent_api.migrate import (
|
|
54
|
+
MigrateError as MigrateError,
|
|
55
|
+
MigrateSummary as MigrateSummary,
|
|
56
|
+
migrate_paths as migrate_paths,
|
|
57
|
+
)
|
|
50
58
|
from dataface.agent_api.project_session import ProjectSession as ProjectSession
|
|
51
59
|
from dataface.agent_api.query import QueryFaceResult, query_face
|
|
52
60
|
from dataface.agent_api.schema_hints import (
|
|
@@ -61,6 +69,7 @@ from dataface.agent_api.validate_query import (
|
|
|
61
69
|
QueryDiagnostic as QueryDiagnostic,
|
|
62
70
|
validate_query as validate_query,
|
|
63
71
|
)
|
|
72
|
+
from dataface.core.attribution import set_surface as set_surface
|
|
64
73
|
from dataface.core.compile.compiler import (
|
|
65
74
|
CompileResult as CompileResult,
|
|
66
75
|
compile as compile,
|
|
@@ -68,6 +77,7 @@ from dataface.core.compile.compiler import (
|
|
|
68
77
|
from dataface.core.compile.config import ProjectSourcesConfig as ProjectSourcesConfig
|
|
69
78
|
from dataface.core.dashboard import (
|
|
70
79
|
RenderedDashboard as RenderedDashboard,
|
|
80
|
+
RenderFormat as RenderFormat,
|
|
71
81
|
render_dashboard as render_dashboard,
|
|
72
82
|
)
|
|
73
83
|
from dataface.core.diagnostics import Diagnostic as Diagnostic
|
|
@@ -84,7 +94,7 @@ from dataface.core.execute.source_resolver import (
|
|
|
84
94
|
DefaultSourceResolver as DefaultSourceResolver,
|
|
85
95
|
SourceResolver as SourceResolver,
|
|
86
96
|
)
|
|
87
|
-
from dataface.core.fonts import
|
|
97
|
+
from dataface.core.fonts import get_fonts_dir as get_fonts_dir
|
|
88
98
|
from dataface.core.project import (
|
|
89
99
|
FaceFile as FaceFile,
|
|
90
100
|
InMemoryFace as InMemoryFace,
|
|
@@ -106,13 +116,17 @@ __all__ = [
|
|
|
106
116
|
"InMemoryFace",
|
|
107
117
|
"InitResult",
|
|
108
118
|
"LinkContext",
|
|
119
|
+
"MigrateError",
|
|
120
|
+
"MigrateSummary",
|
|
109
121
|
"Project",
|
|
110
122
|
"ProjectSession",
|
|
123
|
+
"set_surface",
|
|
111
124
|
"ProjectSourcesConfig",
|
|
112
125
|
"QueryDiagnostic",
|
|
113
126
|
"QueryFaceResult",
|
|
114
127
|
"RenderedDashboard",
|
|
115
128
|
"RenderError",
|
|
129
|
+
"RenderFormat",
|
|
116
130
|
"SchemaHints",
|
|
117
131
|
"Topic",
|
|
118
132
|
"ValidateDashboardArgs",
|
|
@@ -124,8 +138,9 @@ __all__ = [
|
|
|
124
138
|
"SourceResolver",
|
|
125
139
|
"WarehouseObserver",
|
|
126
140
|
"describe_face",
|
|
127
|
-
"
|
|
141
|
+
"get_fonts_dir",
|
|
128
142
|
"init_project",
|
|
143
|
+
"migrate_paths",
|
|
129
144
|
"query_face",
|
|
130
145
|
"render_dashboard",
|
|
131
146
|
"schema_hints",
|
dataface/agent_api/_paths.py
CHANGED
|
@@ -6,8 +6,9 @@ import os
|
|
|
6
6
|
from dataclasses import dataclass
|
|
7
7
|
from pathlib import Path, PurePosixPath
|
|
8
8
|
|
|
9
|
-
# tach-ignore(agent_api->cli: runtime host-type guard in
|
|
9
|
+
# tach-ignore(agent_api->cli: runtime host-type guard in resolve_face_or_error / _relpath_for_fs_location; the local-filesystem check needs a non-cli signal on Project — deferred)
|
|
10
10
|
from dataface.cli.filesystem_project import FilesystemProject
|
|
11
|
+
from dataface.core.compile.config import ProjectSourcesConfig
|
|
11
12
|
from dataface.core.diagnostics import (
|
|
12
13
|
ERR_FILE_NOT_FOUND,
|
|
13
14
|
ERR_INTERNAL,
|
|
@@ -27,54 +28,6 @@ from dataface.core.project_roots import (
|
|
|
27
28
|
)
|
|
28
29
|
|
|
29
30
|
|
|
30
|
-
def resolve_project_dir(project_dir: Path | None) -> Path:
|
|
31
|
-
"""Resolve the caller's `project_dir`, walking up from cwd when omitted.
|
|
32
|
-
|
|
33
|
-
Boundary helper: every agent_api / CLI callsite that today forwards a
|
|
34
|
-
possibly-None `project_dir` into a core helper routes through this so the
|
|
35
|
-
cwd read stays at the agent_api boundary, not inside `dataface/core`.
|
|
36
|
-
"""
|
|
37
|
-
if project_dir is not None:
|
|
38
|
-
return project_dir.resolve()
|
|
39
|
-
cwd = Path.cwd().resolve()
|
|
40
|
-
return find_dft_root(cwd) or cwd
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
def resolve_project_dir_from_paths(
|
|
44
|
-
paths: list[Path] | None, project_dir: Path | None
|
|
45
|
-
) -> Path:
|
|
46
|
-
"""Resolve project_dir for a multi-path CLI verb (validate / describe).
|
|
47
|
-
|
|
48
|
-
Explicit `--project-dir` wins. Otherwise, when all supplied paths are
|
|
49
|
-
absolute, walk up from the first path's parent to anchor on the project
|
|
50
|
-
that contains the file. Otherwise fall back to a cwd walk.
|
|
51
|
-
"""
|
|
52
|
-
if project_dir is not None:
|
|
53
|
-
return project_dir.resolve()
|
|
54
|
-
if paths and all(p.is_absolute() for p in paths):
|
|
55
|
-
anchor = paths[0].parent.resolve()
|
|
56
|
-
return find_dft_root(anchor) or anchor
|
|
57
|
-
return resolve_project_dir(None)
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
def no_project_hint(project: Project) -> str:
|
|
61
|
-
"""Return a hint string when no project marker is found, else empty string.
|
|
62
|
-
|
|
63
|
-
Only walks the local filesystem for a `FilesystemProject` — a non-filesystem
|
|
64
|
-
host's `project.root` is not a real on-disk project directory (it's the
|
|
65
|
-
server cwd), so there is no marker to walk up to and nothing to hint about.
|
|
66
|
-
"""
|
|
67
|
-
if not isinstance(project, FilesystemProject):
|
|
68
|
-
return ""
|
|
69
|
-
project_root = project.root
|
|
70
|
-
if find_dft_root(project_root) is not None:
|
|
71
|
-
return ""
|
|
72
|
-
return (
|
|
73
|
-
f" No Dataface project marker found at or above {project_root}."
|
|
74
|
-
f" Run from inside a Dataface project, or set project_dir."
|
|
75
|
-
)
|
|
76
|
-
|
|
77
|
-
|
|
78
31
|
def resolve_face_relpath(relpath: PurePosixPath, project: Project) -> ProjectPath:
|
|
79
32
|
"""Project-relative face identity -> ProjectPath, with the faces-first retry.
|
|
80
33
|
|
|
@@ -179,7 +132,6 @@ def resolve_face_or_error(path: Path, project: Project) -> FaceFile | Diagnostic
|
|
|
179
132
|
return DatafaceError.from_code(
|
|
180
133
|
ERR_FILE_NOT_FOUND,
|
|
181
134
|
path=resolved.relpath,
|
|
182
|
-
hint=no_project_hint(project),
|
|
183
135
|
).to_diagnostic(file=resolved.relpath)
|
|
184
136
|
if (
|
|
185
137
|
isinstance(project, FilesystemProject)
|
|
@@ -269,3 +221,26 @@ def build_yaml_render_context(
|
|
|
269
221
|
project_root=project_root,
|
|
270
222
|
output_dir=project_root,
|
|
271
223
|
)
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
def project_sources_for_face(face_path: Path) -> ProjectSourcesConfig:
|
|
227
|
+
"""The `sources:` registry of the project owning ``face_path``.
|
|
228
|
+
|
|
229
|
+
Editor surfaces compile buffer text rather than a file on disk, so they
|
|
230
|
+
have no `Project` to hand `compile()` — but without the source registry
|
|
231
|
+
compile cannot tell a query's SQL dialect, and dialect is what makes a SQL
|
|
232
|
+
parse finding trustworthy enough to report.
|
|
233
|
+
|
|
234
|
+
A face outside any project needs no special case: `find_project_root`
|
|
235
|
+
falls back to the starting directory, which has no `dataface.yml`, and the
|
|
236
|
+
registry comes back empty — compile then stays silent about SQL syntax
|
|
237
|
+
rather than guessing a dialect.
|
|
238
|
+
|
|
239
|
+
A `dataface.yml` that exists but does not load raises, deliberately. That
|
|
240
|
+
is a real fault at a real location, and swallowing it here would decide on
|
|
241
|
+
the author's behalf that a broken project config is invisible — while
|
|
242
|
+
handing the caller an empty registry indistinguishable from "no project".
|
|
243
|
+
Callers attribute the failure; they do not get to pretend it did not
|
|
244
|
+
happen.
|
|
245
|
+
"""
|
|
246
|
+
return FilesystemProject(find_project_root(face_path.parent, None)).sources
|
|
@@ -22,6 +22,7 @@ from pydantic import BaseModel, ConfigDict
|
|
|
22
22
|
|
|
23
23
|
from dataface.agent_api._paths import resolve_face_or_error
|
|
24
24
|
from dataface.core.compile import compile_file
|
|
25
|
+
from dataface.core.compile.variables import normalize_multiselect_values
|
|
25
26
|
from dataface.core.diagnostics import ERR_FILE_NOT_FOUND, Diagnostic
|
|
26
27
|
from dataface.core.diagnostics.base import DatafaceError
|
|
27
28
|
from dataface.core.execute.executor import Executor
|
|
@@ -70,7 +71,7 @@ class RenderBoardArtifactResult(BaseModel):
|
|
|
70
71
|
|
|
71
72
|
def _read_or_error(path: Path) -> bytes:
|
|
72
73
|
if not path.exists():
|
|
73
|
-
raise DatafaceError.from_code(ERR_FILE_NOT_FOUND, path=str(path)
|
|
74
|
+
raise DatafaceError.from_code(ERR_FILE_NOT_FOUND, path=str(path))
|
|
74
75
|
return path.read_bytes()
|
|
75
76
|
|
|
76
77
|
|
|
@@ -105,7 +106,16 @@ def emit_board_artifact(
|
|
|
105
106
|
face = compile_result.face
|
|
106
107
|
assert face is not None # compile_result.success guarantees this
|
|
107
108
|
|
|
108
|
-
|
|
109
|
+
# `emit-board` merges its own variables — it never goes through `render()`,
|
|
110
|
+
# whose prologue does this — and this dict is both rendered from and stored
|
|
111
|
+
# verbatim in the recording that `render_board_from_files` replays. `--var`
|
|
112
|
+
# values are always strings, so a scalar is the only shape a caller can
|
|
113
|
+
# supply for a multiselect here; unnarrowed, a bare `| join` would iterate
|
|
114
|
+
# it character by character.
|
|
115
|
+
merged_variables: dict[str, Any] = normalize_multiselect_values(
|
|
116
|
+
{**face.variable_defaults, **(variables or {})},
|
|
117
|
+
face.variable_registry or {},
|
|
118
|
+
)
|
|
109
119
|
|
|
110
120
|
executor = Executor(
|
|
111
121
|
face,
|
dataface/agent_api/describe.py
CHANGED
|
@@ -197,19 +197,15 @@ def describe_face(path: Path, *, project: Project) -> DescribeFaceResult:
|
|
|
197
197
|
],
|
|
198
198
|
)
|
|
199
199
|
|
|
200
|
-
return _describe_resolved(resolved
|
|
200
|
+
return _describe_resolved(resolved)
|
|
201
201
|
|
|
202
202
|
|
|
203
|
-
def _describe_resolved(
|
|
204
|
-
resolved: ProjectPath, *, project: Project
|
|
205
|
-
) -> DescribeFaceResult:
|
|
203
|
+
def _describe_resolved(resolved: ProjectPath) -> DescribeFaceResult:
|
|
206
204
|
"""Describe an already-resolved face path — no re-resolution."""
|
|
207
|
-
from dataface.agent_api._paths import no_project_hint
|
|
208
205
|
from dataface.core.compile.compiler import compile_file
|
|
209
206
|
from dataface.core.diagnostics.base import DatafaceError
|
|
210
207
|
|
|
211
208
|
if not resolved.exists():
|
|
212
|
-
hint = no_project_hint(project)
|
|
213
209
|
return DescribeFaceResult(
|
|
214
210
|
success=False,
|
|
215
211
|
path=Path(resolved.relpath),
|
|
@@ -217,7 +213,6 @@ def _describe_resolved(
|
|
|
217
213
|
DatafaceError.from_code(
|
|
218
214
|
ERR_FILE_NOT_FOUND,
|
|
219
215
|
path=resolved.relpath,
|
|
220
|
-
hint=hint,
|
|
221
216
|
).to_diagnostic()
|
|
222
217
|
],
|
|
223
218
|
)
|
|
@@ -349,7 +344,7 @@ def _describe_one_path(
|
|
|
349
344
|
]
|
|
350
345
|
|
|
351
346
|
if resolved.is_yaml:
|
|
352
|
-
return [_describe_resolved(resolved
|
|
347
|
+
return [_describe_resolved(resolved)]
|
|
353
348
|
|
|
354
349
|
faces = sorted(
|
|
355
350
|
pf
|
|
@@ -371,4 +366,4 @@ def _describe_one_path(
|
|
|
371
366
|
],
|
|
372
367
|
)
|
|
373
368
|
]
|
|
374
|
-
return [_describe_resolved(pf
|
|
369
|
+
return [_describe_resolved(pf) for pf in faces]
|
|
@@ -15,7 +15,7 @@ AuthoredFace (dataface) definition from YAML.
|
|
|
15
15
|
| `source` | str | ✓ | Default source name for all queries in this face. Inheritable via meta.yaml cascade. |
|
|
16
16
|
| `cache` | [Cache](#cache) | ✓ | Cache policy for every query in this dashboard, e.g. cache: 1h — queries inherit it and may refine it; cache: false opts the whole dashboard out. Inheritable via the meta.yaml cascade. |
|
|
17
17
|
| `variables` | dict[str, [Variable](#variable) \| VariableRef] | ✓ | Variable definitions for dynamic filtering and UI controls. |
|
|
18
|
-
| `queries` | dict[str, [SqlQuery](#sqlquery) \| [MetricflowQuery](#metricflowquery) \| [HttpQuery](#httpquery) \| [ValuesQuery](#valuesquery) \| [SchemaQuery](#schemaquery) \| [LookmlQuery](#lookmlquery) \| QueryRef] | ✓ | Named query definitions (SQL, CSV, MetricFlow, HTTP, etc.). |
|
|
18
|
+
| `queries` | dict[str, [SqlQuery](#sqlquery) \| [MetricflowQuery](#metricflowquery) \| [HttpQuery](#httpquery) \| [ValuesQuery](#valuesquery) \| [CompactValuesQuery](#compactvaluesquery) \| [SchemaQuery](#schemaquery) \| [LookmlQuery](#lookmlquery) \| [LookmlMergeQuery](#lookmlmergequery) \| QueryRef] | ✓ | Named query definitions (SQL, CSV, MetricFlow, HTTP, etc.). |
|
|
19
19
|
| `charts` | dict[str, [BarChart](#barchart) \| [LineChart](#linechart) \| [AreaChart](#areachart) \| [ScatterChart](#scatterchart) \| [HeatmapChart](#heatmapchart) \| [PieChart](#piechart) \| [KpiChart](#kpichart) \| [TableChart](#tablechart) \| [PointMapChart](#pointmapchart) \| [GeoshapeChart](#geoshapechart) \| [CalloutChart](#calloutchart) \| [SparkBarChart](#sparkbarchart) \| ChartRef] | ✓ | Named chart definitions. When no explicit layout is present, charts render as an implicit row layout in authored order. |
|
|
20
20
|
| `rows` | list[str \| [Face](#face) \| [BarChart](#barchart) \| [LineChart](#linechart) \| [AreaChart](#areachart) \| [ScatterChart](#scatterchart) \| [HeatmapChart](#heatmapchart) \| [PieChart](#piechart) \| [KpiChart](#kpichart) \| [TableChart](#tablechart) \| [PointMapChart](#pointmapchart) \| [GeoshapeChart](#geoshapechart) \| [CalloutChart](#calloutchart) \| [SparkBarChart](#sparkbarchart) \| [ForeachItem](#foreachitem) \| dict[str, [BarChart](#barchart) \| [LineChart](#linechart) \| [AreaChart](#areachart) \| [ScatterChart](#scatterchart) \| [HeatmapChart](#heatmapchart) \| [PieChart](#piechart) \| [KpiChart](#kpichart) \| [TableChart](#tablechart) \| [PointMapChart](#pointmapchart) \| [GeoshapeChart](#geoshapechart) \| [CalloutChart](#calloutchart) \| [SparkBarChart](#sparkbarchart)]] | ✓ | Vertical stack layout: list of chart names or inline chart/face definitions. |
|
|
21
21
|
| `cols` | list[str \| [Face](#face) \| [BarChart](#barchart) \| [LineChart](#linechart) \| [AreaChart](#areachart) \| [ScatterChart](#scatterchart) \| [HeatmapChart](#heatmapchart) \| [PieChart](#piechart) \| [KpiChart](#kpichart) \| [TableChart](#tablechart) \| [PointMapChart](#pointmapchart) \| [GeoshapeChart](#geoshapechart) \| [CalloutChart](#calloutchart) \| [SparkBarChart](#sparkbarchart) \| [ForeachItem](#foreachitem) \| dict[str, [BarChart](#barchart) \| [LineChart](#linechart) \| [AreaChart](#areachart) \| [ScatterChart](#scatterchart) \| [HeatmapChart](#heatmapchart) \| [PieChart](#piechart) \| [KpiChart](#kpichart) \| [TableChart](#tablechart) \| [PointMapChart](#pointmapchart) \| [GeoshapeChart](#geoshapechart) \| [CalloutChart](#calloutchart) \| [SparkBarChart](#sparkbarchart)]] | ✓ | Horizontal layout: list of chart names or inline chart/face definitions. |
|
|
@@ -55,7 +55,7 @@ Variable definition from YAML.
|
|
|
55
55
|
| `visible` | bool | ✓ | When False, the variable is not rendered in the UI but can still be set via URL params. |
|
|
56
56
|
| `enabled` | bool \| str \| [SingleRowBoolProbe](#singlerowboolprobe) | ✓ | Enable this control. Accepts: static bool; a variable name or Jinja boolean expression string (no {{ }} required — bare names auto-wrap); or a {query, column} form that reads a single boolean cell from a named query. None = enabled. Absent variable in a string expression raises (use a default). |
|
|
57
57
|
| `column` | str | ✓ | Column name in the query result to use as option values. |
|
|
58
|
-
| `query` | str \| [SqlQuery](#sqlquery) \| [MetricflowQuery](#metricflowquery) \| [HttpQuery](#httpquery) \| [ValuesQuery](#valuesquery) \| [SchemaQuery](#schemaquery) \| [LookmlQuery](#lookmlquery) | ✓ | Query name or inline query definition for populating options. |
|
|
58
|
+
| `query` | str \| [SqlQuery](#sqlquery) \| [MetricflowQuery](#metricflowquery) \| [HttpQuery](#httpquery) \| [ValuesQuery](#valuesquery) \| [CompactValuesQuery](#compactvaluesquery) \| [SchemaQuery](#schemaquery) \| [LookmlQuery](#lookmlquery) \| [LookmlMergeQuery](#lookmlmergequery) | ✓ | Query name or inline query definition for populating options. |
|
|
59
59
|
| `dimension` | str | ✓ | MetricFlow dimension name for populating options. |
|
|
60
60
|
| `measure` | str | ✓ | MetricFlow measure name for populating options. |
|
|
61
61
|
| `model` | str | ✓ | dbt model name for populating options. |
|
|
@@ -104,12 +104,12 @@ REST API query.
|
|
|
104
104
|
|
|
105
105
|
| Field | Type | Optional | Description |
|
|
106
106
|
|-------|------|:--------:|-------------|
|
|
107
|
+
| `url` | str | | HTTP endpoint URL for REST API queries. |
|
|
107
108
|
| `source` | str \| dict[str, Any] | ✓ | Source name reference, or an inline file path (e.g. `./data/sales.csv`). File paths are detected by `/` or data file extension. An inline connection-bearing dict (`{type: postgres, ...}`) is rejected at compile time — reference a named source instead. |
|
|
108
109
|
| `description` | str | ✓ | Human-readable description of the query. Used by AI search and tooling. |
|
|
109
110
|
| `ignore` | list[str] | ✓ | Diagnostic codes to suppress for this query (e.g., ['WARN-FANOUT-RISK', 'WARN-REAGGREGATION']). |
|
|
110
111
|
| `cache` | [Cache](#cache) | ✓ | Cache policy override for this query, e.g. cache: 5m — refines the policy inherited from the source and project scopes; cache: false opts out of result caching entirely. Queries with cache: false cannot be used as {{ queries.X.cache }} upstream references. |
|
|
111
112
|
| `type` | enum: "http" | ✓ | Query adapter type. |
|
|
112
|
-
| `url` | str | ✓ | HTTP endpoint URL for REST API queries. |
|
|
113
113
|
| `method` | enum: "GET", "POST", "PUT", "DELETE", "PATCH" | ✓ | HTTP method (GET, POST, PUT, DELETE, PATCH). |
|
|
114
114
|
| `headers` | dict[str, str] | ✓ | HTTP request headers. |
|
|
115
115
|
| `params` | dict[str, Any] | ✓ | HTTP query string parameters. |
|
|
@@ -119,18 +119,30 @@ REST API query.
|
|
|
119
119
|
|
|
120
120
|
<a id="valuesquery"></a>
|
|
121
121
|
## ValuesQuery
|
|
122
|
-
Inline
|
|
122
|
+
Inline data authored as a list of row mappings.
|
|
123
123
|
|
|
124
124
|
| Field | Type | Optional | Description |
|
|
125
125
|
|-------|------|:--------:|-------------|
|
|
126
|
+
| `rows` | list[dict[str, Any]] | | Inline data rows (list of row dicts). Use the compact columns-and-values form instead when row values are positional. |
|
|
127
|
+
| `source` | str \| dict[str, Any] | ✓ | Source name reference, or an inline file path (e.g. `./data/sales.csv`). File paths are detected by `/` or data file extension. An inline connection-bearing dict (`{type: postgres, ...}`) is rejected at compile time — reference a named source instead. |
|
|
128
|
+
| `description` | str | ✓ | Human-readable description of the query. Used by AI search and tooling. |
|
|
129
|
+
| `ignore` | list[str] | ✓ | Diagnostic codes to suppress for this query (e.g., ['WARN-FANOUT-RISK', 'WARN-REAGGREGATION']). |
|
|
130
|
+
| `cache` | [Cache](#cache) | ✓ | Cache policy override for this query, e.g. cache: 5m — refines the policy inherited from the source and project scopes; cache: false opts out of result caching entirely. Queries with cache: false cannot be used as {{ queries.X.cache }} upstream references. |
|
|
131
|
+
| `type` | enum: "values" | ✓ | Query adapter type. |
|
|
132
|
+
|
|
133
|
+
<a id="compactvaluesquery"></a>
|
|
134
|
+
## CompactValuesQuery
|
|
135
|
+
Inline data authored as column names plus positional row values.
|
|
136
|
+
|
|
137
|
+
| Field | Type | Optional | Description |
|
|
138
|
+
|-------|------|:--------:|-------------|
|
|
139
|
+
| `columns` | list[str] | | Column names for the compact syntax. Every compact values query also requires values. |
|
|
140
|
+
| `values` | list[list[Any]] | | Inline row-oriented data (list of lists) for the compact syntax. Every compact values query also requires columns. |
|
|
126
141
|
| `source` | str \| dict[str, Any] | ✓ | Source name reference, or an inline file path (e.g. `./data/sales.csv`). File paths are detected by `/` or data file extension. An inline connection-bearing dict (`{type: postgres, ...}`) is rejected at compile time — reference a named source instead. |
|
|
127
142
|
| `description` | str | ✓ | Human-readable description of the query. Used by AI search and tooling. |
|
|
128
143
|
| `ignore` | list[str] | ✓ | Diagnostic codes to suppress for this query (e.g., ['WARN-FANOUT-RISK', 'WARN-REAGGREGATION']). |
|
|
129
144
|
| `cache` | [Cache](#cache) | ✓ | Cache policy override for this query, e.g. cache: 5m — refines the policy inherited from the source and project scopes; cache: false opts out of result caching entirely. Queries with cache: false cannot be used as {{ queries.X.cache }} upstream references. |
|
|
130
145
|
| `type` | enum: "values" | ✓ | Query adapter type. |
|
|
131
|
-
| `rows` | list[dict[str, Any]] | ✓ | Inline data rows (list of row dicts). |
|
|
132
|
-
| `values` | list[list[Any]] | ✓ | Inline row-oriented data (list of lists) for the compact 'columns + values' syntax. |
|
|
133
|
-
| `columns` | list[str] | ✓ | Column names for the compact 'columns + values' syntax. |
|
|
134
146
|
|
|
135
147
|
<a id="schemaquery"></a>
|
|
136
148
|
## SchemaQuery
|
|
@@ -149,17 +161,40 @@ dbt source schema query.
|
|
|
149
161
|
|
|
150
162
|
<a id="lookmlquery"></a>
|
|
151
163
|
## LookmlQuery
|
|
152
|
-
LookML
|
|
164
|
+
LookML query rooted at one explore.
|
|
165
|
+
|
|
166
|
+
| Field | Type | Optional | Description |
|
|
167
|
+
|-------|------|:--------:|-------------|
|
|
168
|
+
| `explore` | str | | LookML explore name. Presence of this key infers type: lookml. Use a merge query instead to combine multiple sources. |
|
|
169
|
+
| `source` | str \| dict[str, Any] | ✓ | Source name reference, or an inline file path (e.g. `./data/sales.csv`). File paths are detected by `/` or data file extension. An inline connection-bearing dict (`{type: postgres, ...}`) is rejected at compile time — reference a named source instead. |
|
|
170
|
+
| `description` | str | ✓ | Human-readable description of the query. Used by AI search and tooling. |
|
|
171
|
+
| `ignore` | list[str] | ✓ | Diagnostic codes to suppress for this query (e.g., ['WARN-FANOUT-RISK', 'WARN-REAGGREGATION']). |
|
|
172
|
+
| `cache` | [Cache](#cache) | ✓ | Cache policy override for this query, e.g. cache: 5m — refines the policy inherited from the source and project scopes; cache: false opts out of result caching entirely. Queries with cache: false cannot be used as {{ queries.X.cache }} upstream references. |
|
|
173
|
+
| `type` | enum: "lookml" | ✓ | Query adapter type. |
|
|
174
|
+
| `fields` | list[str] | ✓ | Qualified 'view.field' refs to select. Optional at authoring time: collected from chart channels when absent. |
|
|
175
|
+
| `sorts` | list[str] | ✓ | Looker sort clauses, e.g. ['view.field', 'view.other desc']. Lowered to ORDER BY via likeml. |
|
|
176
|
+
| `pivots` | list[str] | ✓ | Qualified 'view.field' refs to pivot on. |
|
|
177
|
+
| `pivots_unwrapped` | bool | ✓ | Which of Looker's two pivot SQL shapes to emit: False/None = wrapped (5-layer DENSE_RANK), True = plain GROUP BY. |
|
|
178
|
+
| `total` | bool | ✓ | Looker grand-totals flag. |
|
|
179
|
+
| `subtotals` | list[str] | ✓ | Dimension refs to subtotal via GROUP BY ROLLUP. |
|
|
180
|
+
| `filter_expression` | str | ✓ | Looker query-level free-form boolean filter over ${view.field} refs. |
|
|
181
|
+
| `dynamic_fields` | list[dict[str, Any]] | ✓ | Looker dynamic fields: custom measures / custom dimensions synthesized into SQL. Table calculations compose as a derived wrapper query, not here. |
|
|
182
|
+
| `limit` | int | ✓ | Maximum number of rows returned. |
|
|
183
|
+
| `column_limit` | int | ✓ | Looker column_limit — caps wrapped-pivot columns. |
|
|
184
|
+
| `filters` | dict[str, Any] | ✓ | RAW Looker filter expressions keyed by 'view.field' (e.g. "13 months", "gold") — translated to SQL predicates by likeml. |
|
|
185
|
+
|
|
186
|
+
<a id="lookmlmergequery"></a>
|
|
187
|
+
## LookmlMergeQuery
|
|
188
|
+
LookML query that merges multiple sources.
|
|
153
189
|
|
|
154
190
|
| Field | Type | Optional | Description |
|
|
155
191
|
|-------|------|:--------:|-------------|
|
|
192
|
+
| `merge` | list[dict[str, Any]] | | LookML merge sources — a list of source specs. Each is either an explore spec ({explore, fields, filters?, merge_on?}) or a query reference ({query, columns, merge_on?}) for a derived source such as a table-calc wrapper. First is the primary; each secondary's `merge_on` maps its key to the primary's. Presence of this key infers type: lookml. Compiled to a FULL OUTER JOIN via likeml. |
|
|
156
193
|
| `source` | str \| dict[str, Any] | ✓ | Source name reference, or an inline file path (e.g. `./data/sales.csv`). File paths are detected by `/` or data file extension. An inline connection-bearing dict (`{type: postgres, ...}`) is rejected at compile time — reference a named source instead. |
|
|
157
194
|
| `description` | str | ✓ | Human-readable description of the query. Used by AI search and tooling. |
|
|
158
195
|
| `ignore` | list[str] | ✓ | Diagnostic codes to suppress for this query (e.g., ['WARN-FANOUT-RISK', 'WARN-REAGGREGATION']). |
|
|
159
196
|
| `cache` | [Cache](#cache) | ✓ | Cache policy override for this query, e.g. cache: 5m — refines the policy inherited from the source and project scopes; cache: false opts out of result caching entirely. Queries with cache: false cannot be used as {{ queries.X.cache }} upstream references. |
|
|
160
197
|
| `type` | enum: "lookml" | ✓ | Query adapter type. |
|
|
161
|
-
| `explore` | str | ✓ | LookML explore name. Presence of this key infers type: lookml. |
|
|
162
|
-
| `merge` | list[dict[str, Any]] | ✓ | LookML merge sources — a list of source specs. Each is either an explore spec ({explore, fields, filters?, merge_on?}) or a query reference ({query, columns, merge_on?}) for a derived source such as a table-calc wrapper. First is the primary; each secondary's `merge_on` maps its key to the primary's. Presence of this key infers type: lookml. Compiled to a FULL OUTER JOIN via likeml. |
|
|
163
198
|
| `fields` | list[str] | ✓ | Qualified 'view.field' refs to select. Optional at authoring time: collected from chart channels when absent. |
|
|
164
199
|
| `sorts` | list[str] | ✓ | Looker sort clauses, e.g. ['view.field', 'view.other desc']. Lowered to ORDER BY via likeml. |
|
|
165
200
|
| `pivots` | list[str] | ✓ | Qualified 'view.field' refs to pivot on. |
|
|
@@ -182,7 +217,7 @@ Authored patch for bar and histogram charts.
|
|
|
182
217
|
| `conditional_formatting` | dict[str, [FieldConditionalFormatting](#fieldconditionalformatting)] | ✓ | Discrete rule-driven style overrides indexed by column name. |
|
|
183
218
|
| `id` | str | ✓ | Explicit chart ID (auto-generated from the chart's YAML key if omitted). |
|
|
184
219
|
| `description` | str | ✓ | Human-readable description used by AI search and context tooltips. |
|
|
185
|
-
| `query` | str \| [SqlQuery](#sqlquery) \| [MetricflowQuery](#metricflowquery) \| [HttpQuery](#httpquery) \| [ValuesQuery](#valuesquery) \| [SchemaQuery](#schemaquery) \| [LookmlQuery](#lookmlquery) \| QueryRef | ✓ | Named query reference, inline AuthoredQuery, or SQL string shorthand. |
|
|
220
|
+
| `query` | str \| [SqlQuery](#sqlquery) \| [MetricflowQuery](#metricflowquery) \| [HttpQuery](#httpquery) \| [ValuesQuery](#valuesquery) \| [CompactValuesQuery](#compactvaluesquery) \| [SchemaQuery](#schemaquery) \| [LookmlQuery](#lookmlquery) \| [LookmlMergeQuery](#lookmlmergequery) \| QueryRef | ✓ | Named query reference, inline AuthoredQuery, or SQL string shorthand. |
|
|
186
221
|
| `link` | str | ✓ | Click-through URL template for drill-down links. |
|
|
187
222
|
| `model` | str | ✓ | Semantic-layer entry point, two dot-joined names: 'model.explore' for a LookML source, or 'source.semantic_model' for a dbt_profile (MetricFlow) source. Channel fields name the model's fields directly; roles are inferred from the LookML catalog / dbt semantic manifest. Mutually exclusive with `query:`. |
|
|
188
223
|
| `warnings_ignore` | list[str] | ✓ | Codes of render warnings to suppress for this chart. |
|
|
@@ -211,7 +246,7 @@ Authored patch for line charts.
|
|
|
211
246
|
| `conditional_formatting` | dict[str, [FieldConditionalFormatting](#fieldconditionalformatting)] | ✓ | Discrete rule-driven style overrides indexed by column name. |
|
|
212
247
|
| `id` | str | ✓ | Explicit chart ID (auto-generated from the chart's YAML key if omitted). |
|
|
213
248
|
| `description` | str | ✓ | Human-readable description used by AI search and context tooltips. |
|
|
214
|
-
| `query` | str \| [SqlQuery](#sqlquery) \| [MetricflowQuery](#metricflowquery) \| [HttpQuery](#httpquery) \| [ValuesQuery](#valuesquery) \| [SchemaQuery](#schemaquery) \| [LookmlQuery](#lookmlquery) \| QueryRef | ✓ | Named query reference, inline AuthoredQuery, or SQL string shorthand. |
|
|
249
|
+
| `query` | str \| [SqlQuery](#sqlquery) \| [MetricflowQuery](#metricflowquery) \| [HttpQuery](#httpquery) \| [ValuesQuery](#valuesquery) \| [CompactValuesQuery](#compactvaluesquery) \| [SchemaQuery](#schemaquery) \| [LookmlQuery](#lookmlquery) \| [LookmlMergeQuery](#lookmlmergequery) \| QueryRef | ✓ | Named query reference, inline AuthoredQuery, or SQL string shorthand. |
|
|
215
250
|
| `link` | str | ✓ | Click-through URL template for drill-down links. |
|
|
216
251
|
| `model` | str | ✓ | Semantic-layer entry point, two dot-joined names: 'model.explore' for a LookML source, or 'source.semantic_model' for a dbt_profile (MetricFlow) source. Channel fields name the model's fields directly; roles are inferred from the LookML catalog / dbt semantic manifest. Mutually exclusive with `query:`. |
|
|
217
252
|
| `warnings_ignore` | list[str] | ✓ | Codes of render warnings to suppress for this chart. |
|
|
@@ -240,7 +275,7 @@ Authored patch for area charts.
|
|
|
240
275
|
| `conditional_formatting` | dict[str, [FieldConditionalFormatting](#fieldconditionalformatting)] | ✓ | Discrete rule-driven style overrides indexed by column name. |
|
|
241
276
|
| `id` | str | ✓ | Explicit chart ID (auto-generated from the chart's YAML key if omitted). |
|
|
242
277
|
| `description` | str | ✓ | Human-readable description used by AI search and context tooltips. |
|
|
243
|
-
| `query` | str \| [SqlQuery](#sqlquery) \| [MetricflowQuery](#metricflowquery) \| [HttpQuery](#httpquery) \| [ValuesQuery](#valuesquery) \| [SchemaQuery](#schemaquery) \| [LookmlQuery](#lookmlquery) \| QueryRef | ✓ | Named query reference, inline AuthoredQuery, or SQL string shorthand. |
|
|
278
|
+
| `query` | str \| [SqlQuery](#sqlquery) \| [MetricflowQuery](#metricflowquery) \| [HttpQuery](#httpquery) \| [ValuesQuery](#valuesquery) \| [CompactValuesQuery](#compactvaluesquery) \| [SchemaQuery](#schemaquery) \| [LookmlQuery](#lookmlquery) \| [LookmlMergeQuery](#lookmlmergequery) \| QueryRef | ✓ | Named query reference, inline AuthoredQuery, or SQL string shorthand. |
|
|
244
279
|
| `link` | str | ✓ | Click-through URL template for drill-down links. |
|
|
245
280
|
| `model` | str | ✓ | Semantic-layer entry point, two dot-joined names: 'model.explore' for a LookML source, or 'source.semantic_model' for a dbt_profile (MetricFlow) source. Channel fields name the model's fields directly; roles are inferred from the LookML catalog / dbt semantic manifest. Mutually exclusive with `query:`. |
|
|
246
281
|
| `warnings_ignore` | list[str] | ✓ | Codes of render warnings to suppress for this chart. |
|
|
@@ -269,7 +304,7 @@ Authored patch for scatter charts.
|
|
|
269
304
|
| `conditional_formatting` | dict[str, [FieldConditionalFormatting](#fieldconditionalformatting)] | ✓ | Discrete rule-driven style overrides indexed by column name. |
|
|
270
305
|
| `id` | str | ✓ | Explicit chart ID (auto-generated from the chart's YAML key if omitted). |
|
|
271
306
|
| `description` | str | ✓ | Human-readable description used by AI search and context tooltips. |
|
|
272
|
-
| `query` | str \| [SqlQuery](#sqlquery) \| [MetricflowQuery](#metricflowquery) \| [HttpQuery](#httpquery) \| [ValuesQuery](#valuesquery) \| [SchemaQuery](#schemaquery) \| [LookmlQuery](#lookmlquery) \| QueryRef | ✓ | Named query reference, inline AuthoredQuery, or SQL string shorthand. |
|
|
307
|
+
| `query` | str \| [SqlQuery](#sqlquery) \| [MetricflowQuery](#metricflowquery) \| [HttpQuery](#httpquery) \| [ValuesQuery](#valuesquery) \| [CompactValuesQuery](#compactvaluesquery) \| [SchemaQuery](#schemaquery) \| [LookmlQuery](#lookmlquery) \| [LookmlMergeQuery](#lookmlmergequery) \| QueryRef | ✓ | Named query reference, inline AuthoredQuery, or SQL string shorthand. |
|
|
273
308
|
| `link` | str | ✓ | Click-through URL template for drill-down links. |
|
|
274
309
|
| `model` | str | ✓ | Semantic-layer entry point, two dot-joined names: 'model.explore' for a LookML source, or 'source.semantic_model' for a dbt_profile (MetricFlow) source. Channel fields name the model's fields directly; roles are inferred from the LookML catalog / dbt semantic manifest. Mutually exclusive with `query:`. |
|
|
275
310
|
| `warnings_ignore` | list[str] | ✓ | Codes of render warnings to suppress for this chart. |
|
|
@@ -299,7 +334,7 @@ Authored patch for heatmap charts.
|
|
|
299
334
|
| `type` | enum: "heatmap" | | Heatmap chart type. |
|
|
300
335
|
| `id` | str | ✓ | Explicit chart ID (auto-generated from the chart's YAML key if omitted). |
|
|
301
336
|
| `description` | str | ✓ | Human-readable description used by AI search and context tooltips. |
|
|
302
|
-
| `query` | str \| [SqlQuery](#sqlquery) \| [MetricflowQuery](#metricflowquery) \| [HttpQuery](#httpquery) \| [ValuesQuery](#valuesquery) \| [SchemaQuery](#schemaquery) \| [LookmlQuery](#lookmlquery) \| QueryRef | ✓ | Named query reference, inline AuthoredQuery, or SQL string shorthand. |
|
|
337
|
+
| `query` | str \| [SqlQuery](#sqlquery) \| [MetricflowQuery](#metricflowquery) \| [HttpQuery](#httpquery) \| [ValuesQuery](#valuesquery) \| [CompactValuesQuery](#compactvaluesquery) \| [SchemaQuery](#schemaquery) \| [LookmlQuery](#lookmlquery) \| [LookmlMergeQuery](#lookmlmergequery) \| QueryRef | ✓ | Named query reference, inline AuthoredQuery, or SQL string shorthand. |
|
|
303
338
|
| `link` | str | ✓ | Click-through URL template for drill-down links. |
|
|
304
339
|
| `model` | str | ✓ | Semantic-layer entry point, two dot-joined names: 'model.explore' for a LookML source, or 'source.semantic_model' for a dbt_profile (MetricFlow) source. Channel fields name the model's fields directly; roles are inferred from the LookML catalog / dbt semantic manifest. Mutually exclusive with `query:`. |
|
|
305
340
|
| `warnings_ignore` | list[str] | ✓ | Codes of render warnings to suppress for this chart. |
|
|
@@ -328,7 +363,7 @@ Authored patch for pie and donut charts.
|
|
|
328
363
|
| `conditional_formatting` | dict[str, [FieldConditionalFormatting](#fieldconditionalformatting)] | ✓ | Discrete rule-driven style overrides indexed by column name. |
|
|
329
364
|
| `id` | str | ✓ | Explicit chart ID (auto-generated from the chart's YAML key if omitted). |
|
|
330
365
|
| `description` | str | ✓ | Human-readable description used by AI search and context tooltips. |
|
|
331
|
-
| `query` | str \| [SqlQuery](#sqlquery) \| [MetricflowQuery](#metricflowquery) \| [HttpQuery](#httpquery) \| [ValuesQuery](#valuesquery) \| [SchemaQuery](#schemaquery) \| [LookmlQuery](#lookmlquery) \| QueryRef | ✓ | Named query reference, inline AuthoredQuery, or SQL string shorthand. |
|
|
366
|
+
| `query` | str \| [SqlQuery](#sqlquery) \| [MetricflowQuery](#metricflowquery) \| [HttpQuery](#httpquery) \| [ValuesQuery](#valuesquery) \| [CompactValuesQuery](#compactvaluesquery) \| [SchemaQuery](#schemaquery) \| [LookmlQuery](#lookmlquery) \| [LookmlMergeQuery](#lookmlmergequery) \| QueryRef | ✓ | Named query reference, inline AuthoredQuery, or SQL string shorthand. |
|
|
332
367
|
| `link` | str | ✓ | Click-through URL template for drill-down links. |
|
|
333
368
|
| `model` | str | ✓ | Semantic-layer entry point, two dot-joined names: 'model.explore' for a LookML source, or 'source.semantic_model' for a dbt_profile (MetricFlow) source. Channel fields name the model's fields directly; roles are inferred from the LookML catalog / dbt semantic manifest. Mutually exclusive with `query:`. |
|
|
334
369
|
| `warnings_ignore` | list[str] | ✓ | Codes of render warnings to suppress for this chart. |
|
|
@@ -351,7 +386,7 @@ Authored patch for KPI (key performance indicator) charts.
|
|
|
351
386
|
| `conditional_formatting` | dict[str, [FieldConditionalFormatting](#fieldconditionalformatting)] | ✓ | Discrete rule-driven style overrides indexed by column name. |
|
|
352
387
|
| `id` | str | ✓ | Explicit chart ID (auto-generated from the chart's YAML key if omitted). |
|
|
353
388
|
| `description` | str | ✓ | Human-readable description used by AI search and context tooltips. |
|
|
354
|
-
| `query` | str \| [SqlQuery](#sqlquery) \| [MetricflowQuery](#metricflowquery) \| [HttpQuery](#httpquery) \| [ValuesQuery](#valuesquery) \| [SchemaQuery](#schemaquery) \| [LookmlQuery](#lookmlquery) \| QueryRef | ✓ | Named query reference, inline AuthoredQuery, or SQL string shorthand. |
|
|
389
|
+
| `query` | str \| [SqlQuery](#sqlquery) \| [MetricflowQuery](#metricflowquery) \| [HttpQuery](#httpquery) \| [ValuesQuery](#valuesquery) \| [CompactValuesQuery](#compactvaluesquery) \| [SchemaQuery](#schemaquery) \| [LookmlQuery](#lookmlquery) \| [LookmlMergeQuery](#lookmlmergequery) \| QueryRef | ✓ | Named query reference, inline AuthoredQuery, or SQL string shorthand. |
|
|
355
390
|
| `link` | str | ✓ | Click-through URL template for drill-down links. |
|
|
356
391
|
| `model` | str | ✓ | Semantic-layer entry point, two dot-joined names: 'model.explore' for a LookML source, or 'source.semantic_model' for a dbt_profile (MetricFlow) source. Channel fields name the model's fields directly; roles are inferred from the LookML catalog / dbt semantic manifest. Mutually exclusive with `query:`. |
|
|
357
392
|
| `warnings_ignore` | list[str] | ✓ | Codes of render warnings to suppress for this chart. |
|
|
@@ -371,7 +406,7 @@ Authored patch for table charts.
|
|
|
371
406
|
| `conditional_formatting` | dict[str, [FieldConditionalFormatting](#fieldconditionalformatting)] | ✓ | Discrete rule-driven style overrides indexed by column name. |
|
|
372
407
|
| `id` | str | ✓ | Explicit chart ID (auto-generated from the chart's YAML key if omitted). |
|
|
373
408
|
| `description` | str | ✓ | Human-readable description used by AI search and context tooltips. |
|
|
374
|
-
| `query` | str \| [SqlQuery](#sqlquery) \| [MetricflowQuery](#metricflowquery) \| [HttpQuery](#httpquery) \| [ValuesQuery](#valuesquery) \| [SchemaQuery](#schemaquery) \| [LookmlQuery](#lookmlquery) \| QueryRef | ✓ | Named query reference, inline AuthoredQuery, or SQL string shorthand. |
|
|
409
|
+
| `query` | str \| [SqlQuery](#sqlquery) \| [MetricflowQuery](#metricflowquery) \| [HttpQuery](#httpquery) \| [ValuesQuery](#valuesquery) \| [CompactValuesQuery](#compactvaluesquery) \| [SchemaQuery](#schemaquery) \| [LookmlQuery](#lookmlquery) \| [LookmlMergeQuery](#lookmlmergequery) \| QueryRef | ✓ | Named query reference, inline AuthoredQuery, or SQL string shorthand. |
|
|
375
410
|
| `link` | str | ✓ | Click-through URL template for drill-down links. |
|
|
376
411
|
| `model` | str | ✓ | Semantic-layer entry point, two dot-joined names: 'model.explore' for a LookML source, or 'source.semantic_model' for a dbt_profile (MetricFlow) source. Channel fields name the model's fields directly; roles are inferred from the LookML catalog / dbt semantic manifest. Mutually exclusive with `query:`. |
|
|
377
412
|
| `warnings_ignore` | list[str] | ✓ | Codes of render warnings to suppress for this chart. |
|
|
@@ -392,7 +427,7 @@ Authored patch for point_map and bubble_map charts.
|
|
|
392
427
|
| `conditional_formatting` | dict[str, [FieldConditionalFormatting](#fieldconditionalformatting)] | ✓ | Discrete rule-driven style overrides indexed by column name. |
|
|
393
428
|
| `id` | str | ✓ | Explicit chart ID (auto-generated from the chart's YAML key if omitted). |
|
|
394
429
|
| `description` | str | ✓ | Human-readable description used by AI search and context tooltips. |
|
|
395
|
-
| `query` | str \| [SqlQuery](#sqlquery) \| [MetricflowQuery](#metricflowquery) \| [HttpQuery](#httpquery) \| [ValuesQuery](#valuesquery) \| [SchemaQuery](#schemaquery) \| [LookmlQuery](#lookmlquery) \| QueryRef | ✓ | Named query reference, inline AuthoredQuery, or SQL string shorthand. |
|
|
430
|
+
| `query` | str \| [SqlQuery](#sqlquery) \| [MetricflowQuery](#metricflowquery) \| [HttpQuery](#httpquery) \| [ValuesQuery](#valuesquery) \| [CompactValuesQuery](#compactvaluesquery) \| [SchemaQuery](#schemaquery) \| [LookmlQuery](#lookmlquery) \| [LookmlMergeQuery](#lookmlmergequery) \| QueryRef | ✓ | Named query reference, inline AuthoredQuery, or SQL string shorthand. |
|
|
396
431
|
| `link` | str | ✓ | Click-through URL template for drill-down links. |
|
|
397
432
|
| `model` | str | ✓ | Semantic-layer entry point, two dot-joined names: 'model.explore' for a LookML source, or 'source.semantic_model' for a dbt_profile (MetricFlow) source. Channel fields name the model's fields directly; roles are inferred from the LookML catalog / dbt semantic manifest. Mutually exclusive with `query:`. |
|
|
398
433
|
| `warnings_ignore` | list[str] | ✓ | Codes of render warnings to suppress for this chart. |
|
|
@@ -409,7 +444,7 @@ Authored patch for point_map and bubble_map charts.
|
|
|
409
444
|
| `latitude` | str | ✓ | Column containing latitude values for point/bubble maps. |
|
|
410
445
|
| `longitude` | str | ✓ | Column containing longitude values for point/bubble maps. |
|
|
411
446
|
| `size` | str | ✓ | Data column used to scale bubble radius (quantitative). Only meaningful on bubble_map. |
|
|
412
|
-
| `basemap` | [BasemapConfig](#basemapconfig) | ✓ |
|
|
447
|
+
| `basemap` | [BasemapConfig](#basemapconfig) | ✓ | Styled geographic background layer. |
|
|
413
448
|
| `style` | [PointMapChartStyle](#pointmapchartstyle) | ✓ | Chart-local style overrides. |
|
|
414
449
|
|
|
415
450
|
<a id="geoshapechart"></a>
|
|
@@ -422,7 +457,7 @@ Authored patch for map and geoshape charts.
|
|
|
422
457
|
| `conditional_formatting` | dict[str, [FieldConditionalFormatting](#fieldconditionalformatting)] | ✓ | Discrete rule-driven style overrides indexed by column name. |
|
|
423
458
|
| `id` | str | ✓ | Explicit chart ID (auto-generated from the chart's YAML key if omitted). |
|
|
424
459
|
| `description` | str | ✓ | Human-readable description used by AI search and context tooltips. |
|
|
425
|
-
| `query` | str \| [SqlQuery](#sqlquery) \| [MetricflowQuery](#metricflowquery) \| [HttpQuery](#httpquery) \| [ValuesQuery](#valuesquery) \| [SchemaQuery](#schemaquery) \| [LookmlQuery](#lookmlquery) \| QueryRef | ✓ | Named query reference, inline AuthoredQuery, or SQL string shorthand. |
|
|
460
|
+
| `query` | str \| [SqlQuery](#sqlquery) \| [MetricflowQuery](#metricflowquery) \| [HttpQuery](#httpquery) \| [ValuesQuery](#valuesquery) \| [CompactValuesQuery](#compactvaluesquery) \| [SchemaQuery](#schemaquery) \| [LookmlQuery](#lookmlquery) \| [LookmlMergeQuery](#lookmlmergequery) \| QueryRef | ✓ | Named query reference, inline AuthoredQuery, or SQL string shorthand. |
|
|
426
461
|
| `link` | str | ✓ | Click-through URL template for drill-down links. |
|
|
427
462
|
| `model` | str | ✓ | Semantic-layer entry point, two dot-joined names: 'model.explore' for a LookML source, or 'source.semantic_model' for a dbt_profile (MetricFlow) source. Channel fields name the model's fields directly; roles are inferred from the LookML catalog / dbt semantic manifest. Mutually exclusive with `query:`. |
|
|
428
463
|
| `warnings_ignore` | list[str] | ✓ | Codes of render warnings to suppress for this chart. |
|
|
@@ -459,7 +494,7 @@ Authored patch for spark_bar charts (compact horizontal bars).
|
|
|
459
494
|
| `type` | enum: "spark_bar" | | SparkBar chart type. |
|
|
460
495
|
| `id` | str | ✓ | Explicit chart ID (auto-generated from the chart's YAML key if omitted). |
|
|
461
496
|
| `description` | str | ✓ | Human-readable description used by AI search and context tooltips. |
|
|
462
|
-
| `query` | str \| [SqlQuery](#sqlquery) \| [MetricflowQuery](#metricflowquery) \| [HttpQuery](#httpquery) \| [ValuesQuery](#valuesquery) \| [SchemaQuery](#schemaquery) \| [LookmlQuery](#lookmlquery) \| QueryRef | ✓ | Named query reference, inline AuthoredQuery, or SQL string shorthand. |
|
|
497
|
+
| `query` | str \| [SqlQuery](#sqlquery) \| [MetricflowQuery](#metricflowquery) \| [HttpQuery](#httpquery) \| [ValuesQuery](#valuesquery) \| [CompactValuesQuery](#compactvaluesquery) \| [SchemaQuery](#schemaquery) \| [LookmlQuery](#lookmlquery) \| [LookmlMergeQuery](#lookmlmergequery) \| QueryRef | ✓ | Named query reference, inline AuthoredQuery, or SQL string shorthand. |
|
|
463
498
|
| `link` | str | ✓ | Click-through URL template for drill-down links. |
|
|
464
499
|
| `model` | str | ✓ | Semantic-layer entry point, two dot-joined names: 'model.explore' for a LookML source, or 'source.semantic_model' for a dbt_profile (MetricFlow) source. Channel fields name the model's fields directly; roles are inferred from the LookML catalog / dbt semantic manifest. Mutually exclusive with `query:`. |
|
|
465
500
|
| `warnings_ignore` | list[str] | ✓ | Codes of render warnings to suppress for this chart. |
|
|
@@ -929,14 +964,11 @@ Authored overlay for TableChartStyle. Table chart style overrides layered on top
|
|
|
929
964
|
|
|
930
965
|
<a id="basemapconfig"></a>
|
|
931
966
|
## BasemapConfig
|
|
932
|
-
|
|
967
|
+
Styled geographic background layer for point_map and bubble_map charts.
|
|
933
968
|
|
|
934
969
|
| Field | Type | Optional | Description |
|
|
935
970
|
|-------|------|:--------:|-------------|
|
|
936
|
-
| `type` | str | ✓ | Tile provider type (e.g. 'mapbox', 'raster'). |
|
|
937
|
-
| `style` | str | ✓ | Tile style URL (e.g. Mapbox style URI). |
|
|
938
971
|
| `source` | str | ✓ | Named geographic boundary source (e.g. 'us-states') for overlay rendering. |
|
|
939
|
-
| `attribution` | str | ✓ | Attribution text for the tile provider. |
|
|
940
972
|
| `fill` | str | ✓ | Fill color for geographic boundary overlay. |
|
|
941
973
|
| `stroke` | str | ✓ | Stroke color for geographic boundary overlay. |
|
|
942
974
|
|
|
@@ -2820,6 +2852,7 @@ Postgres source configuration.
|
|
|
2820
2852
|
| `max_query_duration_seconds` | int | ✓ | Maximum execution time for one query in seconds. Overrides execution.max_query_duration_seconds for this source. |
|
|
2821
2853
|
| `lookml_path` | str | ✓ | Relative path to the directory of .lkml files backing this source's models. |
|
|
2822
2854
|
| `models` | dict[str, [LookMLModelConfig](#lookmlmodelconfig)] | ✓ | Named LookML model collections nested under this source. |
|
|
2855
|
+
| `attribution` | dict[str, str] | ✓ | Cost-attribution pairs sent with every query against this source, e.g. attribution: {team: analytics}. Emitted as BigQuery job labels and as a query comment elsewhere. Keys and values must match BigQuery's label rules ([a-z][a-z0-9_-]{0,62} / [a-z0-9_-]{0,63}). The dft_ prefix and the app key are reserved for the engine's own identity. |
|
|
2823
2856
|
| `port` | int | ✓ | Database port number. |
|
|
2824
2857
|
| `schema` | str | ✓ | Default schema for queries. |
|
|
2825
2858
|
| `connect_timeout` | int | ✓ | Connection timeout in seconds. |
|
|
@@ -2846,6 +2879,7 @@ Snowflake source configuration.
|
|
|
2846
2879
|
| `max_query_duration_seconds` | int | ✓ | Maximum execution time for one query in seconds. Overrides execution.max_query_duration_seconds for this source. |
|
|
2847
2880
|
| `lookml_path` | str | ✓ | Relative path to the directory of .lkml files backing this source's models. |
|
|
2848
2881
|
| `models` | dict[str, [LookMLModelConfig](#lookmlmodelconfig)] | ✓ | Named LookML model collections nested under this source. |
|
|
2882
|
+
| `attribution` | dict[str, str] | ✓ | Cost-attribution pairs sent with every query against this source, e.g. attribution: {team: analytics}. Emitted as BigQuery job labels and as a query comment elsewhere. Keys and values must match BigQuery's label rules ([a-z][a-z0-9_-]{0,62} / [a-z0-9_-]{0,63}). The dft_ prefix and the app key are reserved for the engine's own identity. |
|
|
2849
2883
|
| `user` | str | ✓ | Snowflake user name. Omit for token-based authentication when supported. |
|
|
2850
2884
|
| `password` | str | ✓ | Snowflake password. Omit when using OAuth or key-pair auth. |
|
|
2851
2885
|
| `warehouse` | str | ✓ | Snowflake virtual warehouse name. |
|
|
@@ -2887,6 +2921,7 @@ BigQuery source configuration.
|
|
|
2887
2921
|
| `max_query_duration_seconds` | int | ✓ | Maximum execution time for one query in seconds. Overrides execution.max_query_duration_seconds for this source. |
|
|
2888
2922
|
| `lookml_path` | str | ✓ | Relative path to the directory of .lkml files backing this source's models. |
|
|
2889
2923
|
| `models` | dict[str, [LookMLModelConfig](#lookmlmodelconfig)] | ✓ | Named LookML model collections nested under this source. |
|
|
2924
|
+
| `attribution` | dict[str, str] | ✓ | Cost-attribution pairs sent with every query against this source, e.g. attribution: {team: analytics}. Emitted as BigQuery job labels and as a query comment elsewhere. Keys and values must match BigQuery's label rules ([a-z][a-z0-9_-]{0,62} / [a-z0-9_-]{0,63}). The dft_ prefix and the app key are reserved for the engine's own identity. |
|
|
2890
2925
|
| `keyfile` | str | ✓ | Path to service account JSON key file. |
|
|
2891
2926
|
| `keyfile_json` | dict[str, str \| int \| float \| bool] | ✓ | Inline service account JSON dict. |
|
|
2892
2927
|
| `location` | str | ✓ | Dataset location (e.g. US, EU). |
|
|
@@ -2929,6 +2964,7 @@ Redshift source configuration.
|
|
|
2929
2964
|
| `max_query_duration_seconds` | int | ✓ | Maximum execution time for one query in seconds. Overrides execution.max_query_duration_seconds for this source. |
|
|
2930
2965
|
| `lookml_path` | str | ✓ | Relative path to the directory of .lkml files backing this source's models. |
|
|
2931
2966
|
| `models` | dict[str, [LookMLModelConfig](#lookmlmodelconfig)] | ✓ | Named LookML model collections nested under this source. |
|
|
2967
|
+
| `attribution` | dict[str, str] | ✓ | Cost-attribution pairs sent with every query against this source, e.g. attribution: {team: analytics}. Emitted as BigQuery job labels and as a query comment elsewhere. Keys and values must match BigQuery's label rules ([a-z][a-z0-9_-]{0,62} / [a-z0-9_-]{0,63}). The dft_ prefix and the app key are reserved for the engine's own identity. |
|
|
2932
2968
|
| `port` | int | ✓ | Redshift port number. |
|
|
2933
2969
|
| `schema` | str | ✓ | Default schema for queries. |
|
|
2934
2970
|
| `user` | str | ✓ | Redshift user name. Omit for IAM-based authentication when supported. |
|
|
@@ -2977,6 +3013,7 @@ MySQL source configuration.
|
|
|
2977
3013
|
| `max_query_duration_seconds` | int | ✓ | Maximum execution time for one query in seconds. Overrides execution.max_query_duration_seconds for this source. |
|
|
2978
3014
|
| `lookml_path` | str | ✓ | Relative path to the directory of .lkml files backing this source's models. |
|
|
2979
3015
|
| `models` | dict[str, [LookMLModelConfig](#lookmlmodelconfig)] | ✓ | Named LookML model collections nested under this source. |
|
|
3016
|
+
| `attribution` | dict[str, str] | ✓ | Cost-attribution pairs sent with every query against this source, e.g. attribution: {team: analytics}. Emitted as BigQuery job labels and as a query comment elsewhere. Keys and values must match BigQuery's label rules ([a-z][a-z0-9_-]{0,62} / [a-z0-9_-]{0,63}). The dft_ prefix and the app key are reserved for the engine's own identity. |
|
|
2980
3017
|
| `port` | int | ✓ | MySQL port number. |
|
|
2981
3018
|
| `schema` | str | ✓ | Default schema for queries. |
|
|
2982
3019
|
|
|
@@ -3073,6 +3110,7 @@ Reference to a dbt profile.
|
|
|
3073
3110
|
| `type` | enum: "dbt_profile" | | Source type identifier. |
|
|
3074
3111
|
| `profile` | str | | dbt profile name from profiles.yml. |
|
|
3075
3112
|
| `cache` | [Cache](#cache) | ✓ | Cache policy default for every query against this source, e.g. cache: 1h — queries inherit it and may refine it; cache: false opts them out. |
|
|
3113
|
+
| `attribution` | dict[str, str] | ✓ | Cost-attribution pairs sent with every query against this source, e.g. attribution: {team: analytics}. Emitted as BigQuery job labels and as a query comment elsewhere. Keys and values must match BigQuery's label rules ([a-z][a-z0-9_-]{0,62} / [a-z0-9_-]{0,63}). The dft_ prefix and the app key are reserved for the engine's own identity. |
|
|
3076
3114
|
| `target` | str | ✓ | dbt target to use; defaults to the profile's default target. |
|
|
3077
3115
|
| `profiles_dir` | str | ✓ | Directory containing profiles.yml, relative to the dataface project root. Use when profiles.yml is in a subdirectory (e.g. services/dbt). Resolution order: profiles_dir → $DBT_PROFILES_DIR → project root → ~/.dbt. |
|
|
3078
3116
|
|