tinybird 0.0.1.dev119__tar.gz → 0.0.1.dev120__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 (109) hide show
  1. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/PKG-INFO +1 -1
  2. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/datatypes.py +29 -24
  3. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/__cli__.py +2 -2
  4. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/client.py +7 -0
  5. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/connection.py +9 -0
  6. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/datafile/common.py +25 -0
  7. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/feedback_manager.py +1 -0
  8. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/llm.py +10 -0
  9. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/local.py +5 -1
  10. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird.egg-info/PKG-INFO +1 -1
  11. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/setup.cfg +0 -0
  12. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/__cli__.py +0 -0
  13. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/ch_utils/constants.py +0 -0
  14. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/ch_utils/engine.py +0 -0
  15. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/check_pypi.py +0 -0
  16. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/client.py +0 -0
  17. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/config.py +0 -0
  18. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/connectors.py +0 -0
  19. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/context.py +0 -0
  20. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/datafile.py +0 -0
  21. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/feedback_manager.py +0 -0
  22. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/git_settings.py +0 -0
  23. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/prompts.py +0 -0
  24. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/sql.py +0 -0
  25. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/sql_template.py +0 -0
  26. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/sql_template_fmt.py +0 -0
  27. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/sql_toolset.py +0 -0
  28. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/syncasync.py +0 -0
  29. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/cli.py +0 -0
  30. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/config.py +0 -0
  31. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/auth.py +0 -0
  32. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/build.py +0 -0
  33. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/cicd.py +0 -0
  34. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/cli.py +0 -0
  35. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/common.py +0 -0
  36. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/config.py +0 -0
  37. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/copy.py +0 -0
  38. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/create.py +0 -0
  39. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/datafile/build.py +0 -0
  40. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/datafile/build_common.py +0 -0
  41. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/datafile/build_datasource.py +0 -0
  42. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/datafile/build_pipe.py +0 -0
  43. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/datafile/diff.py +0 -0
  44. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/datafile/exceptions.py +0 -0
  45. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/datafile/fixture.py +0 -0
  46. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/datafile/format_common.py +0 -0
  47. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/datafile/format_datasource.py +0 -0
  48. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/datafile/format_pipe.py +0 -0
  49. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/datafile/parse_datasource.py +0 -0
  50. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/datafile/parse_pipe.py +0 -0
  51. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/datafile/pipe_checker.py +0 -0
  52. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/datafile/playground.py +0 -0
  53. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/datafile/pull.py +0 -0
  54. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/datasource.py +0 -0
  55. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/deployment.py +0 -0
  56. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/endpoint.py +0 -0
  57. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/exceptions.py +0 -0
  58. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/fmt.py +0 -0
  59. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/infra.py +0 -0
  60. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/job.py +0 -0
  61. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/llm_utils.py +0 -0
  62. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/local_common.py +0 -0
  63. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/login.py +0 -0
  64. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/logout.py +0 -0
  65. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/materialization.py +0 -0
  66. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/mock.py +0 -0
  67. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/open.py +0 -0
  68. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/pipe.py +0 -0
  69. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/project.py +0 -0
  70. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/regions.py +0 -0
  71. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/secret.py +0 -0
  72. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/shell.py +0 -0
  73. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/table.py +0 -0
  74. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/tag.py +0 -0
  75. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/telemetry.py +0 -0
  76. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/test.py +0 -0
  77. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/tinyunit/tinyunit.py +0 -0
  78. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/tinyunit/tinyunit_lib.py +0 -0
  79. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/token.py +0 -0
  80. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/watch.py +0 -0
  81. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/workspace.py +0 -0
  82. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb/modules/workspace_members.py +0 -0
  83. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb_cli.py +0 -0
  84. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb_cli_modules/auth.py +0 -0
  85. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb_cli_modules/branch.py +0 -0
  86. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb_cli_modules/cicd.py +0 -0
  87. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb_cli_modules/cli.py +0 -0
  88. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb_cli_modules/common.py +0 -0
  89. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb_cli_modules/config.py +0 -0
  90. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb_cli_modules/connection.py +0 -0
  91. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb_cli_modules/datasource.py +0 -0
  92. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb_cli_modules/exceptions.py +0 -0
  93. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb_cli_modules/fmt.py +0 -0
  94. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb_cli_modules/job.py +0 -0
  95. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb_cli_modules/pipe.py +0 -0
  96. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb_cli_modules/regions.py +0 -0
  97. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb_cli_modules/tag.py +0 -0
  98. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb_cli_modules/telemetry.py +0 -0
  99. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb_cli_modules/test.py +0 -0
  100. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb_cli_modules/tinyunit/tinyunit.py +0 -0
  101. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py +0 -0
  102. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb_cli_modules/workspace.py +0 -0
  103. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tb_cli_modules/workspace_members.py +0 -0
  104. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird/tornado_template.py +0 -0
  105. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird.egg-info/SOURCES.txt +0 -0
  106. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird.egg-info/dependency_links.txt +0 -0
  107. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird.egg-info/entry_points.txt +0 -0
  108. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird.egg-info/requires.txt +0 -0
  109. {tinybird-0.0.1.dev119 → tinybird-0.0.1.dev120}/tinybird.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: tinybird
