tinybird-cli 1.1.1.dev1__tar.gz → 1.1.1.dev2__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-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/PKG-INFO +6 -1
- {tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird/__cli__.py +2 -2
- {tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird/ch_utils/engine.py +10 -0
- {tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird/feedback_manager.py +1 -1
- {tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird/tb_cli_modules/branch.py +2 -2
- {tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird/tb_cli_modules/common.py +3 -3
- {tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird_cli.egg-info/PKG-INFO +6 -1
- {tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/setup.cfg +0 -0
- {tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird/ch_utils/constants.py +0 -0
- {tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird/check_pypi.py +0 -0
- {tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird/client.py +0 -0
- {tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird/config.py +0 -0
- {tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird/connector_settings.py +0 -0
- {tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird/connectors.py +0 -0
- {tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird/context.py +0 -0
- {tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird/datafile.py +0 -0
- {tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird/datatypes.py +0 -0
- {tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird/sql.py +0 -0
- {tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird/sql_template.py +0 -0
- {tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird/sql_template_fmt.py +0 -0
- {tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird/sql_toolset.py +0 -0
- {tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird/syncasync.py +0 -0
- {tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird/tb_cli.py +0 -0
- {tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird/tb_cli_modules/auth.py +0 -0
- {tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird/tb_cli_modules/cicd.py +0 -0
- {tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird/tb_cli_modules/cli.py +0 -0
- {tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird/tb_cli_modules/config.py +0 -0
- {tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird/tb_cli_modules/connection.py +0 -0
- {tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird/tb_cli_modules/datasource.py +0 -0
- {tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird/tb_cli_modules/exceptions.py +0 -0
- {tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird/tb_cli_modules/job.py +0 -0
- {tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird/tb_cli_modules/pipe.py +0 -0
- {tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird/tb_cli_modules/telemetry.py +0 -0
- {tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird/tb_cli_modules/test.py +0 -0
- {tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird/tb_cli_modules/tinyunit/tinyunit.py +0 -0
- {tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py +0 -0
- {tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird/tb_cli_modules/token.py +0 -0
- {tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird/tb_cli_modules/workspace.py +0 -0
- {tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird/tb_cli_modules/workspace_members.py +0 -0
- {tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird/tornado_template.py +0 -0
- {tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird_cli.egg-info/SOURCES.txt +0 -0
- {tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird_cli.egg-info/dependency_links.txt +0 -0
- {tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird_cli.egg-info/entry_points.txt +0 -0
- {tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird_cli.egg-info/requires.txt +0 -0
- {tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/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: 1.1.1.
|
|
3
|
+
Version: 1.1.1.dev2
|
|
4
4
|
Summary: Tinybird Command Line Tool
|
|
5
5
|
Home-page: https://docs.tinybird.co/cli.html
|
|
6
6
|
Author: Tinybird
|
|
@@ -19,6 +19,11 @@ Changelog
|
|
|
19
19
|
|
|
20
20
|
---------
|
|
21
21
|
|
|
22
|
+
1.1.1.dev2
|
|
23
|
+
************
|
|
24
|
+
|
|
25
|
+
- `Fixed` Do not print data branching summary in `tb env create <env_name>`
|
|
26
|
+
|
|
22
27
|
1.1.1.dev1
|
|
23
28
|
************
|
|
24
29
|
|
|
@@ -4,5 +4,5 @@ __description__ = 'Tinybird Command Line Tool'
|
|
|
4
4
|
__url__ = 'https://docs.tinybird.co/cli.html'
|
|
5
5
|
__author__ = 'Tinybird'
|
|
6
6
|
__author_email__ = 'support@tinybird.co'
|
|
7
|
-
__version__ = '1.1.1.
|
|
8
|
-
__revision__ = '
|
|
7
|
+
__version__ = '1.1.1.dev2'
|
|
8
|
+
__revision__ = '2438918'
|
|
@@ -64,6 +64,10 @@ class TableDetails:
|
|
|
64
64
|
>>> ed = TableDetails({ "engine_full": "MergeTree() PARTITION BY toYear(timestamp) ORDER BY (timestamp, cityHash64(location)) SAMPLE BY cityHash64(location) SETTINGS index_granularity = 8192, ttl_only_drop_parts = 1, merge_with_ttl_timeout = 1800 TTL toDate(timestamp) + INTERVAL 1 DAY"})
|
|
65
65
|
>>> ed.engine_full
|
|
66
66
|
'MergeTree() PARTITION BY toYear(timestamp) ORDER BY (timestamp, cityHash64(location)) SAMPLE BY cityHash64(location) SETTINGS index_granularity = 8192, ttl_only_drop_parts = 1, merge_with_ttl_timeout = 1800 TTL toDate(timestamp) + INTERVAL 1 DAY'
|
|
67
|
+
|
|
68
|
+
>>> x = TableDetails({'database': 'd_01', 'name': 't_01', 'create_table_query': "CREATE TABLE d_01.t_01 (`project_id` String, `project_name` String, `project_repo` String, `owner_id` String, `updated_at` DateTime64(3)) ENGINE = ReplicatedReplacingMergeTree('/clickhouse/tables/{layer}-{shard}/d_test_1ad5e496b29246e1ade99117e9180f6f.t_1bac899a56b34b33921fbf468b4500f7', '{replica}', updated_at) PARTITION BY tuple() PRIMARY KEY project_id ORDER BY project_id SETTINGS index_granularity = 32", 'engine': 'ReplicatedReplacingMergeTree', 'partition_key': 'tuple()', 'sorting_key': 'project_id', 'primary_key': 'project_id', 'sampling_key': '', 'engine_full': "ReplicatedReplacingMergeTree('/clickhouse/tables/{layer}-{shard}/d_01.t_01', '{replica}', updated_at) PARTITION BY tuple() PRIMARY KEY project_id ORDER BY project_id SETTINGS index_granularity = 32", 'settings': 'index_granularity = 32', 'ttl': ''})
|
|
69
|
+
>>> x.primary_key
|
|
70
|
+
|
|
67
71
|
"""
|
|
68
72
|
|
|
69
73
|
def __init__(self, details: Optional[Dict[str, Any]] = None):
|
|
@@ -144,6 +148,8 @@ class TableDetails:
|
|
|
144
148
|
@property
|
|
145
149
|
def primary_key(self) -> Optional[str]:
|
|
146
150
|
_primary_key = self.details.get("primary_key", None)
|
|
151
|
+
# When querying `system.tables`, it will return the `sorting_key` as `primary_key` even if it was not specify
|
|
152
|
+
# So we need to ignore it
|
|
147
153
|
if self.sorting_key == _primary_key:
|
|
148
154
|
return None
|
|
149
155
|
return _primary_key
|
|
@@ -615,6 +621,8 @@ def engine_full_from_dict(
|
|
|
615
621
|
Traceback (most recent call last):
|
|
616
622
|
...
|
|
617
623
|
ValueError: You can not use 'schema' and 'columns' at the same time
|
|
624
|
+
>>> engine_full_from_dict('ReplacingMergeTree', {'partition_key': 'tuple()', 'sorting_key': 'project_id', 'settings': 'index_granularity = 32', 'ver': 'updated_at'}, "`project_id` String, `project_name` String, `project_repo` String, `owner_id` String, `updated_at` DateTime64(3)")
|
|
625
|
+
'ReplacingMergeTree(updated_at) PARTITION BY (tuple()) ORDER BY (project_id) SETTINGS index_granularity = 32'
|
|
618
626
|
"""
|
|
619
627
|
|
|
620
628
|
if schema is not None and columns is not None:
|
|
@@ -653,6 +661,8 @@ def engine_params_from_engine_full(engine_full: str) -> Dict[str, Any]:
|
|
|
653
661
|
{'ver': 'insert_date'}
|
|
654
662
|
>>> engine_params_from_engine_full("ReplicatedVersionedCollapsingMergeTree('/clickhouse/tables/{layer}-{shard}/test.foo', '{replica}', sign_c,version_c) ORDER BY pk TTL toDate(local_timeplaced) + toIntervalDay(3) SETTINGS index_granularity = 8192")
|
|
655
663
|
{'sign': 'sign_c', 'version': 'version_c'}
|
|
664
|
+
>>> engine_params_from_engine_full("ReplacingMergeTree(updated_at) PARTITION BY tuple() PRIMARY KEY project_id ORDER BY project_id SETTINGS index_granularity = 32")
|
|
665
|
+
{'ver': 'updated_at'}
|
|
656
666
|
"""
|
|
657
667
|
engine_full = engine_replicated_to_local(engine_full)
|
|
658
668
|
for engine, (params, _options) in ENABLED_ENGINES:
|
|
@@ -459,7 +459,7 @@ Ready? """
|
|
|
459
459
|
"** Do you want to override {name} with the formatted version shown above?"
|
|
460
460
|
)
|
|
461
461
|
info_populate_job_url = info_message("** Populating job url {url}")
|
|
462
|
-
info_data_branch_job_url = info_message("**
|
|
462
|
+
info_data_branch_job_url = info_message("** Environment job url {url}")
|
|
463
463
|
info_regression_tests_branch_job_url = info_message("** Environment regression tests job url {url}")
|
|
464
464
|
info_merge_branch_job_url = info_message("** Merge Environment deployment job url {url}")
|
|
465
465
|
info_copy_from_main_job_url = info_message("** Copy from 'main' Workspace to '{datasource_name}' job url {url}")
|
|
@@ -539,7 +539,7 @@ async def data_branch(ctx: Context, last_partition: bool, all: bool, ignore_data
|
|
|
539
539
|
job_id = response["job"]["job_id"]
|
|
540
540
|
job_url = response["job"]["job_url"]
|
|
541
541
|
click.echo(FeedbackManager.info_data_branch_job_url(url=job_url))
|
|
542
|
-
job_response = await wait_job(client, job_id, job_url, "
|
|
542
|
+
job_response = await wait_job(client, job_id, job_url, "Environment creation")
|
|
543
543
|
response = job_response["result"]
|
|
544
544
|
is_job = False
|
|
545
545
|
is_summary = "partitions" in response
|
|
@@ -549,7 +549,7 @@ async def data_branch(ctx: Context, last_partition: bool, all: bool, ignore_data
|
|
|
549
549
|
else:
|
|
550
550
|
if not is_job and not is_summary:
|
|
551
551
|
FeedbackManager.warning_unknown_response(response=response)
|
|
552
|
-
elif is_summary:
|
|
552
|
+
elif is_summary and (bool(last_partition) or bool(all)):
|
|
553
553
|
await print_data_branch_summary(client, None, response)
|
|
554
554
|
click.echo(FeedbackManager.success_workspace_data_branch())
|
|
555
555
|
|
|
@@ -961,7 +961,7 @@ async def create_workspace_branch(
|
|
|
961
961
|
assert isinstance(job_id, str)
|
|
962
962
|
|
|
963
963
|
# Await the job to finish and get the result dict
|
|
964
|
-
job_response = await wait_job(client, job_id, job_url, "
|
|
964
|
+
job_response = await wait_job(client, job_id, job_url, "Environment creation")
|
|
965
965
|
if job_response is None:
|
|
966
966
|
raise CLIException(f"Empty job API response (job_id: {job_id}, job_url: {job_url})")
|
|
967
967
|
else:
|
|
@@ -970,7 +970,7 @@ async def create_workspace_branch(
|
|
|
970
970
|
is_summary = "partitions" in response
|
|
971
971
|
|
|
972
972
|
await switch_workspace(ctx, branch_name, only_environments=True)
|
|
973
|
-
if is_summary:
|
|
973
|
+
if is_summary and (bool(last_partition) or bool(all)):
|
|
974
974
|
await print_data_branch_summary(client, None, response)
|
|
975
975
|
|
|
976
976
|
except Exception as e:
|
|
@@ -1643,7 +1643,7 @@ async def print_current_branch(ctx):
|
|
|
1643
1643
|
|
|
1644
1644
|
response = await client.user_workspaces_and_branches()
|
|
1645
1645
|
|
|
1646
|
-
columns = ["name", "id", "
|
|
1646
|
+
columns = ["name", "id", "workspace"]
|
|
1647
1647
|
table = []
|
|
1648
1648
|
|
|
1649
1649
|
for workspace in response["workspaces"]:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: tinybird-cli
|
|
3
|
-
Version: 1.1.1.
|
|
3
|
+
Version: 1.1.1.dev2
|
|
4
4
|
Summary: Tinybird Command Line Tool
|
|
5
5
|
Home-page: https://docs.tinybird.co/cli.html
|
|
6
6
|
Author: Tinybird
|
|
@@ -19,6 +19,11 @@ Changelog
|
|
|
19
19
|
|
|
20
20
|
---------
|
|
21
21
|
|
|
22
|
+
1.1.1.dev2
|
|
23
|
+
************
|
|
24
|
+
|
|
25
|
+
- `Fixed` Do not print data branching summary in `tb env create <env_name>`
|
|
26
|
+
|
|
22
27
|
1.1.1.dev1
|
|
23
28
|
************
|
|
24
29
|
|
|
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-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird/tb_cli_modules/tinyunit/tinyunit.py
RENAMED
|
File without changes
|
{tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird/tb_cli_modules/workspace_members.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-cli-1.1.1.dev1 → tinybird-cli-1.1.1.dev2}/tinybird_cli.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|