tinybird-cli 3.6.1.dev3__py3-none-any.whl → 3.6.1.dev5__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__ = '3.6.1.dev3'
8
- __revision__ = 'dd07795'
7
+ __version__ = '3.6.1.dev5'
8
+ __revision__ = '321fe96'
tinybird/datafile.py CHANGED
@@ -2035,7 +2035,7 @@ class PipeCheckerRunner:
2035
2035
  AND extractURLParameter(assumeNotNull(url), 'debug') <> 'query'
2036
2036
  AND error = 0
2037
2037
  AND not mapContains(parameters, '__tb__semver')
2038
- {" AND " + " AND ".join([f"mapContains(post_params, '{match}')" for match in matches]) if matches and len(matches) > 0 else ''}
2038
+ {" AND " + " AND ".join([f"mapContains(pipe_request_params, '{match}')" for match in matches]) if matches and len(matches) > 0 else ''}
2039
2039
  { extra_where_clause }
2040
2040
  Limit 5000000 -- Enough to bring data while not processing all requests from highly used pipes
2041
2041
  )
@@ -2062,7 +2062,7 @@ class PipeCheckerRunner:
2062
2062
  AND extractURLParameter(assumeNotNull(url), 'debug') <> 'query'
2063
2063
  AND error = 0
2064
2064
  AND not mapContains(parameters, '__tb__semver')
2065
- {" AND " + " AND ".join([f"mapContains(params, '{match}')" for match in matches]) if matches and len(matches) > 0 else ''}
2065
+ {" AND " + " AND ".join([f"mapContains(pipe_request_params, '{match}')" for match in matches]) if matches and len(matches) > 0 else ''}
2066
2066
  {extra_where_clause}
2067
2067
  LIMIT {limit}
2068
2068
  )
@@ -7,10 +7,11 @@ from sqlfmt import actions, api
7
7
  from sqlfmt.analyzer import Analyzer, Rule, group
8
8
  from sqlfmt.comment import Comment
9
9
  from sqlfmt.dialect import ClickHouse
10
+ from sqlfmt.exception import SqlfmtBracketError
10
11
  from sqlfmt.jinjafmt import JinjaFormatter, JinjaTag
11
12
  from sqlfmt.line import Line
12
13
  from sqlfmt.mode import Mode
13
- from sqlfmt.node import Node
14
+ from sqlfmt.node import Node, get_previous_token
14
15
  from sqlfmt.node_manager import NodeManager
15
16
  from sqlfmt.token import Token, TokenType
16
17
 
@@ -118,6 +119,26 @@ class TinybirdNodeManager(NodeManager):
118
119
  super().__init__(case_sensitive_names)
119
120
  self.lower_keywords = lower_keywords
120
121
 
122
+ def create_node(self, token: Token, previous_node: Optional[Node]) -> Node:
123
+ try:
124
+ return super().create_node(token, previous_node)
125
+ except SqlfmtBracketError:
126
+ # we already have tb check and the toolset to check the SQL, no need for this extra validation
127
+ prev_token, extra_whitespace = get_previous_token(previous_node)
128
+ prefix = self.whitespace(token, prev_token, extra_whitespace)
129
+ value = self.standardize_value(token)
130
+ return Node(
131
+ token=token,
132
+ previous_node=previous_node,
133
+ prefix=prefix,
134
+ value=value,
135
+ formatting_disabled=False,
136
+ )
137
+
138
+ def raise_on_mismatched_bracket(self, token: Token, last_bracket: Node) -> None:
139
+ # we already have tb check and the toolset to check the SQL, no need for this extra validation
140
+ pass
141
+
121
142
  def standardize_value(self, token: Token) -> str:
