tinybird 0.0.1.dev310__py3-none-any.whl → 0.0.1.dev311__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/service_datasources.py +8 -8
- tinybird/tb/__cli__.py +2 -2
- tinybird/tb/modules/deployment.py +2 -0
- tinybird/tb/modules/deployment_common.py +16 -2
- {tinybird-0.0.1.dev310.dist-info → tinybird-0.0.1.dev311.dist-info}/METADATA +1 -1
- {tinybird-0.0.1.dev310.dist-info → tinybird-0.0.1.dev311.dist-info}/RECORD +9 -9
- {tinybird-0.0.1.dev310.dist-info → tinybird-0.0.1.dev311.dist-info}/WHEEL +0 -0
- {tinybird-0.0.1.dev310.dist-info → tinybird-0.0.1.dev311.dist-info}/entry_points.txt +0 -0
- {tinybird-0.0.1.dev310.dist-info → tinybird-0.0.1.dev311.dist-info}/top_level.txt +0 -0
tinybird/service_datasources.py
CHANGED
|
@@ -516,14 +516,14 @@ def get_tinybird_service_datasources() -> List[Dict[str, Any]]:
|
|
|
516
516
|
{
|
|
517
517
|
"name": "tinybird.vcpu_time",
|
|
518
518
|
"description": "vCPU time metrics from your workspace.",
|
|
519
|
-
"dateColumn": "
|
|
519
|
+
"dateColumn": "second_slot",
|
|
520
520
|
"engine": {
|
|
521
521
|
"engine": "AggregatingMergeTree",
|
|
522
|
-
"sorting_key": "organization_id,
|
|
523
|
-
"partition_key": "toStartOfDay(
|
|
522
|
+
"sorting_key": "organization_id, second_slot",
|
|
523
|
+
"partition_key": "toStartOfDay(second_slot)",
|
|
524
524
|
},
|
|
525
525
|
"columns": [
|
|
526
|
-
{"name": "
|
|
526
|
+
{"name": "second_slot", "type": "DateTime"},
|
|
527
527
|
{"name": "organization_id", "type": "String"},
|
|
528
528
|
{"name": "vcpu_time", "type": "Float64"},
|
|
529
529
|
],
|
|
@@ -1042,14 +1042,14 @@ def get_organization_service_datasources() -> List[Dict[str, Any]]:
|
|
|
1042
1042
|
{
|
|
1043
1043
|
"name": "organization.vcpu_time",
|
|
1044
1044
|
"description": "vCPU time metrics from your workspace.",
|
|
1045
|
-
"dateColumn": "
|
|
1045
|
+
"dateColumn": "second_slot",
|
|
1046
1046
|
"engine": {
|
|
1047
1047
|
"engine": "AggregatingMergeTree",
|
|
1048
|
-
"sorting_key": "organization_id,
|
|
1049
|
-
"partition_key": "toStartOfDay(
|
|
1048
|
+
"sorting_key": "organization_id, second_slot",
|
|
1049
|
+
"partition_key": "toStartOfDay(second_slot)",
|
|
1050
1050
|
},
|
|
1051
1051
|
"columns": [
|
|
1052
|
-
{"name": "
|
|
1052
|
+
{"name": "second_slot", "type": "DateTime"},
|
|
1053
1053
|
{"name": "organization_id", "type": "String"},
|
|
1054
1054
|
{"name": "workspace_id", "type": "String"},
|
|
1055
1055
|
{"name": "vcpu_time", "type": "Float64"},
|
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.dev311'
|
|
8
|
+
__revision__ = 'd56057f'
|
|
@@ -382,6 +382,7 @@ def create_deployment_cmd(
|
|
|
382
382
|
template: Optional[str] = None,
|
|
383
383
|
verbose: bool = False,
|
|
384
384
|
) -> None:
|
|
385
|
+
output = ctx.ensure_object(dict)["output"]
|
|
385
386
|
project: Project = ctx.ensure_object(dict)["project"]
|
|
386
387
|
if template:
|
|
387
388
|
if project.get_project_files():
|
|
@@ -416,6 +417,7 @@ def create_deployment_cmd(
|
|
|
416
417
|
check,
|
|
417
418
|
allow_destructive_operations,
|
|
418
419
|
ingest_hint=not is_web_analytics_starter_kit,
|
|
420
|
+
output=output,
|
|
419
421
|
)
|
|
420
422
|
show_web_analytics_starter_kit_hints(client, is_web_analytics_starter_kit)
|
|
421
423
|
|
|
@@ -10,6 +10,7 @@ import requests
|
|
|
10
10
|
|
|
11
11
|
from tinybird.tb.client import TinyB
|
|
12
12
|
from tinybird.tb.modules.common import (
|
|
13
|
+
echo_json,
|
|
13
14
|
echo_safe_humanfriendly_tables_format_smart_table,
|
|
14
15
|
get_display_cloud_host,
|
|
15
16
|
sys_exit,
|
|
@@ -223,6 +224,7 @@ def create_deployment(
|
|
|
223
224
|
check: Optional[bool] = None,
|
|
224
225
|
allow_destructive_operations: Optional[bool] = None,
|
|
225
226
|
ingest_hint: Optional[bool] = True,
|
|
227
|
+
output: Optional[str] = "human",
|
|
226
228
|
) -> None:
|
|
227
229
|
# TODO: This code is duplicated in build_server.py
|
|
228
230
|
# Should be refactored to be shared
|
|
@@ -274,7 +276,10 @@ def create_deployment(
|
|
|
274
276
|
|
|
275
277
|
result = api_post(TINYBIRD_API_URL, headers=HEADERS, files=files, params=params)
|
|
276
278
|
|
|
277
|
-
print_changes(result, project)
|
|
279
|
+
print_changes(result, project, output)
|
|
280
|
+
|
|
281
|
+
if output == "json" and check:
|
|
282
|
+
echo_json(result.get("deployment", {}), 8)
|
|
278
283
|
|
|
279
284
|
deployment = result.get("deployment", {})
|
|
280
285
|
feedback = deployment.get("feedback", [])
|
|
@@ -386,6 +391,15 @@ def create_deployment(
|
|
|
386
391
|
|
|
387
392
|
if auto:
|
|
388
393
|
promote_deployment(client.host, HEADERS, wait=wait, ingest_hint=ingest_hint)
|
|
394
|
+
# Fetch the final deployment state after promotion for JSON output
|
|
395
|
+
if output == "json":
|
|
396
|
+
url = f"{client.host}/v1/deployments/{deployment.get('id')}"
|
|
397
|
+
res = api_fetch(url, HEADERS)
|
|
398
|
+
deployment = res.get("deployment")
|
|
399
|
+
|
|
400
|
+
# Output JSON at the appropriate time based on the execution path
|
|
401
|
+
if output == "json" and deployment:
|
|
402
|
+
echo_json(deployment, 8)
|
|
389
403
|
|
|
390
404
|
|
|
391
405
|
def _build_data_movement_message(kind: str, source_mv_name: Optional[str]) -> str:
|
|
@@ -397,7 +411,7 @@ def _build_data_movement_message(kind: str, source_mv_name: Optional[str]) -> st
|
|
|
397
411
|
return ""
|
|
398
412
|
|
|
399
413
|
|
|
400
|
-
def print_changes(result: dict, project: Project) -> None:
|
|
414
|
+
def print_changes(result: dict, project: Project, output: Optional[str] = "human") -> None:
|
|
401
415
|
deployment = result.get("deployment", {})
|
|
402
416
|
resources_columns = ["status", "name", "type", "path"]
|
|
403
417
|
resources: list[list[Union[str, None]]] = []
|
|
@@ -4,7 +4,7 @@ tinybird/datatypes.py,sha256=r4WCvspmrXTJHiPjjyOTiZyZl31FO3Ynkwq4LQsYm6E,11059
|
|
|
4
4
|
tinybird/feedback_manager.py,sha256=XY8d83pRlq-LH7xHMApkaEebfXEWLjDzrGe1prpcTHE,69778
|
|
5
5
|
tinybird/git_settings.py,sha256=Sw_8rGmribEFJ4Z_6idrVytxpFYk7ez8ei0qHULzs3E,3934
|
|
6
6
|
tinybird/prompts.py,sha256=F8ic_mGId50MDJmg5ec8i5BDavxz9SWtocLXqgO0IRY,45689
|
|
7
|
-
tinybird/service_datasources.py,sha256=
|
|
7
|
+
tinybird/service_datasources.py,sha256=V0W1zErPmfdeekM-w3GYZG1zR_0iI_IQiQeyDh873bM,54711
|
|
8
8
|
tinybird/sql.py,sha256=7pkwQMUVy0CH5zFgLMZyCx1BeaJSQYC05EmOb9vO3Ls,48694
|
|
9
9
|
tinybird/sql_template.py,sha256=qz1Q-d8jlGpU8w-jcwn_NM4ApFtJAhEL-3_3-JELrl4,102979
|
|
10
10
|
tinybird/sql_template_fmt.py,sha256=KUHdj5rYCYm_rKKdXYSJAE9vIyXUQLB0YSZnUXHeBlY,10196
|
|
@@ -18,7 +18,7 @@ tinybird/datafile/exceptions.py,sha256=8rw2umdZjtby85QbuRKFO5ETz_eRHwUY5l7eHsy1w
|
|
|
18
18
|
tinybird/datafile/parse_connection.py,sha256=tRyn2Rpr1TeWet5BXmMoQgaotbGdYep1qiTak_OqC5E,1825
|
|
19
19
|
tinybird/datafile/parse_datasource.py,sha256=ssW8QeFSgglVFi3sDZj_HgkJiTJ2069v2JgqnH3CkDE,1825
|
|
20
20
|
tinybird/datafile/parse_pipe.py,sha256=8e9LMecSQVWHC4AXf8cdxoQ1nxUR4fTObYxTctO_EXQ,3816
|
|
21
|
-
tinybird/tb/__cli__.py,sha256=
|
|
21
|
+
tinybird/tb/__cli__.py,sha256=rRHcV-HJBPgHc4EDQ0U2EqmbFK64tZ3kgAY6tUFAO4c,247
|
|
22
22
|
tinybird/tb/check_pypi.py,sha256=Gp0HkHHDFMSDL6nxKlOY51z7z1Uv-2LRexNTZSHHGmM,552
|
|
23
23
|
tinybird/tb/cli.py,sha256=Os4uApzYYVPXcYFdaReQs9E12q9DOuYOUVFoOgt7i7U,1047
|
|
24
24
|
tinybird/tb/client.py,sha256=VYbllzIsmBS4b56Ix-vsyLbhpbe7MVRxR1sIo6xU2qA,53544
|
|
@@ -33,8 +33,8 @@ tinybird/tb/modules/connection.py,sha256=axp8Fny1_4PSLJGN4UF6WygyRbQtM3Lbt6thxHK
|
|
|
33
33
|
tinybird/tb/modules/copy.py,sha256=dPZkcIDvxjJrlQUIvToO0vsEEEs4EYumbNV77-BzNoU,4404
|
|
34
34
|
tinybird/tb/modules/create.py,sha256=j0WvO6LxuGW1ZOYVuvR1FxFls2oMmKePYNTRJMSXfuU,20135
|
|
35
35
|
tinybird/tb/modules/datasource.py,sha256=pExdYfLQ5e88RqgJ-dbd30k1TJ4LDb_POtSc7fnlJDA,47365
|
|
36
|
-
tinybird/tb/modules/deployment.py,sha256=
|
|
37
|
-
tinybird/tb/modules/deployment_common.py,sha256=
|
|
36
|
+
tinybird/tb/modules/deployment.py,sha256=ffYuMA-N8XNdaTL3NNBTdJxqhKwBfl3E8YY1uUJIJso,16034
|
|
37
|
+
tinybird/tb/modules/deployment_common.py,sha256=9UFyT69ODV_WT3t8QT_9SysUi4UQLOnF0XmTBtpb734,21282
|
|
38
38
|
tinybird/tb/modules/deprecations.py,sha256=rrszC1f_JJeJ8mUxGoCxckQTJFBCR8wREf4XXXN-PRc,4507
|
|
39
39
|
tinybird/tb/modules/dev_server.py,sha256=4PzRoE47vrHJ2ccdA57fd03r4KDgCz4EcayW52gZlA0,10881
|
|
40
40
|
tinybird/tb/modules/endpoint.py,sha256=ksRj6mfDb9Xv63PhTkV_uKSosgysHElqagg3RTt21Do,11958
|
|
@@ -122,8 +122,8 @@ tinybird/tb_cli_modules/config.py,sha256=IsgdtFRnUrkY8-Zo32lmk6O7u3bHie1QCxLwgp4
|
|
|
122
122
|
tinybird/tb_cli_modules/exceptions.py,sha256=pmucP4kTF4irIt7dXiG-FcnI-o3mvDusPmch1L8RCWk,3367
|
|
123
123
|
tinybird/tb_cli_modules/regions.py,sha256=QjsL5H6Kg-qr0aYVLrvb1STeJ5Sx_sjvbOYO0LrEGMk,166
|
|
124
124
|
tinybird/tb_cli_modules/telemetry.py,sha256=Hh2Io8ZPROSunbOLuMvuIFU4TqwWPmQTqal4WS09K1A,10449
|
|
125
|
-
tinybird-0.0.1.
|
|
126
|
-
tinybird-0.0.1.
|
|
127
|
-
tinybird-0.0.1.
|
|
128
|
-
tinybird-0.0.1.
|
|
129
|
-
tinybird-0.0.1.
|
|
125
|
+
tinybird-0.0.1.dev311.dist-info/METADATA,sha256=4UVOr7H95wJwE4NAMhdGRQH4OSqH9GYO9Q7YJrzzhyU,1881
|
|
126
|
+
tinybird-0.0.1.dev311.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
127
|
+
tinybird-0.0.1.dev311.dist-info/entry_points.txt,sha256=LwdHU6TfKx4Qs7BqqtaczEZbImgU7Abe9Lp920zb_fo,43
|
|
128
|
+
tinybird-0.0.1.dev311.dist-info/top_level.txt,sha256=VqqqEmkAy7UNaD8-V51FCoMMWXjLUlR0IstvK7tJYVY,54
|
|
129
|
+
tinybird-0.0.1.dev311.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|