3
- Version: 0.0.1.dev119
3
+ Version: 0.0.1.dev120
4
4
  Summary: Tinybird Command Line Tool
5
5
  Home-page: https://www.tinybird.co/docs/cli/introduction.html
6
6
  Author: Tinybird
@@ -5,11 +5,14 @@ from decimal import Decimal
5
5
  from typing import Callable, Dict, List, Optional, Tuple
6
6
 
7
7
  datetime64_patterns = [
8
- r"\d\d\d\d.\d\d.\d\d(T|\s)\d\d:\d\d:\d\d.\d\d\d",
9
- r"\d\d.\d\d.\d\d\d\d.\d{1,2}:\d{1,2}:\d{1,2}.\d{1,3}",
8
+ re.compile(r"\d\d\d\d.\d\d.\d\d(T|\s)\d\d:\d\d:\d\d.\d\d\d"),
9
+ re.compile(r"\d\d.\d\d.\d\d\d\d.\d{1,2}:\d{1,2}:\d{1,2}.\d{1,3}"),
10
10
  ]
11
11
 
12
- datetime_patterns = [r"\d\d\d\d.\d\d.\d\d(T|\s)\d\d:\d\d:\d\d", r"\d\d.\d\d.\d\d\d\d.\d{1,2}:\d{1,2}:\d{1,2}"]
12
+ datetime_patterns = [
13
+ re.compile(r"\d\d\d\d.\d\d.\d\d(T|\s)\d\d:\d\d:\d\d"),
14
+ re.compile(r"\d\d.\d\d.\d\d\d\d.\d{1,2}:\d{1,2}:\d{1,2}"),
15
+ ]
13
16
 
14
17
  int_8_max = 2**7
15
18
  int16_max = 2**15
@@ -23,13 +26,15 @@ uint32_max = 2**32
23
26
  uint64_max = 2**64
24
27
  uint128_max = 2**128
25
28
  uint256_max = 2**256
26
- intx_re = r"^[+-]?\d+$"
27
- uintx_re = r"^\d+$"
29
+ intx_re = re.compile(r"^[+-]?\d+$")
30
+ uintx_re = re.compile(r"^\d+$")
28
31
  float32_max = 2**23 # 23 bits is the fractional part of float 32 ieee754
29
32
  float64_max = 2**52 # 51 bits is the fractional part of float 64 ieee754
30
33
 
31
- datetime64_type_pattern = r"^DateTime64(\([1-9](, ?'.+')?\))?$"
32
- datetime_type_pattern = r"^DateTime(\(('.+')?)?\)?$"
34
+ date_pattern = re.compile(r"\d\d\d\d-\d\d-\d\d$")
35
+
36
+ datetime64_type_pattern = re.compile(r"^DateTime64(\([1-9](, ?'.+')?\))?$")
37
+ datetime_type_pattern = re.compile(r"^DateTime(\(('.+')?)?\)?$")
33
38
 
34
39
  # List from https://github.com/tinybirdco/ClickHousePrivate/blob/153473d9c1c871974688a1d72dcff7a13fc2076c/src/DataTypes/Serializations/SerializationBool.cpp#L216
