tinybird 4.3.3.dev0__tar.gz → 4.4.1__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.
Files changed (126) hide show
  1. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/PKG-INFO +11 -1
  2. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/client.py +7 -1
  3. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/config.py +6 -3
  4. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/datafile/common.py +55 -41
  5. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/service_datasources.py +25 -18
  6. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/__cli__.py +2 -2
  7. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/client.py +8 -1
  8. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/config.py +6 -2
  9. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/branch.py +6 -6
  10. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/cli.py +10 -5
  11. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/common.py +26 -8
  12. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/connection.py +3 -3
  13. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/connection_s3.py +2 -2
  14. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/copy.py +15 -2
  15. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/datafile/build.py +4 -2
  16. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/datafile/build_datasource.py +2 -2
  17. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/datafile/playground.py +4 -2
  18. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/datasource.py +16 -12
  19. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/deprecations.py +12 -8
  20. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/feedback_manager.py +52 -33
  21. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/info.py +4 -4
  22. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/local.py +8 -4
  23. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/local_common.py +20 -16
  24. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/login_common.py +2 -2
  25. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/open.py +2 -2
  26. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/preview.py +2 -2
  27. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/workspace.py +10 -6
  28. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/workspace_members.py +4 -4
  29. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb_cli_modules/auth.py +1 -1
  30. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb_cli_modules/branch.py +8 -8
  31. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb_cli_modules/cli.py +10 -10
  32. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb_cli_modules/common.py +11 -11
  33. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb_cli_modules/datasource.py +4 -4
  34. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb_cli_modules/pipe.py +14 -2
  35. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb_cli_modules/workspace.py +2 -2
  36. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird.egg-info/PKG-INFO +11 -1
  37. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/setup.cfg +0 -0
  38. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/__cli__.py +0 -0
  39. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/ch_utils/constants.py +0 -0
  40. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/ch_utils/engine.py +0 -0
  41. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/check_pypi.py +0 -0
  42. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/context.py +0 -0
  43. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/datafile/exceptions.py +0 -0
  44. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/datafile/parse_connection.py +0 -0
  45. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/datafile/parse_datasource.py +0 -0
  46. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/datafile/parse_pipe.py +0 -0
  47. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/datatypes.py +0 -0
  48. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/feedback_manager.py +0 -0
  49. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/git_settings.py +0 -0
  50. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/prompts.py +0 -0
  51. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/sql.py +0 -0
  52. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/sql_template.py +0 -0
  53. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/sql_template_fmt.py +0 -0
  54. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/sql_toolset.py +0 -0
  55. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/syncasync.py +0 -0
  56. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/check_pypi.py +0 -0
  57. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/cli.py +0 -0
  58. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/build.py +0 -0
  59. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/build_common.py +0 -0
  60. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/cicd.py +0 -0
  61. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/config.py +0 -0
  62. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/connection_kafka.py +0 -0
  63. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/create.py +0 -0
  64. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/datafile/build_common.py +0 -0
  65. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/datafile/build_pipe.py +0 -0
  66. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/datafile/diff.py +0 -0
  67. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/datafile/fixture.py +0 -0
  68. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/datafile/format_common.py +0 -0
  69. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/datafile/format_connection.py +0 -0
  70. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/datafile/format_datasource.py +0 -0
  71. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/datafile/format_pipe.py +0 -0
  72. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/datafile/pipe_checker.py +0 -0
  73. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/datafile/pull.py +0 -0
  74. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/deployment.py +0 -0
  75. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/deployment_common.py +0 -0
  76. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/endpoint.py +0 -0
  77. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/exceptions.py +0 -0
  78. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/fmt.py +0 -0
  79. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/infra.py +0 -0
  80. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/job.py +0 -0
  81. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/job_common.py +0 -0
  82. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/llm.py +0 -0
  83. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/llm_utils.py +0 -0
  84. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/local_logs.py +0 -0
  85. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/login.py +0 -0
  86. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/logout.py +0 -0
  87. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/logs.py +0 -0
  88. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/materialization.py +0 -0
  89. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/pipe.py +0 -0
  90. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/project.py +0 -0
  91. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/project_commands.py +0 -0
  92. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/py_project.py +0 -0
  93. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/query_output.py +0 -0
  94. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/regions.py +0 -0
  95. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/secret.py +0 -0
  96. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/secret_common.py +0 -0
  97. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/sink.py +0 -0
  98. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/table.py +0 -0
  99. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/telemetry.py +0 -0
  100. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/test.py +0 -0
  101. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/test_common.py +0 -0
  102. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/tinyunit/tinyunit.py +0 -0
  103. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/tinyunit/tinyunit_lib.py +0 -0
  104. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/token.py +0 -0
  105. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/ts_project.py +0 -0
  106. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb/modules/watch.py +0 -0
  107. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb_cli.py +0 -0
  108. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb_cli_modules/cicd.py +0 -0
  109. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb_cli_modules/config.py +0 -0
  110. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb_cli_modules/connection.py +0 -0
  111. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb_cli_modules/exceptions.py +0 -0
  112. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb_cli_modules/fmt.py +0 -0
  113. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb_cli_modules/job.py +0 -0
  114. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb_cli_modules/regions.py +0 -0
  115. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb_cli_modules/tag.py +0 -0
  116. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb_cli_modules/telemetry.py +0 -0
  117. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb_cli_modules/test.py +0 -0
  118. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb_cli_modules/tinyunit/tinyunit.py +0 -0
  119. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py +0 -0
  120. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tb_cli_modules/workspace_members.py +0 -0
  121. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird/tornado_template.py +0 -0
  122. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird.egg-info/SOURCES.txt +0 -0
  123. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird.egg-info/dependency_links.txt +0 -0
  124. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird.egg-info/entry_points.txt +0 -0
  125. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird.egg-info/requires.txt +0 -0
  126. {tinybird-4.3.3.dev0 → tinybird-4.4.1}/tinybird.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: tinybird