122
143
  """
123
144
  Tinybird => Patched to not lower keywords
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tinybird-cli
3
- Version: 3.6.1.dev3
3
+ Version: 3.6.1.dev5
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,16 @@ Changelog
52
52
 
53
53
  ---------
54
54
 
55
+ 3.6.1.dev5
56
+ ************
57
+
58
+ - `Fixed` Avoid `tb fmt` to error if there's a `CASE` in the sql
59
+
60
+ 3.6.1.dev4
61
+ ************
62
+
63
+ - `Fixed` regression tests query when filtering by specific parameter
64
+
55
65
  3.6.1.dev3
56
66
  ************
57
67
 
@@ -1,17 +1,17 @@
1
- tinybird/__cli__.py,sha256=ZbviV0MvcgOtvZ6lHhEuTnPsQKU80uZeAktZcgPtgaw,254
1
+ tinybird/__cli__.py,sha256=9b226fjwx6IUFDoehvMthpbbpOiAS-OJceoZ5qknImY,254
2
2
  tinybird/check_pypi.py,sha256=_4NkharLyR_ELrAdit-ftqIWvOf7jZNPt3i76frlo9g,975
3
3
  tinybird/client.py,sha256=HbTicwXGErvAMCFj7o9X7aGKxI0WuuTKOr6tf-0jYOA,46575
4
4
  tinybird/config.py,sha256=E0jDwbFD1zhdijNhtF8fg6mqIyKbZ8xpNPP_3n2PFpE,2003
5
5
  tinybird/connector_settings.py,sha256=js2LvL8bAv5PegDICWB6EQ-LhqhAQU9VPApU1dW0vyA,6258
6
6
  tinybird/connectors.py,sha256=lkpVSUmSuViEZBa4QjTK7YmPHUop0a5UFoTrSmlVq6k,15244
7
7
  tinybird/context.py,sha256=BlMsbeg5jTjTtJmcyJBCpjQE74sYk_CLBeHorSUer1M,913
8
- tinybird/datafile.py,sha256=Vm-wERhJlhghRXnIPBV2tM8LUqnDoFnjxbxploxInTw,210999
8
+ tinybird/datafile.py,sha256=AT8umvbMwPSzfifMfsCj0jk8-Od-5PZbX6XHqr97mEw,211020
9
9
  tinybird/datatypes.py,sha256=adYOQBTyfeBGVINIlaRex_81gTQQuqF2M9VTQpzq1H0,7060
10
10
  tinybird/feedback_manager.py,sha256=p8unybrnH8L6uK-k5UZ0nvzrSfzwDMeIKSGIzRy0_nU,58756
11
11
  tinybird/git_settings.py,sha256=vu8sWb3TAXeM8Tqy27aR0el8MnPm7kqQzTRV76xB0ro,4707
12
12
  tinybird/sql.py,sha256=ln_rs8goRV-yP7BdiA3MewzFKgIHQdRalhtiUrwTBV4,41181
13
13
  tinybird/sql_template.py,sha256=-q64irnoIqKhYgtCmsgjPV62vluM6aFxKgkgtRcL1n8,76994
14
- tinybird/sql_template_fmt.py,sha256=qUD5bWgiMpl1-Zu5ykmNxaJM9vHZhnvGZInWbtaBAY4,8137
14
+ tinybird/sql_template_fmt.py,sha256=XVViCPRfH9HtJi0-rrOyJOvU17qsOynbC1P07w9gi9Y,9121
15
15
  tinybird/sql_toolset.py,sha256=xt_UETbeLK_psCUTumgTVT0o1b1LPIxihTjr0intMkc,11523
16
16
  tinybird/syncasync.py,sha256=fAvq0qkRgqXqXMKwbY2iJNYqLT_r6mDsh1MRpGKrdRU,27763
17
17
  tinybird/tb_cli.py,sha256=XPyQ8QQ85ohpfVv7ZGzZjIbeijFZEzWQDwCz5zVpZ_U,674
@@ -38,8 +38,8 @@ tinybird/tb_cli_modules/workspace.py,sha256=NDHINzW3SBo8FcWH8Bx-DCeUXQ8YUJX6FW8c
38
38
  tinybird/tb_cli_modules/workspace_members.py,sha256=3HzY43218fb35ZM81mtkwDQe7gAAf1zEFY6kIEhGvgE,8268
39
39
  tinybird/tb_cli_modules/tinyunit/tinyunit.py,sha256=0dYYmZMMJVubxSPls2e_a-fqtUYvgLfu2B0xwLfkbHw,11667
40
40
  tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py,sha256=j92za8QbXrv4eIPjKBZPn9ghR-nYQ2wZZ88MeXyMWXE,1868
41
- tinybird_cli-3.6.1.dev3.dist-info/METADATA,sha256=MZ4cZYdmmGHkJMZeoSZyr6-JkDzWRnYwyKmhaE6h-sE,68981
42
- tinybird_cli-3.6.1.dev3.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
43
- tinybird_cli-3.6.1.dev3.dist-info/entry_points.txt,sha256=PKPKuPmA4IfJYnCFHHUiw-aAWZuBomFvwCklv1OyCjE,43
44
- tinybird_cli-3.6.1.dev3.dist-info/top_level.txt,sha256=pgw6AzERHBcW3YTi2PW4arjxLkulk2msOz_SomfOEuc,45
45
- tinybird_cli-3.6.1.dev3.dist-info/RECORD,,
41
+ tinybird_cli-3.6.1.dev5.dist-info/METADATA,sha256=4tC2eTcips1VHScwJvriZ6HzHCQwvhT7JDIBw5iEXbQ,69168
42
+ tinybird_cli-3.6.1.dev5.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
43
+ tinybird_cli-3.6.1.dev5.dist-info/entry_points.txt,sha256=PKPKuPmA4IfJYnCFHHUiw-aAWZuBomFvwCklv1OyCjE,43
44
+ tinybird_cli-3.6.1.dev5.dist-info/top_level.txt,sha256=pgw6AzERHBcW3YTi2PW4arjxLkulk2msOz_SomfOEuc,45
45
+ tinybird_cli-3.6.1.dev5.dist-info/RECORD,,