tinybird 0.0.1.dev263__py3-none-any.whl → 0.0.1.dev265__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.
Potentially problematic release.
This version of tinybird might be problematic. Click here for more details.
- tinybird/tb/__cli__.py +2 -2
- tinybird/tb/client.py +3 -0
- tinybird/tb/modules/agent/banner.py +8 -35
- tinybird/tb/modules/agent/utils.py +1 -1
- tinybird/tb/modules/deployment_common.py +25 -0
- tinybird/tb/modules/materialization.py +10 -1
- {tinybird-0.0.1.dev263.dist-info → tinybird-0.0.1.dev265.dist-info}/METADATA +1 -1
- {tinybird-0.0.1.dev263.dist-info → tinybird-0.0.1.dev265.dist-info}/RECORD +11 -11
- {tinybird-0.0.1.dev263.dist-info → tinybird-0.0.1.dev265.dist-info}/WHEEL +0 -0
- {tinybird-0.0.1.dev263.dist-info → tinybird-0.0.1.dev265.dist-info}/entry_points.txt +0 -0
- {tinybird-0.0.1.dev263.dist-info → tinybird-0.0.1.dev265.dist-info}/top_level.txt +0 -0
tinybird/tb/__cli__.py
CHANGED
|
@@ -4,5 +4,5 @@ __description__ = 'Tinybird Command Line Tool'
|
|
|
4
4
|
__url__ = 'https://www.tinybird.co/docs/forward/commands'
|
|
5
5
|
__author__ = 'Tinybird'
|
|
6
6
|
__author_email__ = 'support@tinybird.co'
|
|
7
|
-
__version__ = '0.0.1.
|
|
8
|
-
__revision__ = '
|
|
7
|
+
__version__ = '0.0.1.dev265'
|
|
8
|
+
__revision__ = 'b723917'
|
tinybird/tb/client.py
CHANGED
|
@@ -547,12 +547,15 @@ class TinyB:
|
|
|
547
547
|
populate_subset: bool = False,
|
|
548
548
|
populate_condition: Optional[str] = None,
|
|
549
549
|
truncate: bool = True,
|
|
550
|
+
on_demand_compute: bool = False,
|
|
550
551
|
):
|
|
551
552
|
params: Dict[str, Any] = {"truncate": "true" if truncate else "false", "unlink_on_populate_error": "false"}
|
|
552
553
|
if populate_subset:
|
|
553
554
|
params.update({"populate_subset": populate_subset})
|
|
554
555
|
if populate_condition:
|
|
555
556
|
params.update({"populate_condition": populate_condition})
|
|
557
|
+
if on_demand_compute:
|
|
558
|
+
params.update({"on_demand_compute": "true"})
|
|
556
559
|
response = self._req(f"/v0/pipes/{pipe_name}/nodes/{node_name}/population?{urlencode(params)}", method="POST")
|
|
557
560
|
return response
|
|
558
561
|
|
|
@@ -86,46 +86,19 @@ def display_banner():
|
|
|
86
86
|
color_idx = 16 + (36 * r_idx) + (6 * g_idx) + b_idx
|
|
87
87
|
return f"\033[38;5;{color_idx}m"
|
|
88
88
|
|
|
89
|
-
# Define
|
|
90
|
-
|
|
91
|
-
end_color = [100, 190, 190] # Light turquoise (balanced green and blue)
|
|
89
|
+
# Define solid color (corresponding to #27f795)
|
|
90
|
+
solid_color = [39, 247, 149] # #27f795 in RGB
|
|
92
91
|
|
|
93
|
-
# Print each line with
|
|
92
|
+
# Print each line with solid color for all terminals
|
|
94
93
|
for line in banner:
|
|
95
94
|
colored_line = ""
|
|
95
|
+
color_code = rgb_to_ansi(*solid_color, use_truecolor=capabilities["truecolor"]) # type: ignore
|
|
96
96
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
for char in line:
|
|
103
|
-
if char == " ":
|
|
104
|
-
colored_line += char
|
|
105
|
-
continue
|
|
106
|
-
|
|
107
|
-
# Calculate smooth gradient position (0.0 to 1.0)
|
|
108
|
-
if non_space_chars > 1:
|
|
109
|
-
gradient_position = char_count / (non_space_chars - 1)
|
|
110
|
-
else:
|
|
111
|
-
gradient_position = 0
|
|
112
|
-
|
|
113
|
-
# Interpolate color
|
|
114
|
-
current_rgb = interpolate_color(start_color, end_color, gradient_position)
|
|
115
|
-
color_code = rgb_to_ansi(*current_rgb, use_truecolor=True) # type: ignore
|
|
116
|
-
|
|
97
|
+
for char in line:
|
|
98
|
+
if char == " ":
|
|
99
|
+
colored_line += char
|
|
100
|
+
else:
|
|
117
101
|
colored_line += f"{color_code}{char}"
|
|
118
|
-
char_count += 1
|
|
119
|
-
else:
|
|
120
|
-
# Use solid color for limited terminals (like macOS Terminal)
|
|
121
|
-
solid_color = start_color # Use the deep teal consistently
|
|
122
|
-
color_code = rgb_to_ansi(*solid_color, use_truecolor=False) # type: ignore
|
|
123
|
-
|
|
124
|
-
for char in line:
|
|
125
|
-
if char == " ":
|
|
126
|
-
colored_line += char
|
|
127
|
-
else:
|
|
128
|
-
colored_line += f"{color_code}{char}"
|
|
129
102
|
|
|
130
103
|
click.echo(colored_line + reset)
|
|
131
104
|
click.echo()
|
|
@@ -349,12 +349,31 @@ def create_deployment(
|
|
|
349
349
|
promote_deployment(client.host, HEADERS, wait=wait)
|
|
350
350
|
|
|
351
351
|
|
|
352
|
+
def _build_data_movement_message(kind: str, source_mv_name: Optional[str]) -> str:
|
|
353
|
+
if kind == "backfill_with_mv_queries":
|
|
354
|
+
return f"Using Materialized Pipe {source_mv_name or ''}"
|
|
355
|
+
elif kind == "backfill_with_forward_query":
|
|
356
|
+
return "From live deployment using Forward Query"
|
|
357
|
+
else:
|
|
358
|
+
return ""
|
|
359
|
+
|
|
360
|
+
|
|
352
361
|
def print_changes(result: dict, project: Project) -> None:
|
|
353
362
|
deployment = result.get("deployment", {})
|
|
354
363
|
resources_columns = ["status", "name", "type", "path"]
|
|
355
364
|
resources: list[list[Union[str, None]]] = []
|
|
356
365
|
tokens_columns = ["Change", "Token name", "Added permissions", "Removed permissions"]
|
|
357
366
|
tokens: list[Tuple[str, str, str, str]] = []
|
|
367
|
+
data_movements_columns = ["Datasource", "Backfill type"]
|
|
368
|
+
data_movements = deployment.get("data_movements")
|
|
369
|
+
if data_movements is not None:
|
|
370
|
+
data_movements = [
|
|
371
|
+
(
|
|
372
|
+
dm.get("datasource_name"),
|
|
373
|
+
_build_data_movement_message(dm.get("kind"), dm.get("source_mv_name")),
|
|
374
|
+
)
|
|
375
|
+
for dm in data_movements
|
|
376
|
+
]
|
|
358
377
|
|
|
359
378
|
for ds in deployment.get("new_datasource_names", []):
|
|
360
379
|
resources.append(["new", ds, "datasource", project.get_resource_path(ds, "datasource")])
|
|
@@ -415,3 +434,9 @@ def print_changes(result: dict, project: Project) -> None:
|
|
|
415
434
|
echo_safe_humanfriendly_tables_format_smart_table(tokens, column_names=tokens_columns)
|
|
416
435
|
else:
|
|
417
436
|
click.echo(FeedbackManager.gray(message="* No changes in tokens to be deployed"))
|
|
437
|
+
if data_movements is not None:
|
|
438
|
+
if data_movements:
|
|
439
|
+
click.echo(FeedbackManager.info(message="\n Data that will be copied with this deployment:"))
|
|
440
|
+
echo_safe_humanfriendly_tables_format_smart_table(data_movements, column_names=data_movements_columns)
|
|
441
|
+
else:
|
|
442
|
+
click.echo(FeedbackManager.gray(message="* No data will be copied with this deployment"))
|
|
@@ -87,6 +87,12 @@ def materialization_ls(ctx: click.Context, match: str, format_: str):
|
|
|
87
87
|
default=False,
|
|
88
88
|
help="Waits for populate jobs to finish, showing a progress bar. Disabled by default.",
|
|
89
89
|
)
|
|
90
|
+
@click.option(
|
|
91
|
+
"--on-demand-compute",
|
|
92
|
+
is_flag=True,
|
|
93
|
+
default=False,
|
|
94
|
+
help="Use on-demand compute instances for the populate job.",
|
|
95
|
+
)
|
|
90
96
|
@click.pass_context
|
|
91
97
|
def pipe_populate(
|
|
92
98
|
ctx: click.Context,
|
|
@@ -95,6 +101,7 @@ def pipe_populate(
|
|
|
95
101
|
sql_condition: str,
|
|
96
102
|
truncate: bool,
|
|
97
103
|
wait: bool,
|
|
104
|
+
on_demand_compute: bool,
|
|
98
105
|
):
|
|
99
106
|
"""Populate the result of a Materialized Node into the target materialized view"""
|
|
100
107
|
|
|
@@ -121,7 +128,9 @@ def pipe_populate(
|
|
|
121
128
|
|
|
122
129
|
node = materialized_ids[0]
|
|
123
130
|
|
|
124
|
-
response = cl.populate_node(
|
|
131
|
+
response = cl.populate_node(
|
|
132
|
+
pipe_name, node, populate_condition=sql_condition, truncate=truncate, on_demand_compute=on_demand_compute
|
|
133
|
+
)
|
|
125
134
|
if "job" not in response:
|
|
126
135
|
raise CLIPipeException(response)
|
|
127
136
|
|
|
@@ -17,10 +17,10 @@ tinybird/datafile/exceptions.py,sha256=8rw2umdZjtby85QbuRKFO5ETz_eRHwUY5l7eHsy1w
|
|
|
17
17
|
tinybird/datafile/parse_connection.py,sha256=tRyn2Rpr1TeWet5BXmMoQgaotbGdYep1qiTak_OqC5E,1825
|
|
18
18
|
tinybird/datafile/parse_datasource.py,sha256=ssW8QeFSgglVFi3sDZj_HgkJiTJ2069v2JgqnH3CkDE,1825
|
|
19
19
|
tinybird/datafile/parse_pipe.py,sha256=xf4m0Tw44QWJzHzAm7Z7FwUoUUtr7noMYjU1NiWnX0k,3880
|
|
20
|
-
tinybird/tb/__cli__.py,sha256=
|
|
20
|
+
tinybird/tb/__cli__.py,sha256=Iuk9ZAcaTa8d0ZdMUVZlrkCnfsp9k42L3kg0mwUblH0,247
|
|
21
21
|
tinybird/tb/check_pypi.py,sha256=Gp0HkHHDFMSDL6nxKlOY51z7z1Uv-2LRexNTZSHHGmM,552
|
|
22
22
|
tinybird/tb/cli.py,sha256=FdDFEIayjmsZEVsVSSvRiVYn_FHOVg_zWQzchnzfWho,1008
|
|
23
|
-
tinybird/tb/client.py,sha256=
|
|
23
|
+
tinybird/tb/client.py,sha256=bUn0mCzd9DFCTEhMysw-Aw509Ejih84K_JXXC4_58eE,54274
|
|
24
24
|
tinybird/tb/config.py,sha256=mhMTGnMB5KcxGoh3dewIr2Jjsa6pHE183gCPAQWyp6o,3973
|
|
25
25
|
tinybird/tb/modules/build.py,sha256=efD-vamK1NPaDo9R86Hn8be2DYoW0Hh5bZiH7knK5dk,7790
|
|
26
26
|
tinybird/tb/modules/build_common.py,sha256=dthlaDn_CuwZnedQcUi7iIdDoHWfSbbbGQwiDgNcmC0,13062
|
|
@@ -33,7 +33,7 @@ tinybird/tb/modules/copy.py,sha256=dPZkcIDvxjJrlQUIvToO0vsEEEs4EYumbNV77-BzNoU,4
|
|
|
33
33
|
tinybird/tb/modules/create.py,sha256=pJxHXG69c9Z_21s-7VuJ3RZOF_nJU51LEwiAkvI3dZY,23251
|
|
34
34
|
tinybird/tb/modules/datasource.py,sha256=pae-ENeHYIF1HHYRSOziFC-2FPLUFa0KS60YpdlKCS8,41725
|
|
35
35
|
tinybird/tb/modules/deployment.py,sha256=EDEVOqFk5fp0fvvs2jV0mT5POFd-i_8uZIUREwzAbEk,13199
|
|
36
|
-
tinybird/tb/modules/deployment_common.py,sha256=
|
|
36
|
+
tinybird/tb/modules/deployment_common.py,sha256=g-2wnR63tlxmTObs6xRjZRgOOaX0fFn3Jq4x21qI6aw,18975
|
|
37
37
|
tinybird/tb/modules/deprecations.py,sha256=rrszC1f_JJeJ8mUxGoCxckQTJFBCR8wREf4XXXN-PRc,4507
|
|
38
38
|
tinybird/tb/modules/dev_server.py,sha256=57FCKuWpErwYUYgHspYDkLWEm9F4pbvVOtMrFXX1fVU,10129
|
|
39
39
|
tinybird/tb/modules/endpoint.py,sha256=ksRj6mfDb9Xv63PhTkV_uKSosgysHElqagg3RTt21Do,11958
|
|
@@ -49,7 +49,7 @@ tinybird/tb/modules/local_common.py,sha256=_WODjW3oPshgsZ1jDFFx2nr0zrLi3Gxz5dlah
|
|
|
49
49
|
tinybird/tb/modules/login.py,sha256=zerXZqIv15pbFk5XRt746xGcVnp01YmL_403byBf4jQ,1245
|
|
50
50
|
tinybird/tb/modules/login_common.py,sha256=IfthYbHmC7EtsCXCB1iF4TngPOwfaHJ6Dfi_t7oBXnI,11640
|
|
51
51
|
tinybird/tb/modules/logout.py,sha256=sniI4JNxpTrVeRCp0oGJuQ3yRerG4hH5uz6oBmjv724,1009
|
|
52
|
-
tinybird/tb/modules/materialization.py,sha256=
|
|
52
|
+
tinybird/tb/modules/materialization.py,sha256=8fdbTTxFSk0Sjet3pcEk_x-cs4RGpgl6toN8vrMLXJE,5630
|
|
53
53
|
tinybird/tb/modules/mock.py,sha256=ET8sRpmXnQsd2sSJXH_KCdREU1_XQgkORru6T357Akc,3260
|
|
54
54
|
tinybird/tb/modules/mock_common.py,sha256=72yKp--Zo40hrycUtiajSRW2BojOsgOZFqUorQ_KQ3w,2279
|
|
55
55
|
tinybird/tb/modules/open.py,sha256=LYiuO8Z1I9O_v6pv58qpUCWFD6BT00BdeO21fRa4I4Y,1315
|
|
@@ -71,13 +71,13 @@ tinybird/tb/modules/workspace_members.py,sha256=5JdkJgfuEwbq-t6vxkBhYwgsiTDxF790
|
|
|
71
71
|
tinybird/tb/modules/agent/__init__.py,sha256=i3oe3vDIWWPaicdCM0zs7D7BJ1W0k7th93ooskHAV00,54
|
|
72
72
|
tinybird/tb/modules/agent/agent.py,sha256=cHpPZiUeW525i9PxspGoilTc-1HPAHCCzxiYdcdJQ7c,28214
|
|
73
73
|
tinybird/tb/modules/agent/animations.py,sha256=4WOC5_2BracttmMCrV0H91tXfWcUzQHBUaIJc5FA7tE,3490
|
|
74
|
-
tinybird/tb/modules/agent/banner.py,sha256=
|
|
74
|
+
tinybird/tb/modules/agent/banner.py,sha256=IM7UtRqSoC6xFJ-TU33-1HrV6I2KVYQsVMeI4GgJsb0,6045
|
|
75
75
|
tinybird/tb/modules/agent/command_agent.py,sha256=Q4M5qV9j3aETrXswoWZ02ZWQZhJm42HGHO1ymJrfDnw,2665
|
|
76
76
|
tinybird/tb/modules/agent/memory.py,sha256=O6Kumn9AyKxcTkhI45yjAUZ3ZIAibLOcNWoiEuLYeqY,3245
|
|
77
77
|
tinybird/tb/modules/agent/models.py,sha256=LW1D27gjcd_jwFmghEzteCgToDfodX2B6B5S8BYbysw,735
|
|
78
78
|
tinybird/tb/modules/agent/prompts.py,sha256=NEIk3OK0xXm3QS1Iox4T1MMo19hLhfaICMEwzqVGW7E,31069
|
|
79
79
|
tinybird/tb/modules/agent/testing_agent.py,sha256=mH7ccuWeTnkpENCmwym9ubDFncMXQoSo0jq2pRxJVDY,2553
|
|
80
|
-
tinybird/tb/modules/agent/utils.py,sha256=
|
|
80
|
+
tinybird/tb/modules/agent/utils.py,sha256=Tv9NwPYPwkdWMfxfrDolVVglrBWnMUViQFE2nxaQMdg,29613
|
|
81
81
|
tinybird/tb/modules/agent/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
82
82
|
tinybird/tb/modules/agent/tools/analyze.py,sha256=CR5LXg4fou-zYEksqnjpJ0icvxJVoKnTctoI1NRvqCM,3873
|
|
83
83
|
tinybird/tb/modules/agent/tools/append.py,sha256=XA8ZeqxZcRL_0ZCd5FyggpWeH53mwTMby4lHV8wQa7c,6039
|
|
@@ -116,8 +116,8 @@ tinybird/tb_cli_modules/config.py,sha256=IsgdtFRnUrkY8-Zo32lmk6O7u3bHie1QCxLwgp4
|
|
|
116
116
|
tinybird/tb_cli_modules/exceptions.py,sha256=pmucP4kTF4irIt7dXiG-FcnI-o3mvDusPmch1L8RCWk,3367
|
|
117
117
|
tinybird/tb_cli_modules/regions.py,sha256=QjsL5H6Kg-qr0aYVLrvb1STeJ5Sx_sjvbOYO0LrEGMk,166
|
|
118
118
|
tinybird/tb_cli_modules/telemetry.py,sha256=Hh2Io8ZPROSunbOLuMvuIFU4TqwWPmQTqal4WS09K1A,10449
|
|
119
|
-
tinybird-0.0.1.
|
|
120
|
-
tinybird-0.0.1.
|
|
121
|
-
tinybird-0.0.1.
|
|
122
|
-
tinybird-0.0.1.
|
|
123
|
-
tinybird-0.0.1.
|
|
119
|
+
tinybird-0.0.1.dev265.dist-info/METADATA,sha256=zs0WwROT9N1so_0BkdPjx-Q1r0U1UPKB20edJ-XUv30,1733
|
|
120
|
+
tinybird-0.0.1.dev265.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
121
|
+
tinybird-0.0.1.dev265.dist-info/entry_points.txt,sha256=LwdHU6TfKx4Qs7BqqtaczEZbImgU7Abe9Lp920zb_fo,43
|
|
122
|
+
tinybird-0.0.1.dev265.dist-info/top_level.txt,sha256=VqqqEmkAy7UNaD8-V51FCoMMWXjLUlR0IstvK7tJYVY,54
|
|
123
|
+
tinybird-0.0.1.dev265.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|