tinybird-cli 5.10.2.dev2__py3-none-any.whl → 5.10.2.dev3__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.
tinybird/__cli__.py CHANGED
@@ -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.10.2.dev2'
8
- __revision__ = '7cb8efb'
7
+ __version__ = '5.10.2.dev3'
8
+ __revision__ = '00f2b41'
tinybird/config.py CHANGED
@@ -40,6 +40,8 @@ LEGACY_HOSTS = {
40
40
  "https://api.wadus2.aws.tinybird.co": "https://app.wadus.tinybird.co/aws/wadus2",
41
41
  "https://api.wadus3.aws.tinybird.co": "https://app.wadus.tinybird.co/aws/wadus3",
42
42
  "https://api.wadus4.aws.tinybird.co": "https://app.wadus.tinybird.co/aws/wadus4",
43
+ "https://api.wadus5.aws.tinybird.co": "https://app.wadus.tinybird.co/aws/wadus5",
44
+ "https://api.wadus6.aws.tinybird.co": "https://app.wadus.tinybird.co/aws/wadus6",
43
45
  "https://ui.tinybird.co": "https://app.tinybird.co/gcp/europe-west3",
44
46
  "https://ui.us-east.tinybird.co": "https://app.tinybird.co/gcp/us-east4",
45
47
  "https://ui.us-east.aws.tinybird.co": "https://app.tinybird.co/aws/us-east-1",
@@ -70,6 +72,8 @@ LEGACY_HOSTS = {
70
72
  "https://ui.wadus2.aws.tinybird.co": "https://app.wadus.tinybird.co/aws/wadus2",
71
73
  "https://ui.wadus3.aws.tinybird.co": "https://app.wadus.tinybird.co/aws/wadus3",
72
74
  "https://ui.wadus4.aws.tinybird.co": "https://app.wadus.tinybird.co/aws/wadus4",
75
+ "https://ui.wadus5.aws.tinybird.co": "https://app.wadus.tinybird.co/aws/wadus5",
76
+ "https://ui.wadus6.aws.tinybird.co": "https://app.wadus.tinybird.co/aws/wadus6",
73
77
  }
74
78
 
75
79
 
tinybird/sql.py CHANGED
@@ -51,16 +51,16 @@ class TableProjection:
51
51
  def to_sql(self):
52
52
  return f"PROJECTION {self.to_datafile()}"
53
53
 
54
- def add_index_sql(self):
54
+ def add_projection_sql(self):
55
55
  return f"ADD {self.to_sql()}"
56
56
 
57
- def drop_index_sql(self):
57
+ def drop_projection_sql(self):
58
58
  return f"DROP PROJECTION IF EXISTS {self.name}"
59
59
 
60
- def materialize_index_sql(self):
60
+ def materialize_projection_sql(self):
61
61
  return f"MATERIALIZE PROJECTION IF EXISTS {self.name}"
62
62
 
63
- def clear_index_sql(self):
63
+ def clear_projection_sql(self):
64
64
  return f"CLEAR PROJECTION IF EXISTS {self.name}"
65
65
 
66
66
 
tinybird/sql_template.py CHANGED
@@ -1629,6 +1629,8 @@ def get_var_data(content, node_id=None):
1629
1629
  # It will be overriden in later definitions or left as is otherwise.
1630
1630
  # args[0] check is used to avoid adding unnamed parameters found in
1631
1631
  # templates like: `split_to_array('')`
1632
+ if len(args) and isinstance(args[0], list):
1633
+ raise ValueError(f'"{args[0]}" can not be used as a variable name')
1632
1634
  if len(args) > 0 and args[0] not in vars and args[0]:
1633
1635
  vars[args[0]] = {
1634
1636
  "type": "String",
@@ -1640,6 +1642,8 @@ def get_var_data(content, node_id=None):
1640
1642
  default = kwargs.get("default", args[2] if len(args) > 2 and args[2] else None)
1641
1643
  kwargs["default"] = check_default_value(default)
1642
1644
  if len(args):
1645
+ if isinstance(args[0], list):
1646
+ raise ValueError(f'"{args[0]}" can not be used as a variable name')
1643
1647
  vars[args[0]] = {
1644
1648
  "type": f"Array({args[1]})" if len(args) > 1 else "Array(String)",
1645
1649
  **kwargs,
@@ -1652,11 +1656,15 @@ def get_var_data(content, node_id=None):
1652
1656
  default = kwargs.get("default", args[1] if len(args) > 1 else None)
1653
1657
  kwargs["default"] = check_default_value(default)
1654
1658
  try:
1659
+ if isinstance(args[0], list):
1660
+ raise ValueError(f'"{args[0]}" can not be used as a variable name')
1655
1661
  vars[args[0]] = {"type": func, **kwargs}
1656
1662
  if "default" in kwargs:
1657
1663
  kwargs["default"] = check_default_value(kwargs["default"])
1658
1664
  except TypeError as e:
1659
1665
  logging.exception(f"pipe parsing problem {content} (node '{node_id}'): {e}")
1666
+ except ValueError:
1667
+ raise
1660
1668
  except Exception as e:
1661
1669
  # if we find a problem parsing, let the parsing continue
1662
1670
  logging.exception(f"pipe parsing problem {content} (node: '{node_id}'): {e}")
@@ -17,7 +17,7 @@ class Provider(Enum):
17
17
 
18
18
  WORKFLOW_VERSION = "v3.1.0"
19
19
 
20
- DEFAULT_REQUIREMENTS_FILE = "tinybird-cli>=4,<5"
20
+ DEFAULT_REQUIREMENTS_FILE = "tinybird-cli>=5,<6"
21
21
 
22
22
  GITHUB_CI_YML = """
23
23
  ##################################################
@@ -205,7 +205,7 @@ import posixpath
205
205
  import re
206
206
  import threading
207
207
  from io import StringIO
208
- from typing import Union
208
+ from typing import Dict, Union
209
209
 
210
210
  from tornado import escape
211
211
  from tornado.log import app_log
@@ -356,7 +356,7 @@ class Template(object):
356
356
  buffer = StringIO()
357
357
  try:
358
358
  # named_blocks maps from names to _NamedBlock objects
359
- named_blocks = {}
359
+ named_blocks: Dict[str, _NamedBlock] = {}
360
360
  ancestors = self._get_ancestors(loader)
361
361
  ancestors.reverse()
362
362
  for ancestor in ancestors:
@@ -1163,7 +1163,7 @@ def check_valid_expr(expr):
1163
1163
  elif isinstance(expr, ast.Subscript):
1164
1164
  check_valid_expr(expr.value)
1165
1165
  if isinstance(expr.slice, ast.Index):
1166
- check_valid_expr(expr.slice.value)
1166
+ check_valid_expr(expr.slice.value) # type: ignore[attr-defined]
1167
1167
  elif isinstance(expr.slice, ast.Slice):
1168
1168
  if expr.slice.lower is not None:
1169
1169
  check_valid_expr(expr.slice.lower)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tinybird-cli
3
- Version: 5.10.2.dev2
3
+ Version: 5.10.2.dev3
4
4
  Summary: Tinybird Command Line Tool
5
5
  Home-page: https://www.tinybird.co/docs/cli/introduction.html
6
6
  Author: Tinybird
@@ -52,6 +52,11 @@ The Tinybird command-line tool allows you to use all the Tinybird functionality
52
52
  Changelog
53
53
  ----------
54
54
 
55
+ 5.10.2.dev3
56
+ ***********
57
+
58
+ - `Changed` Bump tinybird-cli version in requirements.txt when running `tb init --git`
59
+
55
60
  5.10.2.dev2
56
61
  ***********
57
62
 
@@ -1,25 +1,25 @@
1
- tinybird/__cli__.py,sha256=nXJdr2uE9FcFSos-qGfoEsuf1UBkppEhyqb4Nbfff58,255
1
+ tinybird/__cli__.py,sha256=7P1TkM59P2p5aAjP3uN2qTPtkcGj4_6leqcllSvEMYM,255
2
2
  tinybird/check_pypi.py,sha256=_4NkharLyR_ELrAdit-ftqIWvOf7jZNPt3i76frlo9g,975
3
3
  tinybird/client.py,sha256=65K7Ues7nRct8UxzOIohRRC_ucyZ6VEkQF8r-D-Vv44,50519
4
- tinybird/config.py,sha256=taVO0U_5EXVadOyKyam4ouyLqY6F7npNQoJu0XkcE-8,6191
4
+ tinybird/config.py,sha256=CRhnasTsSQB6QtevLWebniRw72fSLGlIYfqUnDCpUJo,6533
5
5
  tinybird/connectors.py,sha256=lkpVSUmSuViEZBa4QjTK7YmPHUop0a5UFoTrSmlVq6k,15244
6
6
  tinybird/context.py,sha256=3KwB9TL-nON6qX9Mm5uev4CkrgLwYyNDvdFfQmNc0Cc,1171
7
7
  tinybird/datafile.py,sha256=ida3tb-idl4bu5hEpEZ_84tSY6Yra4ZWbCgh5l6fmcw,229204
8
8
  tinybird/datatypes.py,sha256=wwXaEy3l_UyfsH9xzYqBENQR7MSrFnDSvgS_CzLucOQ,10462
9
9
  tinybird/feedback_manager.py,sha256=gKVueLCx6oRnLqsoo9w-kMcG3qYnlx0ZBW43VPyyqxI,67488
10
10
  tinybird/git_settings.py,sha256=XUL9ZUj59-ZVQJDYmMEq4UpnuuOuQOHGlNcX3JgQHjQ,3954
11
- tinybird/sql.py,sha256=1shLq5JL5cLyrlALdSuywbag4A0wGK8dcty2CKLB1hc,46091
12
- tinybird/sql_template.py,sha256=Uo9rBsm_UCwtAhPoEAkC4IQJpB8S4kG9sscypNds1ZM,91079
11
+ tinybird/sql.py,sha256=phZjqOZdT3HLy02l2pcJR1yzqsc9r1qr1O54REh26_4,46111
12
+ tinybird/sql_template.py,sha256=cIQqvquNWAGWiQDlRM29rSj58ABeiQJQ6JlpMkaZK68,91628
13
13
  tinybird/sql_template_fmt.py,sha256=1z-PuqSZXtzso8Z_mPqUc-NxIxUrNUcVIPezNieZk-M,10196
14
14
  tinybird/sql_toolset.py,sha256=PddOOLGVeZo7OAaDz3E7od2gyvyVqW8wES8cGCfLHvk,13792
15
15
  tinybird/syncasync.py,sha256=fAvq0qkRgqXqXMKwbY2iJNYqLT_r6mDsh1MRpGKrdRU,27763
16
16
  tinybird/tb_cli.py,sha256=q1LGAsBVVMJsjR2HK62Pu6vpVtLzNmH8wHrEVUUdVkU,744
17
- tinybird/tornado_template.py,sha256=1g9B6DTntvvxBh8Ar11DNKxISp7ONErn7cY7gS5_VEY,42188
17
+ tinybird/tornado_template.py,sha256=Vr0yKTiyZ94cwcLuo6TXZarR6PAvnYSnbtcK-ppuN-U,42248
18
18
  tinybird/ch_utils/constants.py,sha256=aYvg2C_WxYWsnqPdZB1ZFoIr8ZY-XjUXYyHKE9Ansj0,3890
19
19
  tinybird/ch_utils/engine.py,sha256=OXkBhlzGjZotjD0vaT-rFIbSGV4tpiHxE8qO_ip0SyQ,40454
20
20
  tinybird/tb_cli_modules/auth.py,sha256=cqxfGgFheuTmenQ3UwPBXTqwMm8JD7uzgLfoIRXdnyQ,9038
21
21
  tinybird/tb_cli_modules/branch.py,sha256=a1nW_lME2peYxp8Ui0mq_qHPUcDZkw8glwsjD20S2-A,38657
22
- tinybird/tb_cli_modules/cicd.py,sha256=fmUHz3pEr5y5It-ZMx88O_T-exmWqgeI6_xFttvUPdE,13851
22
+ tinybird/tb_cli_modules/cicd.py,sha256=0lMkb6CVOFZl5HOwgY8mK4T4mgI7O8335UngLXtCc-c,13851
23
23
  tinybird/tb_cli_modules/cli.py,sha256=0df0kikbjf4ixMlzo40hVyi6qgUhazw5eqtA9_b0IFo,62061
24
24
  tinybird/tb_cli_modules/common.py,sha256=RXNbrHwySiXJWessYENUkp5DjswudakXCc9VuiVm34I,78332
25
25
  tinybird/tb_cli_modules/config.py,sha256=6NTgIdwf0X132A1j6G_YrdPep87ymZ9b5pABabKLzh4,11484
@@ -38,8 +38,8 @@ tinybird/tb_cli_modules/workspace.py,sha256=ecJZ-tMkCocS2vhRWRGWPq9Eq_Pz6tf1IN-p
38
38
  tinybird/tb_cli_modules/workspace_members.py,sha256=ksXsjd233y9-sNlz4Qb-meZbX4zn1B84e_bSm2i8rhg,8731
39
39
  tinybird/tb_cli_modules/tinyunit/tinyunit.py,sha256=_ydOD4WxmKy7_h-d3fG62w_0_lD0uLl9w4EbEYtwd0U,11720
40
40
  tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py,sha256=hGh1ZaXC1af7rKnX7222urkj0QJMhMWclqMy59dOqwE,1922
41
- tinybird_cli-5.10.2.dev2.dist-info/METADATA,sha256=AdwgsKVXngei7AciVPUAzWXbbBTMolKF6dME35yrNXY,77386
42
- tinybird_cli-5.10.2.dev2.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
43
- tinybird_cli-5.10.2.dev2.dist-info/entry_points.txt,sha256=PKPKuPmA4IfJYnCFHHUiw-aAWZuBomFvwCklv1OyCjE,43
44
- tinybird_cli-5.10.2.dev2.dist-info/top_level.txt,sha256=pgw6AzERHBcW3YTi2PW4arjxLkulk2msOz_SomfOEuc,45
45
- tinybird_cli-5.10.2.dev2.dist-info/RECORD,,
41
+ tinybird_cli-5.10.2.dev3.dist-info/METADATA,sha256=9s_zznoWjMdoqn-MLBegfAaQ2Q-ysfxgPyWGeSP0Y-k,77499
42
+ tinybird_cli-5.10.2.dev3.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
43
+ tinybird_cli-5.10.2.dev3.dist-info/entry_points.txt,sha256=PKPKuPmA4IfJYnCFHHUiw-aAWZuBomFvwCklv1OyCjE,43
44
+ tinybird_cli-5.10.2.dev3.dist-info/top_level.txt,sha256=pgw6AzERHBcW3YTi2PW4arjxLkulk2msOz_SomfOEuc,45
45
+ tinybird_cli-5.10.2.dev3.dist-info/RECORD,,