tinybird 0.0.1.dev62__tar.gz → 0.0.1.dev64__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.

Potentially problematic release.


This version of tinybird might be problematic. Click here for more details.

Files changed (101) hide show
  1. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/PKG-INFO +1 -1
  2. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/config.py +4 -6
  3. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/feedback_manager.py +3 -0
  4. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/__cli__.py +2 -2
  5. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/build.py +20 -16
  6. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/config.py +0 -4
  7. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/datafile/parse_pipe.py +2 -0
  8. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/endpoint.py +3 -3
  9. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/local_common.py +3 -2
  10. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/watch.py +2 -7
  11. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb_cli_modules/common.py +0 -2
  12. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb_cli_modules/connection.py +9 -1
  13. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird.egg-info/PKG-INFO +1 -1
  14. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/setup.cfg +0 -0
  15. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/__cli__.py +0 -0
  16. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/ch_utils/constants.py +0 -0
  17. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/ch_utils/engine.py +0 -0
  18. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/check_pypi.py +0 -0
  19. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/client.py +0 -0
  20. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/connectors.py +0 -0
  21. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/context.py +0 -0
  22. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/datafile.py +0 -0
  23. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/datatypes.py +0 -0
  24. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/git_settings.py +0 -0
  25. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/prompts.py +0 -0
  26. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/sql.py +0 -0
  27. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/sql_template.py +0 -0
  28. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/sql_template_fmt.py +0 -0
  29. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/sql_toolset.py +0 -0
  30. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/syncasync.py +0 -0
  31. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/cli.py +0 -0
  32. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/auth.py +0 -0
  33. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/cicd.py +0 -0
  34. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/cli.py +0 -0
  35. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/common.py +0 -0
  36. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/copy.py +0 -0
  37. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/create.py +0 -0
  38. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/datafile/build.py +0 -0
  39. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/datafile/build_common.py +0 -0
  40. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/datafile/build_datasource.py +0 -0
  41. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/datafile/build_pipe.py +0 -0
  42. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/datafile/common.py +0 -0
  43. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/datafile/diff.py +0 -0
  44. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/datafile/exceptions.py +0 -0
  45. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/datafile/fixture.py +0 -0
  46. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/datafile/format_common.py +0 -0
  47. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/datafile/format_datasource.py +0 -0
  48. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/datafile/format_pipe.py +0 -0
  49. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/datafile/parse_datasource.py +0 -0
  50. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/datafile/pipe_checker.py +0 -0
  51. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/datafile/pull.py +0 -0
  52. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/datasource.py +0 -0
  53. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/deployment.py +0 -0
  54. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/exceptions.py +0 -0
  55. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/feedback_manager.py +0 -0
  56. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/fmt.py +0 -0
  57. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/job.py +0 -0
  58. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/llm.py +0 -0
  59. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/llm_utils.py +0 -0
  60. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/local.py +0 -0
  61. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/login.py +0 -0
  62. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/materialization.py +0 -0
  63. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/mock.py +0 -0
  64. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/pipe.py +0 -0
  65. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/project.py +0 -0
  66. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/regions.py +0 -0
  67. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/shell.py +0 -0
  68. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/table.py +0 -0
  69. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/tag.py +0 -0
  70. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/telemetry.py +0 -0
  71. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/test.py +0 -0
  72. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/tinyunit/tinyunit.py +0 -0
  73. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/tinyunit/tinyunit_lib.py +0 -0
  74. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/token.py +0 -0
  75. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/workspace.py +0 -0
  76. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb/modules/workspace_members.py +0 -0
  77. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb_cli.py +0 -0
  78. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb_cli_modules/auth.py +0 -0
  79. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb_cli_modules/branch.py +0 -0
  80. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb_cli_modules/cicd.py +0 -0
  81. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb_cli_modules/cli.py +0 -0
  82. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb_cli_modules/config.py +0 -0
  83. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb_cli_modules/datasource.py +0 -0
  84. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb_cli_modules/exceptions.py +0 -0
  85. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb_cli_modules/fmt.py +0 -0
  86. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb_cli_modules/job.py +0 -0
  87. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb_cli_modules/pipe.py +0 -0
  88. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb_cli_modules/regions.py +0 -0
  89. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb_cli_modules/tag.py +0 -0
  90. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb_cli_modules/telemetry.py +0 -0
  91. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb_cli_modules/test.py +0 -0
  92. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb_cli_modules/tinyunit/tinyunit.py +0 -0
  93. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py +0 -0
  94. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb_cli_modules/workspace.py +0 -0
  95. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tb_cli_modules/workspace_members.py +0 -0
  96. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird/tornado_template.py +0 -0
  97. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird.egg-info/SOURCES.txt +0 -0
  98. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird.egg-info/dependency_links.txt +0 -0
  99. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird.egg-info/entry_points.txt +0 -0
  100. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird.egg-info/requires.txt +0 -0
  101. {tinybird-0.0.1.dev62 → tinybird-0.0.1.dev64}/tinybird.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tinybird