3
- Version: 4.3.3.dev0
3
+ Version: 4.4.1
4
4
  Summary: Tinybird Command Line Tool
5
5
  Home-page: https://www.tinybird.co/docs/forward/commands
6
6
  Author: Tinybird
@@ -52,6 +52,16 @@ The Tinybird command-line tool allows you to use all the Tinybird functionality
52
52
  Changelog
53
53
  ----------
54
54
 
55
+ 4.4.1
56
+ *******
57
+
58
+ - `Changed` CLI messages now show `uv run tinybird` for python-sdk projects and `npx tinybird` for ts-sdk projects instead of `tb`.
59
+
60
+ 4.4.0
61
+ *******
62
+
63
+ - `Added` `tb copy run` has a new `--on-demand-compute` flag to use on-demand compute instances for copy jobs.
64
+
55
65
  4.3.2
56
66
  *******
57
67
 
@@ -635,11 +635,17 @@ class TinyB:
635
635
  return await self._req(f"/v0/pipes/{pipe_name_or_id}/nodes/{node_id}/copy", method="DELETE")
636
636
 
637
637
  async def pipe_run_copy(
638
- self, pipe_name_or_id: str, params: Optional[Dict[str, str]] = None, mode: Optional[str] = None
638
+ self,
639
+ pipe_name_or_id: str,
640
+ params: Optional[Dict[str, str]] = None,
641
+ mode: Optional[str] = None,
642
+ on_demand_compute: bool = False,
639
643
  ):
640
644
  params = {**params} if params else {}
641
645
  if mode:
642
646
  params["_mode"] = mode
647
+ if on_demand_compute:
648
+ params["on_demand_compute"] = "true"
643
649
  return await self._req(f"/v0/pipes/{pipe_name_or_id}/copy?{urlencode(params)}", method="POST")
644
650
 
645
651
  async def pipe_resume_copy(self, pipe_name_or_id: str):
