tinybird-cli 5.1.1.dev2__tar.gz → 5.1.1.dev3__tar.gz
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.
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/PKG-INFO +6 -1
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird/__cli__.py +2 -2
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird/feedback_manager.py +5 -0
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird/sql_template.py +8 -4
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird/tb_cli_modules/pipe.py +18 -1
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird_cli.egg-info/PKG-INFO +6 -1
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/setup.cfg +0 -0
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird/ch_utils/constants.py +0 -0
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird/ch_utils/engine.py +0 -0
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird/check_pypi.py +0 -0
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird/client.py +0 -0
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird/config.py +0 -0
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird/connectors.py +0 -0
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird/context.py +0 -0
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird/datafile.py +0 -0
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird/datatypes.py +0 -0
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird/git_settings.py +0 -0
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird/sql.py +0 -0
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird/sql_template_fmt.py +0 -0
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird/sql_toolset.py +0 -0
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird/syncasync.py +0 -0
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird/tb_cli.py +0 -0
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird/tb_cli_modules/auth.py +0 -0
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird/tb_cli_modules/branch.py +0 -0
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird/tb_cli_modules/cicd.py +0 -0
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird/tb_cli_modules/cli.py +0 -0
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird/tb_cli_modules/common.py +0 -0
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird/tb_cli_modules/config.py +0 -0
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird/tb_cli_modules/connection.py +0 -0
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird/tb_cli_modules/datasource.py +0 -0
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird/tb_cli_modules/exceptions.py +0 -0
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird/tb_cli_modules/job.py +0 -0
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird/tb_cli_modules/regions.py +0 -0
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird/tb_cli_modules/telemetry.py +0 -0
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird/tb_cli_modules/test.py +0 -0
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird/tb_cli_modules/tinyunit/tinyunit.py +0 -0
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py +0 -0
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird/tb_cli_modules/token.py +0 -0
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird/tb_cli_modules/workspace.py +0 -0
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird/tb_cli_modules/workspace_members.py +0 -0
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird/tornado_template.py +0 -0
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird_cli.egg-info/SOURCES.txt +0 -0
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird_cli.egg-info/dependency_links.txt +0 -0
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird_cli.egg-info/entry_points.txt +0 -0
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird_cli.egg-info/requires.txt +0 -0
- {tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird_cli.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: tinybird-cli
|
|
3
|
-
Version: 5.1.1.
|
|
3
|
+
Version: 5.1.1.dev3
|
|
4
4
|
Summary: Tinybird Command Line Tool
|
|
5
5
|
Home-page: https://www.tinybird.co/docs/cli/introduction.html
|
|
6
6
|
Author: Tinybird
|
|
@@ -18,6 +18,11 @@ The Tinybird command-line tool allows you to use all the Tinybird functionality
|
|
|
18
18
|
Changelog
|
|
19
19
|
----------
|
|
20
20
|
|
|
21
|
+
5.1.1.dev3
|
|
22
|
+
***********
|
|
23
|
+
|
|
24
|
+
- `Improved` No need for `--node` param in `tb pipe populate`
|
|
25
|
+
|
|
21
26
|
5.1.1.dev2
|
|
22
27
|
************
|
|
23
28
|
|
|
@@ -4,5 +4,5 @@ __description__ = 'Tinybird Command Line Tool'
|
|
|
4
4
|
__url__ = 'https://www.tinybird.co/docs/cli/introduction.html'
|
|
5
5
|
__author__ = 'Tinybird'
|
|
6
6
|
__author_email__ = 'support@tinybird.co'
|
|
7
|
-
__version__ = '5.1.1.
|
|
8
|
-
__revision__ = '
|
|
7
|
+
__version__ = '5.1.1.dev3'
|
|
8
|
+
__revision__ = '7908f0f'
|
|
@@ -357,6 +357,11 @@ class FeedbackManager:
|
|
|
357
357
|
error_number_of_fixed_params_and_resources_mismatch = error_message(
|
|
358
358
|
"The number of --fixed-params options must not exceed the number of --scope and --resource options."
|
|
359
359
|
)
|
|
360
|
+
error_pipe_not_materialized = error_message("Pipe {pipe} is not materialized.")
|
|
361
|
+
error_populate_no_materialized_in_pipe = error_message("No materialized nodes in pipe {pipe}. Use --node param.")
|
|
362
|
+
error_populate_several_materialized_in_pipe = error_message(
|
|
363
|
+
"Several materialized nodes in pipe {pipe}. Use --node param."
|
|
364
|
+
)
|
|
360
365
|
error_unlinking_pipe_not_linked = error_message("** {pipe} is not linked (MV, Copy, or Sink).")
|
|
361
366
|
|
|
362
367
|
info_incl_relative_path = info_message("** Relative path {path} does not exist, skipping.")
|
|
@@ -1384,9 +1384,13 @@ def generate(self, **kwargs) -> Tuple[str, TemplateExecutionResults]:
|
|
|
1384
1384
|
if is_test_mode:
|
|
1385
1385
|
return Symbol("{" + sqlescape(x) + ": String}")
|
|
1386
1386
|
else:
|
|
1387
|
-
raise SQLTemplateException(
|
|
1387
|
+
raise SQLTemplateException(
|
|
1388
|
+
f"Cannot access secret '{x}'. Check the secret exists in the Workspace and the token has the required scope."
|
|
1389
|
+
)
|
|
1388
1390
|
except Exception:
|
|
1389
|
-
raise SQLTemplateException(
|
|
1391
|
+
raise SQLTemplateException(
|
|
1392
|
+
f"Cannot access secret '{x}'. Check the secret exists in the Workspace and the token has the required scope."
|
|
1393
|
+
)
|
|
1390
1394
|
|
|
1391
1395
|
def set_max_threads(x):
|
|
1392
1396
|
try:
|
|
@@ -2115,7 +2119,7 @@ def render_sql_template(
|
|
|
2115
2119
|
>>> render_sql_template("select * from table where str = {{tb_secret('test')}}", variables = { 'test': '1234' })
|
|
2116
2120
|
Traceback (most recent call last):
|
|
2117
2121
|
...
|
|
2118
|
-
tinybird.sql_template.SQLTemplateException: Template Syntax Error:
|
|
2122
|
+
tinybird.sql_template.SQLTemplateException: Template Syntax Error: Cannot access secret 'test'. Check the secret exists in the Workspace and the token has the required scope.
|
|
2119
2123
|
>>> render_sql_template("select * from table where str = {{tb_secret('test')}}", test_mode=True)
|
|
2120
2124
|
('select * from table where str = {test: String}', {}, [])
|
|
2121
2125
|
>>> render_sql_template("select * from table where str = {{tb_secret('test')}}", secrets = [ 'tb_secret_test' ], test_mode=True)
|
|
@@ -2123,7 +2127,7 @@ def render_sql_template(
|
|
|
2123
2127
|
>>> render_sql_template("select * from table where str = {{tb_secret('test')}}", secrets = [ 'tb_secret_test2' ])
|
|
2124
2128
|
Traceback (most recent call last):
|
|
2125
2129
|
...
|
|
2126
|
-
tinybird.sql_template.SQLTemplateException: Template Syntax Error:
|
|
2130
|
+
tinybird.sql_template.SQLTemplateException: Template Syntax Error: Cannot access secret 'test'. Check the secret exists in the Workspace and the token has the required scope.
|
|
2127
2131
|
"""
|
|
2128
2132
|
escape_split_to_array = ff_split_to_array_escape.get(False)
|
|
2129
2133
|
bypass_preprocess_variables = ff_preprocess_parameters_circuit_breaker.get(False)
|
|
@@ -212,7 +212,7 @@ async def pipe_ls(ctx: Context, match: str, format_: str):
|
|
|
212
212
|
|
|
213
213
|
@pipe.command(name="populate")
|
|
214
214
|
@click.argument("pipe_name")
|
|
215
|
-
@click.option("--node", type=str, help="Name of the materialized node.", required=
|
|
215
|
+
@click.option("--node", type=str, help="Name of the materialized node.", default=None, required=False)
|
|
216
216
|
@click.option(
|
|
217
217
|
"--sql-condition",
|
|
218
218
|
type=str,
|
|
@@ -247,6 +247,23 @@ async def pipe_populate(
|
|
|
247
247
|
):
|
|
248
248
|
"""Populate the result of a Materialized Node into the target Materialized View"""
|
|
249
249
|
cl = create_tb_client(ctx)
|
|
250
|
+
|
|
251
|
+
pipe = await cl.pipe(pipe_name)
|
|
252
|
+
|
|
253
|
+
if pipe["type"] != PipeTypes.MATERIALIZED:
|
|
254
|
+
raise CLIPipeException(FeedbackManager.error_pipe_not_materialized(pipe=pipe_name))
|
|
255
|
+
|
|
256
|
+
if not node:
|
|
257
|
+
materialized_ids = [pipe_node["id"] for pipe_node in pipe["nodes"] if pipe_node.get("materialized") is not None]
|
|
258
|
+
|
|
259
|
+
if not materialized_ids:
|
|
260
|
+
raise CLIPipeException(FeedbackManager.error_populate_no_materialized_in_pipe(pipe=pipe_name))
|
|
261
|
+
|
|
262
|
+
elif len(materialized_ids) > 1:
|
|
263
|
+
raise CLIPipeException(FeedbackManager.error_populate_several_materialized_in_pipe(pipe=pipe_name))
|
|
264
|
+
|
|
265
|
+
node = materialized_ids[0]
|
|
266
|
+
|
|
250
267
|
response = await cl.populate_node(
|
|
251
268
|
pipe_name,
|
|
252
269
|
node,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: tinybird-cli
|
|
3
|
-
Version: 5.1.1.
|
|
3
|
+
Version: 5.1.1.dev3
|
|
4
4
|
Summary: Tinybird Command Line Tool
|
|
5
5
|
Home-page: https://www.tinybird.co/docs/cli/introduction.html
|
|
6
6
|
Author: Tinybird
|
|
@@ -18,6 +18,11 @@ The Tinybird command-line tool allows you to use all the Tinybird functionality
|
|
|
18
18
|
Changelog
|
|
19
19
|
----------
|
|
20
20
|
|
|
21
|
+
5.1.1.dev3
|
|
22
|
+
***********
|
|
23
|
+
|
|
24
|
+
- `Improved` No need for `--node` param in `tb pipe populate`
|
|
25
|
+
|
|
21
26
|
5.1.1.dev2
|
|
22
27
|
************
|
|
23
28
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird/tb_cli_modules/tinyunit/tinyunit.py
RENAMED
|
File without changes
|
{tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird/tb_cli_modules/workspace_members.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-cli-5.1.1.dev2 → tinybird-cli-5.1.1.dev3}/tinybird_cli.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|