3
- Version: 0.0.1.dev62
3
+ Version: 0.0.1.dev64
4
4
  Summary: Tinybird Command Line Tool
5
5
  Home-page: https://www.tinybird.co/docs/cli/introduction.html
6
6
  Author: Tinybird
@@ -49,12 +49,6 @@ LEGACY_HOSTS = {
49
49
  "https://ui.us-west-2.aws.tinybird.co": "https://app.tinybird.co/aws/us-west-2",
50
50
  "https://ui.eu-central-1.aws.tinybird.co": "https://app.tinybird.co/aws/eu-central-1",
51
51
  "https://ui.ap-east.aws.tinybird.co": "https://app.tinybird.co/aws/ap-east",
52
- "https://inditex-tech.tinybird.co": "https://app.inditex.tinybird.co/gcp/inditex-tech",
53
- "https://inditex-c-stg.tinybird.co": "https://app.inditex.tinybird.co/gcp/inditex-c-stg",
54
- "https://inditex-c-pro.tinybird.co": "https://app.inditex.tinybird.co/gcp/inditex-c-pro",
55
- "https://inditex-z-stg.tinybird.co": "https://app.inditex.tinybird.co/gcp/inditex-z-stg",
56
- "https://inditex-rt-pro.tinybird.co": "https://app.inditex.tinybird.co/gcp/inditex-rt-pro",
57
- "https://inditex-pro.tinybird.co": "https://app.inditex.tinybird.co/gcp/inditex-pro",
58
52
  "https://ui.split.tinybird.co": "https://app.tinybird.co/aws/split-us-east",
59
53
  "https://ui.split.us-west-2.aws.tinybird.co": "https://app.tinybird.co/aws/split-us-west-2",
60
54
  "https://api.split.tinybird.co": "https://app.tinybird.co/aws/split-us-east",
@@ -116,3 +110,7 @@ class FeatureFlags:
116
110
  @classmethod
117
111
  def is_localhost(cls) -> bool:
118
112
  return "SET_LOCALHOST" in environ
113
+
114
+ @classmethod
115
+ def enable_snowflake_connector_command(cls) -> bool:
116
+ return "ENABLE_SNOWFLAKE_CONNECTOR_COMMAND" in environ
@@ -420,6 +420,9 @@ class FeedbackManager:
420
420
  error_updating_tag = error_message("Error updating tag: {error}")
421
421
  error_tag_generic = error_message("There was an issue updating tags. {error}")
422
422
  error_tag_not_found = error_message("Tag {tag_name} not found.")
423
+ error_snowflake_connector_not_enabled = error_message(
424
+ "🚨🚨🚨 [DEPRECATED] Snowflake connector is deprecated. Can't create the connector. **"
425
+ )
423
426
 
424
427
  info_incl_relative_path = info_message("** Relative path {path} does not exist, skipping.")
425
428
  info_ignoring_incl_file = info_message(
@@ -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__ = '0.0.1.dev62'
8
- __revision__ = '472a5f2'
7
+ __version__ = '0.0.1.dev64'
8
+ __revision__ = 'ff99418'
@@ -4,8 +4,9 @@ import logging
4
4
  import sys
5
5
  import threading
6
6
  import time
7
+ from functools import partial
7
8
  from pathlib import Path
8
- from typing import Optional
9
+ from typing import Callable, Optional
9
10
 
10
11
  import click
11
12
  import requests
@@ -31,9 +32,13 @@ def build(ctx: click.Context, watch: bool) -> None:
31
32
  project: Project = ctx.ensure_object(dict)["project"]
32
33
  tb_client: TinyB = ctx.ensure_object(dict)["client"]
33
34
  click.echo(FeedbackManager.highlight_building_project())
34
- process(project=project, tb_client=tb_client, watch=watch)
35
+ process(project=project, tb_client=tb_client, watch=False)
35
36
  if watch:
36
- run_watch(project=project, tb_client=tb_client)
37
+ run_watch(
38
+ project=project,
39
+ tb_client=tb_client,
40
+ process=partial(process, project=project, tb_client=tb_client, watch=True),
41
+ )
37
42
 
38
43
 
39
44
  @cli.command("dev", help="Build the project server side and watch for changes")
@@ -43,7 +48,7 @@ def dev(ctx: click.Context) -> None:
43
48
  tb_client: TinyB = ctx.ensure_object(dict)["client"]
44
49
  click.echo(FeedbackManager.highlight_building_project())
45
50
  process(project=project, tb_client=tb_client, watch=True)
46
- run_watch(project=project, tb_client=tb_client)
51
+ run_watch(project=project, tb_client=tb_client, process=partial(process, project=project, tb_client=tb_client))
47
52
 
48
53
 
49
54
  def build_project(project: Project, tb_client: TinyB, file_changed: Optional[str] = None) -> None:
@@ -55,7 +60,7 @@ def build_project(project: Project, tb_client: TinyB, file_changed: Optional[str
55
60
  TINYBIRD_API_URL = tb_client.host + "/v1/build"
56
61
  logging.debug(TINYBIRD_API_URL)
57
62
  TINYBIRD_API_KEY = tb_client.token
58
- error = False
63
+ error: Optional[str] = None
59
64
  try:
60
65
  files = [
61
66
  ("context://", ("cli-version", "1.0.0", "text/plain")),
@@ -129,22 +134,19 @@ def build_project(project: Project, tb_client: TinyB, file_changed: Optional[str
129
134
 
130
135
  elif build_result == "failed":
131
136
  build_errors = result.get("errors")
132
- error = True
133
137
  for build_error in build_errors:
134
138
  filename_bit = f"{build_error.get('filename', '')}"
135
139
  error_msg = ((filename_bit + "\n\n") if filename_bit else "") + build_error.get("error")
136
- click.echo(FeedbackManager.error(message=error_msg))
140
+ error = error_msg
137
141
  else:
138
- error = True
139
- click.echo(FeedbackManager.error(message=f"Unknown build result. Error: {result.get('error')}"))
140
-
142
+ error = f"Unknown build result. Error: {result.get('error')}"
141
143
  except Exception as e:
142
- click.echo(FeedbackManager.error_exception(error="Error: " + str(e)))
144
+ error = str(e)
143
145
  finally:
144
146
  for fd in fds:
145
147
  fd.close()
146
148
  if error:
147
- raise click.ClickException(FeedbackManager.error(message="Error: Build failed"))
149
+ raise click.ClickException(error)
148
150
 
149
151
 
150
152
  def append_fixture(
@@ -212,10 +214,10 @@ def process(
212
214
  try:
213
215
  build_project(project, tb_client, file_changed)
214
216
  except click.ClickException as e:
215
- click.echo(e)
217
+ click.echo(FeedbackManager.error(message=e))
216
218
  build_failed = True
217
219
  try:
218
- if file_changed:
220
+ if file_changed and not build_failed:
219
221
  asyncio.run(folder_build(project, tb_client, filenames=[file_changed]))
220
222
  show_data(tb_client, file_changed, diff)
221
223
  except Exception:
@@ -224,7 +226,7 @@ def process(
224
226
  time_end = time.time()
225
227
  elapsed_time = time_end - time_start
226
228
 
227
- rebuild_str = "Rebuild" if watch else "Build"
229
+ rebuild_str = "Rebuild" if watch and file_changed else "Build"
228
230
  if build_failed:
229
231
  click.echo(FeedbackManager.error(message=f"\n✗ {rebuild_str} failed"))
230
232
  if not watch:
@@ -233,7 +235,9 @@ def process(
233
235
  click.echo(FeedbackManager.success(message=f"\n✓ {rebuild_str} completed in {elapsed_time:.1f}s"))
234
236
 
235
237
 
236
- def run_watch(project: Project, tb_client: TinyB) -> None:
238
+ def run_watch(
239
+ project: Project, tb_client: TinyB, process: Callable[[bool, Optional[str], Optional[str]], None]
240
+ ) -> None:
237
241
  shell = Shell(project=project, tb_client=tb_client)
238
242
  click.echo(FeedbackManager.gray(message="\nWatching for changes..."))
239
243
  watcher_thread = threading.Thread(
@@ -321,10 +321,6 @@ class CLIConfig:
321
321
  """
322
322
  working_dir = working_dir or os.getcwd()
323
323
  path: str = os.path.join(working_dir, ".tinyb")
324
-
325
- if not os.path.exists(path):
326
- path = os.path.join(os.path.dirname(working_dir), ".tinyb")
327
-
328
324
  return CLIConfig(path, parent=CLIConfig.get_global_config())
329
325
 
330
326
  @staticmethod
@@ -47,6 +47,8 @@ def parse_pipe(
47
47
  finally:
48
48
  raise e
49
49
  for node in doc.nodes:
50
+ if "type" in node:
51
+ node["type"] = node["type"].lower()
50
52
  sql = node.get("sql", "")
51
53
  if sql.strip()[0] == "%":
52
54
  # Note(eclbg): not sure what test_mode is for. I think it does something like using placeholder values
@@ -269,7 +269,7 @@ async def endpoint_stats(ctx: click.Context, pipes: Tuple[str, ...], format_: st
269
269
  echo_safe_humanfriendly_tables_format_smart_table(table_human_readable, column_names=columns)
270
270
 
271
271
 
272
- def build_endpoint_snippet(tb_client: TinyB, pipe_name: str, token: Optional[str], language: str) -> Optional[str]:
272
+ def build_endpoint_snippet(tb_client: TinyB, pipe_name: str, token: str, language: str) -> Optional[str]:
273
273
  endpoint_url = build_endpoint_url(tb_client, pipe_name, token)
274
274
  if language == "http":
275
275
  return endpoint_url
@@ -282,9 +282,9 @@ def build_endpoint_snippet(tb_client: TinyB, pipe_name: str, token: Optional[str
282
282
  elif language == "javascript":
283
283
  snippet = build_javascript_snippet(endpoint_url, token)
284
284
  elif language == "rust":
285
- snippet = build_rust_snippet(endpoint_url, token)
285
+ snippet = build_rust_snippet(endpoint_url)
286
286
  elif language == "go":
287
- snippet = build_go_snippet(endpoint_url, token)
287
+ snippet = build_go_snippet(endpoint_url)
288
288
 
289
289
  if not snippet:
290
290
  raise CLIPipeException(FeedbackManager.error(message=f"Language {language} not supported"))
@@ -5,8 +5,9 @@ from typing import Any, Dict
5
5
 
6
6
  import requests
7
7
 
8
- from tinybird.client import AuthException, AuthNoTokenException, TinyB
8
+ from tinybird.client import AuthNoTokenException, TinyB
9
9
  from tinybird.tb.modules.config import CLIConfig
10
+ from tinybird.tb.modules.exceptions import CLIException
10
11
 
11
12
  TB_IMAGE_NAME = "tinybirdco/tinybird-local:beta"
12
13
  TB_CONTAINER_NAME = "tinybird-local"
@@ -32,7 +33,7 @@ async def get_tinybird_local_config(config_obj: Dict[str, Any], build: bool = Fa
32
33
  # ruff: noqa: ASYNC210
33
34
  tokens = requests.get(f"{TB_LOCAL_HOST}/tokens").json()
34
35
  except Exception:
35
- raise AuthException("Error: Tinybird local is not running. Please run `tb local start` first.")
36
+ raise CLIException("Tinybird local is not running. Please run `tb local start` first.")
36
37
 
37
38
  user_token = tokens["user_token"]
38
39
  admin_token = tokens["admin_token"]
@@ -18,12 +18,7 @@ from tinybird.tb.modules.shell import Shell
18
18
 
19
19
 
20
20
  class WatchProjectHandler(PatternMatchingEventHandler):
21
- def __init__(
22
- self,
23
- shell: Shell,
24
- project: Project,
25
- process: Callable[[bool, Optional[str], Optional[str]], None],
26
- ):
21
+ def __init__(self, shell: Shell, project: Project, process: Callable):
27
22
  self.shell = shell
28
23
  self.project = project
29
24
  self.process = process
@@ -51,7 +46,7 @@ class WatchProjectHandler(PatternMatchingEventHandler):
51
46
 
52
47
  def _process(self, path: Optional[str] = None) -> None:
53
48
  click.echo(FeedbackManager.highlight(message="» Rebuilding project..."))
54
- self.process(True, path, self.diff(path))
49
+ self.process(watch=True, file_changed=path, diff=self.diff(path))
55
50
  self.shell.reprint_prompt()
56
51
 
57
52
  def diff(self, path: Optional[str] = None) -> Optional[str]:
@@ -593,8 +593,6 @@ def format_host(host: str, subdomain: Optional[str] = None) -> str:
593
593
  'https://api.us-east.tinybird.co'
594
594
  >>> format_host('https://ui.us-east.tinybird.co', subdomain='api')
595
595
  'https://api.us-east.tinybird.co'
596
- >>> format_host('https://inditex-rt-pro.tinybird.co', subdomain='ui')
597
- 'https://inditex-rt-pro.tinybird.co'
598
596
  >>> format_host('https://cluiente-tricky.tinybird.co', subdomain='api')
599
597
  'https://cluiente-tricky.tinybird.co'
600
598
  """
@@ -13,6 +13,7 @@ import click
13
13
  from click import Context
14
14
 
15
15
  from tinybird.client import DoesNotExistException, TinyB
16
+ from tinybird.config import FeatureFlags
16
17
  from tinybird.feedback_manager import FeedbackManager
17
18
  from tinybird.tb_cli_modules.cli import cli
18
19
  from tinybird.tb_cli_modules.common import (
@@ -193,7 +194,9 @@ async def connection_create_kafka(
193
194
  click.echo(FeedbackManager.success_connection_created(id=id))
194
195
 
195
196
 
196
- @connection_create.command(name="snowflake", short_help="Creates a Snowflake connection in the current workspace")
197
+ @connection_create.command(
198
+ name="snowflake", short_help="Creates a Snowflake connection in the current workspace", hidden=True
199
+ )
197
200
  @click.option("--account", help="The account identifier of your Snowflake account (e.g. myorg-account123)")
198
201
  @click.option("--username", help="The Snowflake user you want to use for the connection")
199
202
  @click.option("--password", help="The Snowflake password of the chosen user")
@@ -242,6 +245,11 @@ async def connection_create_snowflake(
242
245
  $ tb connection create snowflake
243
246
  """
244
247
 
248
+ snowflake_connector_enabled = FeatureFlags.enable_snowflake_connector_command()
249
+ if not snowflake_connector_enabled:
250
+ click.echo(FeedbackManager.error_snowflake_connector_not_enabled())
251
+ return
252
+
245
253
  obj: Dict[str, Any] = ctx.ensure_object(dict)
246
254
  client: TinyB = obj["client"]
247
255
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tinybird
3
- Version: 0.0.1.dev62
3
+ Version: 0.0.1.dev64
4
4
  Summary: Tinybird Command Line Tool
5
5
  Home-page: https://www.tinybird.co/docs/cli/introduction.html
6
6
  Author: Tinybird
File without changes