@@ -30,7 +30,8 @@ LEGACY_HOSTS = {
30
30
  "https://api.eu-central-1.aws.tinybird.co": "https://app.tinybird.co/aws/eu-central-1",
31
31
  "https://api.eu-west-1.aws.tinybird.co": "https://app.tinybird.co/aws/eu-west-1",
32
32
  "https://api.europe-west2.gcp.tinybird.co": "https://cloud.tinybird.co/gcp/europe-west2",
33
- "https://api.ap-east.aws.tinybird.co": "https://app.tinybird.co/aws/ap-east",
33
+ "https://api.ap-east.aws.tinybird.co": "https://app.tinybird.co/aws/ap-east-1",
34
+ "https://api.ap-east-1.aws.tinybird.co": "https://app.tinybird.co/aws/ap-east-1",
34
35
  "https://api.northamerica-northeast2.gcp.tinybird.co": "https://app.tinybird.co/gcp/northamerica-northeast2",
35
36
  "https://api.wadus1.gcp.tinybird.co": "https://app.wadus.tinybird.co/gcp/wadus1",
36
37
  "https://api.wadus2.gcp.tinybird.co": "https://app.wadus.tinybird.co/gcp/wadus2",
@@ -47,7 +48,8 @@ LEGACY_HOSTS = {
47
48
  "https://ui.us-west-2.aws.tinybird.co": "https://app.tinybird.co/aws/us-west-2",
48
49
  "https://ui.eu-central-1.aws.tinybird.co": "https://app.tinybird.co/aws/eu-central-1",
49
50
  "https://ui.europe-west2.gcp.tinybird.co": "https://cloud.tinybird.co/gcp/europe-west2",
50
- "https://ui.ap-east.aws.tinybird.co": "https://app.tinybird.co/aws/ap-east",
51
+ "https://ui.ap-east.aws.tinybird.co": "https://app.tinybird.co/aws/ap-east-1",
52
+ "https://ui.ap-east-1.aws.tinybird.co": "https://app.tinybird.co/aws/ap-east-1",
51
53
  "https://ui.split.tinybird.co": "https://app.tinybird.co/aws/split-us-east",
52
54
  "https://ui.split.us-west-2.aws.tinybird.co": "https://app.tinybird.co/aws/split-us-west-2",
53
55
  "https://ui.northamerica-northeast2.gcp.tinybird.co": "https://app.tinybird.co/gcp/northamerica-northeast2",
@@ -74,7 +76,8 @@ CLOUD_HOSTS = {
74
76
  "https://api.eu-west-1.aws.tinybird.co": "https://cloud.tinybird.co/aws/eu-west-1",
75
77
  "https://api.europe-west2.gcp.tinybird.co": "https://cloud.tinybird.co/gcp/europe-west2",
76
78
  "https://api.northamerica-northeast2.gcp.tinybird.co": "https://cloud.tinybird.co/gcp/northamerica-northeast2",
77
- "https://api.ap-east.aws.tinybird.co": "https://cloud.tinybird.co/aws/ap-east",
79
+ "https://api.ap-east.aws.tinybird.co": "https://cloud.tinybird.co/aws/ap-east-1",
80
+ "https://api.ap-east-1.aws.tinybird.co": "https://cloud.tinybird.co/aws/ap-east-1",
78
81
  "https://ui.tinybird.co": "https://cloud.tinybird.co/gcp/europe-west3",
79
82
  "https://ui.us-east.tinybird.co": "https://cloud.tinybird.co/gcp/us-east4",
80
83
  "https://ui.us-east.aws.tinybird.co": "https://cloud.tinybird.co/aws/us-east-1",
@@ -282,12 +282,16 @@ def extract_column_names_from_sorting_key_part(part: str) -> List[str]:
282
282
  """
283
283
  Extract actual column names from a sorting key part (which might be an expression).
284
284
 
285
- Examples:
286
- - "shop" -> ["shop"]
287
- - "`column_name`" -> ["column_name"]
288
- - "ifNull(ad_id, '')" -> ["ad_id"]
289
- - "toDate(timestamp)" -> ["timestamp"]
290
- - "concat(first_name, last_name)" -> ["first_name", "last_name"]
285
+ >>> extract_column_names_from_sorting_key_part("shop")
286
+ ['shop']
287
+ >>> extract_column_names_from_sorting_key_part("`column_name`")
288
+ ['column_name']
289
+ >>> extract_column_names_from_sorting_key_part("ifNull(ad_id, '')")
290
+ ['ad_id']
291
+ >>> extract_column_names_from_sorting_key_part("toDate(timestamp)")
292
+ ['timestamp']
293
+ >>> extract_column_names_from_sorting_key_part("concat(first_name, last_name)")
294
+ ['first_name', 'last_name']
291
295
  """
292
296
  columns = []
293
297
 
@@ -312,10 +316,20 @@ def parse_sorting_key_column_names(sorting_key: str) -> List[str]:
312
316
  """
313
317
  Extract all column names from a sorting key expression.
314
318
 
315
- Examples:
316
- - "shop, event_date, channel" -> ["shop", "event_date", "channel"]
317
- - "shop, event_date, ifNull(ad_id, ''), event_id" -> ["shop", "event_date", "ad_id", "event_id"]
318
- - "tuple(shop, toDate(timestamp))" -> ["shop", "timestamp"]
319
+ >>> parse_sorting_key_column_names("shop, event_date, channel")
320
+ ['shop', 'event_date', 'channel']
321
+ >>> parse_sorting_key_column_names("shop, event_date, ifNull(ad_id, ''), event_id")
322
+ ['shop', 'event_date', 'ad_id', 'event_id']
323
+ >>> parse_sorting_key_column_names("tuple(shop, toDate(timestamp))")
324
+ ['shop', 'timestamp']
325
+ >>> parse_sorting_key_column_names("timestamp, substring(value, 2, 1)")
326
+ ['timestamp', 'value']
327
+ >>> parse_sorting_key_column_names("cityHash64(id)")
328
+ ['id']
329
+ >>> parse_sorting_key_column_names("toStartOfHour(timestamp)")
330
+ ['timestamp']
331
+ >>> parse_sorting_key_column_names("toStartOfHour(timestamp), id, substring(a, 2, 1)")
332
+ ['timestamp', 'id', 'a']
319
333
  """
320
334
  # Remove tuple() wrapper if present
321
335
  column_str = sorting_key
@@ -611,7 +625,6 @@ class Datafile:
611
625
 
612
626
  def _parse_sorting_key_columns(self, sorting_key: str, engine_ver_column: Optional[str]) -> List[str]:
613
627
  """Parse sorting key to extract column names and validate constraints."""
614
- # Validate ENGINE_VER column constraint early
615
628
  if engine_ver_column and engine_ver_column in sorting_key:
616
629
  raise DatafileValidationError(
617
630
  f"ENGINE_VER column '{engine_ver_column}' cannot be included in the sorting key for ReplacingMergeTree. "
@@ -620,36 +633,33 @@ class Datafile:
620
633
  f"define the record identity (what makes it unique), while ENGINE_VER tracks which version to keep."
621
634
  )
622
635
 
623
- # Remove tuple() wrapper if present
624
- column_str = sorting_key
625
- if column_str.startswith("tuple(") and column_str.endswith(")"):
626
- column_str = column_str[6:-1]
627
-
628
- sorting_key_columns = []
629
-
630
- for part in column_str.split(","):
631
- part = part.strip()
632
-
633
- if self._is_aggregate_function_expression(part):
636
+ self._validate_no_aggregate_functions_in_sorting_key(sorting_key)
637
+
638
+ return parse_sorting_key_column_names(sorting_key)
639
+
640
+ def _validate_no_aggregate_functions_in_sorting_key(self, sorting_key: str) -> None:
641
+ """Validate that sorting key doesn't contain aggregate function expressions."""
642
+ for match in re.finditer(r"(\w+)\s*\(", sorting_key):
643
+ func_name = match.group(1)
644
+ if self._is_aggregate_function_expression(func_name):
645
+ start = match.start()
646
+ paren_start = match.end() - 1
647
+ depth = 1
648
+ pos = paren_start + 1
649
+ while pos < len(sorting_key) and depth > 0:
650
+ if sorting_key[pos] == "(":
651
+ depth += 1
652
+ elif sorting_key[pos] == ")":
653
+ depth -= 1
654
+ pos += 1
655
+ full_expr = sorting_key[start:pos]
634
656
  raise DatafileValidationError(
635
- f"Sorting key contains aggregate function expression '{part}'. Aggregate function expressions cannot be used in sorting keys."
657
+ f"Sorting key contains aggregate function expression '{full_expr}'. "
658
+ f"Aggregate function expressions cannot be used in sorting keys."
636
659
  )
637
660
 
638
- # Extract column names from the part
639
- extracted_columns = extract_column_names_from_sorting_key_part(part)
640
- sorting_key_columns.extend(extracted_columns)
641
-
642
- return sorting_key_columns
643
-
644
- def _is_aggregate_function_expression(self, part: str) -> bool:
645
- """Check if a sorting key part is an aggregate function expression."""
646
- if not ("(" in part and part.endswith(")")):
647
- return False
648
-
649
- func_start = part.find("(")
650
- func_name = part[:func_start].strip().lower()
651
-
652
- aggregate_function_names = {
661
+ _AGGREGATE_FUNCTION_NAMES = frozenset(
662
+ {
653
663
  "sum",
654
664
  "count",
655
665
  "avg",
@@ -669,8 +679,11 @@ class Datafile:
669
679
  "groupuniqarraymerge",
670
680
  "uniqmerge",
671
681
  }
682
+ )
672
683
 
673
- return func_name in aggregate_function_names
684
+ def _is_aggregate_function_expression(self, func_name: str) -> bool:
685
+ """Check if a function name is an aggregate function."""
686
+ return func_name.lower() in self._AGGREGATE_FUNCTION_NAMES
674
687
 
675
688
  def _validate_columns_against_schema(
676
689
  self, sorting_key_columns: List[str], schema_columns: Dict[str, Dict[str, Any]]
@@ -680,10 +693,11 @@ class Datafile:
680
693
  return # No schema information available, can't validate
681
694
 
682
695
  for col_name in sorting_key_columns:
683
- if col_name not in schema_columns:
696
+ column_info = schema_columns.get(col_name)
697
+ if column_info is None:
684
698
  continue
685
699
 
686
- self._validate_single_column(col_name, schema_columns[col_name])
700
+ self._validate_single_column(col_name, column_info)
687
701
 
688
702
  def _validate_single_column(self, col_name: str, column_info: Dict[str, Any]) -> None:
689
703
  """Validate a single column for use in sorting keys."""
@@ -36,6 +36,7 @@ def get_tinybird_service_datasources() -> List[Dict[str, Any]]:
36
36
  {"name": "read_bytes", "type": "UInt64"},
37
37
  {"name": "read_rows", "type": "UInt64"},
38
38
  {"name": "cpu_time", "type": "Float32"},
39
+ {"name": "result_rows", "type": "UInt64"},
39
40
  {"name": "url", "type": "Nullable(String)"},
40
41
  {"name": "error", "type": "UInt8"},
41
42
  {"name": "status_code", "type": "Int32"},
@@ -90,11 +91,8 @@ def get_tinybird_service_datasources() -> List[Dict[str, Any]]:
90
91
  {"name": "import_id", "type": "String"},
91
92
  {"name": "job_id", "type": "Nullable(String)"},
92
93
  {"name": "source", "type": "String"},
93
- {"name": "token_id", "type": "String"},
94
94
  {"name": "block_id", "type": "String"},
95
95
  {"name": "status", "type": "String"},
96
- {"name": "user_id", "type": "String"},
97
- {"name": "user_mail", "type": "String"},
98
96
  {"name": "datasource_id", "type": "String"},
99
97
  {"name": "datasource_name", "type": "String"},
100
98
  {"name": "start_offset", "type": "Nullable(Int64)"},
@@ -125,6 +123,8 @@ def get_tinybird_service_datasources() -> List[Dict[str, Any]]:
125
123
  {"name": "result", "type": "String"},
126
124
  {"name": "elapsed_time", "type": "Float32"},
127
125
  {"name": "error", "type": "Nullable(String)"},
126
+ {"name": "Options.Names", "type": "Array(String)"},
127
+ {"name": "Options.Values", "type": "Array(String)"},
128
128
  {"name": "request_id", "type": "String"},
129
129
  {"name": "import_id", "type": "Nullable(String)"},
130
130
  {"name": "job_id", "type": "Nullable(String)"},
@@ -133,9 +133,9 @@ def get_tinybird_service_datasources() -> List[Dict[str, Any]]:
133
133
  {"name": "blocks_ids", "type": "Array(String)"},
134
134
  {"name": "operation_id", "type": "String"},
135
135
  {"name": "read_rows", "type": "UInt64"},
136
+ {"name": "read_bytes", "type": "UInt64"},
136
137
  {"name": "cpu_time", "type": "Float32"},
137
138
  {"name": "memory_usage", "type": "UInt64"},
138
- {"name": "read_bytes", "type": "UInt64"},
139
139
  {"name": "written_rows", "type": "UInt64"},
140
140
  {"name": "written_bytes", "type": "UInt64"},
141
141
  {"name": "written_rows_quarantine", "type": "UInt64"},
@@ -143,6 +143,7 @@ def get_tinybird_service_datasources() -> List[Dict[str, Any]]:
143
143
  {"name": "pipe_id", "type": "String"},
144
144
  {"name": "pipe_name", "type": "String"},
145
145
  {"name": "release", "type": "String"},
146
+ {"name": "resource_tags", "type": "Array(String)"},
146
147
  ],
147
148
  },
148
149
  {
@@ -156,7 +157,8 @@ def get_tinybird_service_datasources() -> List[Dict[str, Any]]:
156
157
  },
157
158
  "columns": [
158
159
  {"name": "event_date", "type": "DateTime"},
159
- {"name": "workspace_id", "type": "String"},
160
+ {"name": "datasource_id", "type": "String"},
161
+ {"name": "datasource_name", "type": "String"},
160
162
  {"name": "event_type", "type": "LowCardinality(String)"},
161
163
  {"name": "pipe_id", "type": "String"},
162
164
  {"name": "pipe_name", "type": "String"},
@@ -193,6 +195,7 @@ def get_tinybird_service_datasources() -> List[Dict[str, Any]]:
193
195
  {"name": "url", "type": "Nullable(String)"},
194
196
  {"name": "status_code", "type": "Nullable(Int32)"},
195
197
  {"name": "error", "type": "Nullable(String)"},
198
+ {"name": "resource_tags", "type": "Array(String)"},
196
199
  ],
197
200
  },
198
201
  {
@@ -252,7 +255,6 @@ def get_tinybird_service_datasources() -> List[Dict[str, Any]]:
252
255
  {"name": "query_normalized", "type": "String"},
253
256
  {"name": "error_code", "type": "Int32"},
254
257
  {"name": "error", "type": "Nullable(String)"},
255
- {"name": "url", "type": "String"},
256
258
  {"name": "duration", "type": "UInt64"},
257
259
  {"name": "read_rows", "type": "UInt64"},
258
260
  {"name": "read_bytes", "type": "UInt64"},
@@ -337,7 +339,7 @@ def get_tinybird_service_datasources() -> List[Dict[str, Any]]:
337
339
  "engine": {},
338
340
  "columns": [
339
341
  {"name": "timestamp", "type": "DateTime"},
340
- {"name": "event_type", "type": "LowCardinality(String)"},
342
+ {"name": "event", "type": "LowCardinality(String)"},
341
343
  {"name": "origin_provider", "type": "LowCardinality(String)"},
342
344
  {"name": "origin_region", "type": "LowCardinality(String)"},
343
345
  {"name": "destination_provider", "type": "LowCardinality(String)"},
@@ -441,10 +443,7 @@ def get_tinybird_service_datasources() -> List[Dict[str, Any]]:
441
443
  "columns": [
442
444
  {"name": "start_time", "type": "DateTime"},
443
445
  {"name": "end_time", "type": "DateTime"},
444
- {"name": "organization_id", "type": "String"},
445
- {"name": "organization_name", "type": "String"},
446
446
  {"name": "workspace_id", "type": "String"},
447
- {"name": "workspace_name", "type": "String"},
448
447
  {"name": "user_email", "type": "String"},
449
448
  {"name": "request_id", "type": "String"},
450
449
  {"name": "prompt_tokens", "type": "UInt32"},
@@ -466,7 +465,6 @@ def get_tinybird_service_datasources() -> List[Dict[str, Any]]:
466
465
  "partition_key": "toYYYYMM(run_validation)",
467
466
  },
468
467
  "columns": [
469
- {"name": "cluster", "type": "LowCardinality(String)"},
470
468
  {"name": "host", "type": "LowCardinality(String)"},
471
469
  {"name": "version", "type": "LowCardinality(String)"},
472
470
  {"name": "stable_version", "type": "LowCardinality(String)"},
@@ -553,6 +551,7 @@ def get_organization_service_datasources() -> List[Dict[str, Any]]:
553
551
  {"name": "plan", "type": "String"},
554
552
  {"name": "created_at", "type": "DateTime"},
555
553
  {"name": "deleted_at", "type": "Nullable(DateTime)"},
554
+ {"name": "origin", "type": "String"},
556
555
  ],
557
556
  },
558
557
  {
@@ -609,6 +608,8 @@ def get_organization_service_datasources() -> List[Dict[str, Any]]:
609
608
  {"name": "result", "type": "String"},
610
609
  {"name": "elapsed_time", "type": "Float32"},
611
610
  {"name": "error", "type": "Nullable(String)"},
611
+ {"name": "Options.Names", "type": "Array(String)"},
612
+ {"name": "Options.Values", "type": "Array(String)"},
612
613
  {"name": "request_id", "type": "String"},
613
614
  {"name": "import_id", "type": "Nullable(String)"},
614
615
  {"name": "job_id", "type": "Nullable(String)"},
@@ -617,16 +618,16 @@ def get_organization_service_datasources() -> List[Dict[str, Any]]:
617
618
  {"name": "blocks_ids", "type": "Array(String)"},
618
619
  {"name": "operation_id", "type": "String"},
619
620
  {"name": "read_rows", "type": "UInt64"},
621
+ {"name": "read_bytes", "type": "UInt64"},
620
622
  {"name": "cpu_time", "type": "Float32"},
621
623
  {"name": "memory_usage", "type": "UInt64"},
622
- {"name": "read_bytes", "type": "UInt64"},
623
624
  {"name": "written_rows", "type": "UInt64"},
624
625
  {"name": "written_bytes", "type": "UInt64"},
625
626
  {"name": "written_rows_quarantine", "type": "UInt64"},
626
627
  {"name": "written_bytes_quarantine", "type": "UInt64"},
627
628
  {"name": "pipe_id", "type": "String"},
628
629
  {"name": "pipe_name", "type": "String"},
629
- {"name": "release", "type": "String"},
630
+ {"name": "resource_tags", "type": "Array(String)"},
630
631
  ],
631
632
  },
632
633
  {
@@ -641,6 +642,8 @@ def get_organization_service_datasources() -> List[Dict[str, Any]]:
641
642
  "columns": [
642
643
  {"name": "event_date", "type": "DateTime"},
643
644
  {"name": "workspace_id", "type": "String"},
645
+ {"name": "datasource_id", "type": "String"},
646
+ {"name": "datasource_name", "type": "String"},
644
647
  {"name": "event_type", "type": "LowCardinality(String)"},
645
648
  {"name": "pipe_id", "type": "String"},
646
649
  {"name": "pipe_name", "type": "String"},
@@ -648,12 +651,14 @@ def get_organization_service_datasources() -> List[Dict[str, Any]]:
648
651
  {"name": "executions", "type": "UInt64"},
649
652
  {"name": "avg_elapsed_time_state", "type": "AggregateFunction(avg, Float32)"},
650
653
  {"name": "quantiles_state", "type": "AggregateFunction(quantiles(0.9, 0.95, 0.99), Float64)"},
651
- {"name": "read_rows", "type": "UInt64"},
652
654
  {"name": "read_bytes", "type": "UInt64"},
653
- {"name": "written_rows", "type": "UInt64"},
655
+ {"name": "read_rows", "type": "UInt64"},
654
656
  {"name": "written_bytes", "type": "UInt64"},
657
+ {"name": "written_rows", "type": "UInt64"},
655
658
  {"name": "written_rows_quarantine", "type": "UInt64"},
656
659
  {"name": "written_bytes_quarantine", "type": "UInt64"},
660
+ {"name": "cpu_time", "type": "Float32"},
661
+ {"name": "resource_tags", "type": "Array(String)"},
657
662
  ],
658
663
  },
659
664
  {
@@ -703,6 +708,7 @@ def get_organization_service_datasources() -> List[Dict[str, Any]]:
703
708
  {"name": "read_bytes", "type": "UInt64"},
704
709
  {"name": "read_rows", "type": "UInt64"},
705
710
  {"name": "cpu_time", "type": "Float32"},
711
+ {"name": "result_rows", "type": "UInt64"},
706
712
  {"name": "url", "type": "Nullable(String)"},
707
713
  {"name": "error", "type": "UInt8"},
708
714
  {"name": "status_code", "type": "Int32"},
@@ -712,6 +718,7 @@ def get_organization_service_datasources() -> List[Dict[str, Any]]:
712
718
  {"name": "release", "type": "String"},
713
719
  {"name": "user_agent", "type": "Nullable(String)"},
714
720
  {"name": "resource_tags", "type": "Array(String)"},
721
+ {"name": "memory_usage", "type": "UInt64"},
715
722
  ],
716
723
  },
717
724
  {
@@ -722,7 +729,7 @@ def get_organization_service_datasources() -> List[Dict[str, Any]]:
722
729
  "columns": [
723
730
  {"name": "workspace_id", "type": "String"},
724
731
  {"name": "timestamp", "type": "DateTime"},
725
- {"name": "event_type", "type": "LowCardinality(String)"},
732
+ {"name": "event", "type": "LowCardinality(String)"},
726
733
  {"name": "origin_provider", "type": "LowCardinality(String)"},
727
734
  {"name": "origin_region", "type": "LowCardinality(String)"},
728
735
  {"name": "destination_provider", "type": "LowCardinality(String)"},
@@ -801,7 +808,6 @@ def get_organization_service_datasources() -> List[Dict[str, Any]]:
801
808
  {"name": "query_normalized", "type": "String"},
802
809
  {"name": "error_code", "type": "Int32"},
803
810
  {"name": "error", "type": "Nullable(String)"},
804
- {"name": "url", "type": "String"},
805
811
  {"name": "duration", "type": "UInt64"},
806
812
  {"name": "read_rows", "type": "UInt64"},
807
813
  {"name": "read_bytes", "type": "UInt64"},
@@ -893,6 +899,7 @@ def get_organization_service_datasources() -> List[Dict[str, Any]]:
893
899
  {"name": "url", "type": "Nullable(String)"},
894
900
  {"name": "status_code", "type": "Nullable(Int32)"},
895
901
  {"name": "error", "type": "Nullable(String)"},
902
+ {"name": "resource_tags", "type": "Array(String)"},
896
903
  ],
897
904
  },
898
905
  {
@@ -934,7 +941,7 @@ def get_organization_service_datasources() -> List[Dict[str, Any]]:
934
941
  {"name": "organization_name", "type": "String"},
935
942
  {"name": "plan_qps", "type": "SimpleAggregateFunction(max, Int64)"},
936
943
  {"name": "total_qps", "type": "UInt64"},
937
- {"name": "overage", "type": "Int64"},
944
+ {"name": "overages", "type": "Int64"},
938
945
  ],
939
946
  },