35
40
  bool_allowed_values = {
@@ -71,7 +76,7 @@ def is_type_datetime64(type_to_check: str) -> bool:
71
76
  >>> is_type_datetime64("datetime64")
72
77
  False
73
78
  """
74
- return re.match(datetime64_type_pattern, type_to_check) is not None
79
+ return datetime64_type_pattern.match(type_to_check) is not None
75
80
 
76
81
 
77
82
  def is_type_datetime(type_to_check: str) -> bool:
@@ -87,7 +92,7 @@ def is_type_datetime(type_to_check: str) -> bool:
87
92
  >>> is_type_datetime("datetime")
88
93
  False
89
94
  """
90
- return re.match(datetime_type_pattern, type_to_check) is not None
95
+ return datetime_type_pattern.match(type_to_check) is not None
91
96
 
92
97
 
93
98
  def string_test(x: str) -> bool:
@@ -95,63 +100,63 @@ def string_test(x: str) -> bool:
95
100
 
96
101
 
97
102
  def date_test(x: str) -> bool:
98
- return re.match(r"\d\d\d\d-\d\d-\d\d$", x) is not None
103
+ return date_pattern.match(x) is not None
99
104
 
100
105
 
101
106
  def datetime64_test(x: str) -> bool:
102
- return any([re.match(p, x) for p in datetime64_patterns])
107
+ return any([p.match(x) for p in datetime64_patterns])
103
108
 
104
109
 
105
110
  def datetime_test(x: str) -> bool:
106
- return any([re.match(p, x) for p in datetime_patterns])
111
+ return any([p.match(x) for p in datetime_patterns])
107
112
 
108
113
 
109
114
  def int_8_test(x: str) -> bool:
110
- return re.match(intx_re, x) is not None and -int_8_max <= int(x) < int_8_max
115
+ return intx_re.match(x) is not None and -int_8_max <= int(x) < int_8_max
111
116
 
112
117
 
113
118
  def int16_test(x: str) -> bool:
114
- return re.match(intx_re, x) is not None and -int16_max <= int(x) < int16_max
119
+ return intx_re.match(x) is not None and -int16_max <= int(x) < int16_max
115
120
 
116
121
 
117
122
  def int32_test(x: str) -> bool:
118
- return re.match(intx_re, x) is not None and -int32_max <= int(x) < int32_max
123
+ return intx_re.match(x) is not None and -int32_max <= int(x) < int32_max
119
124
 
120
125
 
121
126
  def int64_test(x: str) -> bool:
122
- return re.match(intx_re, x) is not None and -int64_max <= int(x) < int64_max
127
+ return intx_re.match(x) is not None and -int64_max <= int(x) < int64_max
123
128
 
124
129
 
125
130
  def int128_test(x: str) -> bool:
126
- return re.match(intx_re, x) is not None and -int128_max <= int(x) < int128_max
131
+ return intx_re.match(x) is not None and -int128_max <= int(x) < int128_max
127
132
 
128
133
 
129
134
  def int256_test(x: str) -> bool:
130
- return re.match(intx_re, x) is not None and -int256_max <= int(x) < int256_max
135
+ return intx_re.match(x) is not None and -int256_max <= int(x) < int256_max
131
136
 
132
137
 
133
138
  def uint_8_test(x: str) -> bool:
134
- return re.match(uintx_re, x) is not None and 0 <= int(x) < uint_8_max
139
+ return uintx_re.match(x) is not None and 0 <= int(x) < uint_8_max
135
140
 
136
141
 
137
142
  def uint16_test(x: str) -> bool:
138
- return re.match(uintx_re, x) is not None and 0 <= int(x) < uint16_max
143
+ return uintx_re.match(x) is not None and 0 <= int(x) < uint16_max
139
144
 
140
145
 
141
146
  def uint32_test(x: str) -> bool:
142
- return re.match(uintx_re, x) is not None and 0 <= int(x) < uint32_max
147
+ return uintx_re.match(x) is not None and 0 <= int(x) < uint32_max
143
148
 
144
149
 
145
150
  def uint64_test(x: str) -> bool:
146
- return re.match(uintx_re, x) is not None and 0 <= int(x) < uint64_max
151
+ return uintx_re.match(x) is not None and 0 <= int(x) < uint64_max
147
152
 
148
153
 
149
154
  def uint128_test(x: str) -> bool:
150
- return re.match(intx_re, x) is not None and 0 <= int(x) < uint128_max
155
+ return intx_re.match(x) is not None and 0 <= int(x) < uint128_max
151
156
 
152
157
 
153
158
  def uint256_test(x: str) -> bool:
154
- return re.match(intx_re, x) is not None and 0 <= int(x) < uint256_max
159
+ return intx_re.match(x) is not None and 0 <= int(x) < uint256_max
155
160
 
156
161
 
157
162
  def float_test(x: str) -> bool:
@@ -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.dev119'
8
- __revision__ = 'bbe4729'
7
+ __version__ = '0.0.1.dev120'
8
+ __revision__ = 'a558f0d'
@@ -1170,6 +1170,13 @@ class TinyB:
1170
1170
  response = await self._req(f"/v0/connectors/snowflake/warehouses?{urlencode(params)}", method="POST", data="")
1171
1171
  return response["warehouses"]
1172
1172
 
1173
+ async def check_aws_credentials(self) -> bool:
1174
+ try:
1175
+ await self._req("/v0/integrations/s3/settings")
1176
+ return True
1177
+ except Exception:
1178
+ return False
1179
+
1173
1180
  async def get_trust_policy(self, service: str) -> Dict[str, Any]:
1174
1181
  return await self._req(f"/v0/integrations/{service}/policies/trust-policy")
1175
1182
 
@@ -151,6 +151,15 @@ async def connection_create_s3(ctx: Context) -> None:
151
151
  obj: Dict[str, Any] = ctx.ensure_object(dict)
152
152
  client: TinyB = obj["client"]
153
153
 
154
+ if obj["env"] == "local" and not await client.check_aws_credentials():
155
+ click.echo(
156
+ FeedbackManager.error(
157
+ message="No AWS credentials found. Please run `tb local restart --use-aws-creds` to pass your credentials. "
158
+ "Read more about this in https://www.tinybird.co/docs/forward/get-data-in/connectors/s3#local-environment"
159
+ )
160
+ )
161
+ return
162
+
154
163
  service = DataConnectorType.AMAZON_S3
155
164
  click.echo(FeedbackManager.prompt_s3_connection_header())
156
165
  connection_name = get_s3_connection_name(project.folder)
@@ -810,6 +810,31 @@ def _parse_table_structure(schema: str) -> List[Dict[str, Any]]:
810
810
  detected_type = parse_expr(
811
811
  [NULL, NOTNULL, DEFAULT, MATERIALIZED, ALIAS, CODEC, TTL, JSONPATH, COMMA], "TYPE"
812
812
  )
813
+
814
+ # Boolean type is supported in ClickHouse but its behavior is strange and will lead to unexpected results.
815
+ # Better to use Bool or UInt8 instead. An example:
816
+ #
817
+ # SELECT
818
+ # CAST(true, 'Boolean') AS bool,
819
+ # toTypeName(bool)
820
+ #
821
+ # ┌─bool─┬─toTypeName(bool)─┐
822
+ # │ true │ Bool │
823
+ # └──────┴──────────────────┘
824
+ if "boolean" in detected_type.lower():
825
+ raise SchemaSyntaxError(
826
+ message="Boolean type is not supported",
827
+ hint="Hint: use Bool or UInt8 instead",
828
+ lineno=line,
829
+ pos=pos,
830
+ )
831
+ if "datetime64" in detected_type.lower() and "datetime64(" not in detected_type.lower():
832
+ raise SchemaSyntaxError(
833
+ message="DateTime64 type without precision is not supported",
834
+ hint="Hint: use DateTime64(3) instead",
835
+ lineno=line,
836
+ pos=pos,
837
+ )
813
838
  try:
814
839
  # Imported in the body to be compatible with the CLI
815
840
  from chtoolset.query import check_compatible_types
@@ -441,6 +441,7 @@ class FeedbackManager:
441
441
  error_tag_generic = error_message("There was an issue updating tags. {error}")
442
442
  error_tag_not_found = error_message("Tag {tag_name} not found.")
443
443
  error_build_failed = error_message("Build failed")
444
+ error_request_failed = error_message("Request failed with status code {status_code}, please try again later.")
444
445
 
445
446
  info_incl_relative_path = info_message("** Relative path {path} does not exist, skipping.")
446
447
  info_ignoring_incl_file = info_message(
@@ -1,5 +1,11 @@
1
1
  import requests
2
2
 
3
+ from tinybird.tb.modules.feedback_manager import FeedbackManager
4
+
5
+
6
+ class LLMException(Exception):
7
+ pass
8
+
3
9
 
4
10
  class LLM:
5
11
  def __init__(
@@ -29,4 +35,8 @@ class LLM:
29
35
  headers={"Authorization": f"Bearer {self.user_token}"},
30
36
  data=data,
31
37
  )
38
+
39
+ if not response.ok:
40
+ raise LLMException(FeedbackManager.error_request_failed(status_code=response.status_code))
41
+
32
42
  return response.json().get("result", "")
@@ -207,7 +207,11 @@ def update_cli() -> None:
207
207
  text=True,
208
208
  )
209
209
  except FileNotFoundError:
210
- raise CLIException("Cannot find required tool: uv. Reinstall using: curl https://tinybird.co | sh")
210
+ raise CLIException(
211
+ FeedbackManager.error(
212
+ message="Cannot find required tool: uv. Reinstall using: curl https://tinybird.co | sh"
213
+ )
214
+ )
211
215
 
212
216
  stdout, stderr = process.communicate()
213
217
  if "Nothing to upgrade" not in stdout + stderr:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: tinybird
3
- Version: 0.0.1.dev119
3
+ Version: 0.0.1.dev120
4
4
  Summary: Tinybird Command Line Tool
5
5
  Home-page: https://www.tinybird.co/docs/cli/introduction.html
6
6
  Author: Tinybird