940
947
  {
@@ -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__ = '4.3.3.dev0'
8
- __revision__ = '894a8b6'
7
+ __version__ = '4.4.1'
8
+ __revision__ = '5658fd7'
@@ -645,11 +645,18 @@ class TinyB:
645
645
  return self._req(f"/v0/pipes/{pipe_name_or_id}/nodes/{node_id}/copy", method="DELETE")
646
646
 
647
647
  def pipe_run(
648
- self, pipe_name_or_id: str, pipe_type: str, params: Optional[Dict[str, str]] = None, mode: Optional[str] = None
648
+ self,
649
+ pipe_name_or_id: str,
650
+ pipe_type: str,
651
+ params: Optional[Dict[str, str]] = None,
652
+ mode: Optional[str] = None,
653
+ on_demand_compute: bool = False,
649
654
  ):
650
655
  params = {**params} if params else {}
651
656
  if mode:
652
657
  params["_mode"] = mode
658
+ if on_demand_compute:
659
+ params["on_demand_compute"] = "true"
653
660
  return self._req(f"/v0/pipes/{pipe_name_or_id}/{pipe_type}?{urlencode(params)}", method="POST")
654
661
 
655
662
  def pipe_resume_copy(self, pipe_name_or_id: str):
@@ -30,7 +30,9 @@ CLOUD_HOSTS = {
30
30
  "https://api.eu-central-1.aws.tinybird.co": "https://cloud.tinybird.co/aws/eu-central-1",
31
31
  "https://api.eu-west-1.aws.tinybird.co": "https://cloud.tinybird.co/aws/eu-west-1",
32
32
  "https://api.europe-west2.gcp.tinybird.co": "https://cloud.tinybird.co/gcp/europe-west2",
33
- "https://api.ap-east.aws.tinybird.co": "https://cloud.tinybird.co/aws/ap-east",
33
+ "https://api.ap-east.aws.tinybird.co": "https://cloud.tinybird.co/aws/ap-east-1",
34
+ "https://api.ap-east-1.aws.tinybird.co": "https://cloud.tinybird.co/aws/ap-east-1",
35
+ "https://api.ap-southeast-2.aws.tinybird.co": "https://cloud.tinybird.co/aws/ap-southeast-2",
34
36
  "https://ui.tinybird.co": "https://cloud.tinybird.co/gcp/europe-west3",
35
37
  "https://ui.us-east.tinybird.co": "https://cloud.tinybird.co/gcp/us-east4",
36
38
  "https://ui.us-east.aws.tinybird.co": "https://cloud.tinybird.co/aws/us-east-1",
@@ -47,7 +49,9 @@ CH_HOSTS = {
47
49
  "https://api.eu-central-1.aws.tinybird.co": "https://clickhouse.eu-central-1.aws.tinybird.co",
48
50
  "https://api.eu-west-1.aws.tinybird.co": "https://clickhouse.eu-west-1.aws.tinybird.co",
49
51
  "https://api.europe-west2.gcp.tinybird.co": "https://clickhouse.europe-west2.gcp.tinybird.co",
50
- "https://api.ap-east.aws.tinybird.co": "https://clickhouse.ap-east.aws.tinybird.co",
52
+ "https://api.ap-east.aws.tinybird.co": "https://clickhouse.ap-east-1.aws.tinybird.co",
53
+ "https://api.ap-east-1.aws.tinybird.co": "https://clickhouse.ap-east-1.aws.tinybird.co",
54
+ "https://api.ap-southeast-2.aws.tinybird.co": "https://clickhouse.ap-southeast-2.aws.tinybird.co",
51
55
  "https://ui.tinybird.co": "https://clickhouse.tinybird.co",
52
56
  "https://ui.us-east.tinybird.co": "https://clickhouse.us-east.tinybird.co",
53
57
  "https://ui.us-east.aws.tinybird.co": "https://clickhouse.us-east.aws.tinybird.co",
@@ -21,7 +21,7 @@ from tinybird.tb.modules.common import (
21
21
  )
22
22
  from tinybird.tb.modules.config import CLIConfig
23
23
  from tinybird.tb.modules.exceptions import CLIBranchException, CLIException
24
- from tinybird.tb.modules.feedback_manager import FeedbackManager
24
+ from tinybird.tb.modules.feedback_manager import FeedbackManager, get_cli_name
25
25
 
26
26
 
27
27
  @cli.group()
@@ -125,7 +125,7 @@ def delete_branch(branch_name_or_id: str, yes: bool) -> None:
125
125
  raise CLIBranchException(FeedbackManager.error_exception(error=str(e)))
126
126
 
127
127
  if not workspace_to_delete:
128
- raise CLIBranchException(FeedbackManager.error_branch(branch=branch_name_or_id))
128
+ raise CLIBranchException(FeedbackManager.error_branch(branch=branch_name_or_id, cli=get_cli_name()))
129
129
 
130
130
  if yes or click.confirm(FeedbackManager.warning_confirm_delete_branch(branch=workspace_to_delete["name"])):
131
131
  need_to_switch_to_main = workspace_to_delete.get("main") and config["id"] == workspace_to_delete["id"]
@@ -148,7 +148,7 @@ def delete_branch(branch_name_or_id: str, yes: bool) -> None:
148
148
  if workspace_main:
149
149
  switch_to_workspace_by_user_workspace_data(config, workspace_main)
150
150
  else:
151
- raise CLIException(FeedbackManager.error_switching_to_main())
151
+ raise CLIException(FeedbackManager.error_switching_to_main(cli=get_cli_name()))
152
152
 
153
153
 
154
154
  @branch.command(name="clear", short_help="Clear a branch by deleting and recreating it.")
@@ -208,10 +208,10 @@ def clear_branch(
208
208
  (workspace for workspace in workspace_branches if workspace["id"] == config["id"]), None
209
209
  )
210
210
  if not workspace_to_clear:
211
- raise CLIBranchException(FeedbackManager.error_not_a_branch())
211
+ raise CLIBranchException(FeedbackManager.error_not_a_branch(cli=get_cli_name()))
212
212
 
213
213
  if not workspace_to_clear:
214
- raise CLIBranchException(FeedbackManager.error_branch(branch=branch_name_or_id or ""))
214
+ raise CLIBranchException(FeedbackManager.error_branch(branch=branch_name_or_id or "", cli=get_cli_name()))
215
215
 
216
216
  branch_name = workspace_to_clear["name"]
217
217
  if yes or click.confirm(FeedbackManager.warning_confirm_clear_workspace()):
@@ -232,7 +232,7 @@ def clear_branch(
232
232
  (workspace for workspace in recreated_branches if workspace.get("name") == branch_name), None
233
233
  )
234
234
  if not recreated_branch:
235
- raise CLIBranchException(FeedbackManager.error_branch(branch=branch_name))
235
+ raise CLIBranchException(FeedbackManager.error_branch(branch=branch_name, cli=get_cli_name()))
236
236
 
237
237
  click.echo(FeedbackManager.success(message=f"✓ Branch '{branch_name}' cleared"))
238
238
  if was_current_branch:
@@ -43,7 +43,7 @@ from tinybird.tb.modules.config import CURRENT_VERSION, CLIConfig
43
43
  from tinybird.tb.modules.datafile.build import build_graph
44
44
  from tinybird.tb.modules.datafile.pull import folder_pull
45
45
  from tinybird.tb.modules.exceptions import CLIChException
46
- from tinybird.tb.modules.feedback_manager import FeedbackManager
46
+ from tinybird.tb.modules.feedback_manager import FeedbackManager, get_cli_name
47
47
  from tinybird.tb.modules.local_common import TB_LOCAL_HOST, TB_LOCAL_PORT, get_tinybird_local_client
48
48
  from tinybird.tb.modules.login_common import check_current_folder_in_sessions
49
49
  from tinybird.tb.modules.project import Project
@@ -68,6 +68,8 @@ PROJECT_TYPE_TYPESCRIPT = "ts-sdk"
68
68
  PROJECT_TYPE_PYTHON = "python-sdk"
69
69
  PROJECT_TYPE_CLI = "cli"
70
70
  PROJECT_TYPES = {PROJECT_TYPE_TYPESCRIPT, PROJECT_TYPE_PYTHON, PROJECT_TYPE_CLI}
71
+
72
+
71
73
  CLI_PROJECT_MARKERS = (
72
74
  "datasources",
73
75
  "pipes",
@@ -471,8 +473,8 @@ def resolve_dev_mode_target(
471
473
  raise CLIException(
472
474
  FeedbackManager.error(
473
475
  message=(
474
- "Cannot deploy to main workspace with 'tb build'. "
475
- "Use 'tb deploy' to deploy to production, or switch to a feature branch."
476
+ f"Cannot deploy to main workspace with '{get_cli_name()} build'. "
477
+ f"Use '{get_cli_name()} deploy' to deploy to production, or switch to a feature branch."
476
478
  )
477
479
  )
478
480
  )
@@ -565,12 +567,13 @@ def cli(
565
567
  click.echo(FeedbackManager.warning_development_cli())
566
568
 
567
569
  if "x.y.z" not in CURRENT_VERSION and latest_version != CURRENT_VERSION:
570
+ cli = get_cli_name(get_project_type_from_tinybird_config(os.getcwd()))
568
571
  click.echo(
569
572
  FeedbackManager.warning(message=f"** New version available. {CURRENT_VERSION} -> {latest_version}")
570
573
  )
571
574
  click.echo(
572
575
  FeedbackManager.warning(
573
- message="** Run `tb update` to update or `export TB_VERSION_WARNING=0` to skip the check.\n"
576
+ message=f"** Run `{cli} update` to update or `export TB_VERSION_WARNING=0` to skip the check.\n"
574
577
  )
575
578
  )
576
579
 
@@ -700,7 +703,9 @@ def cli(
700
703
  if switched_datasource_create_to_cloud:
701
704
  click.echo(
702
705
  FeedbackManager.gray(
703
- message=("Tinybird Local is not running. Running `tb datasource create` against Tinybird Cloud.")
706
+ message=(
707
+ f"Tinybird Local is not running. Running `{get_cli_name()} datasource create` against Tinybird Cloud."
708
+ )
704
709
  )
705
710
  )
706
711