tinybird 0.0.1.dev0__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.

Potentially problematic release.


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

Files changed (45) hide show
  1. tinybird/__cli__.py +8 -0
  2. tinybird/ch_utils/constants.py +244 -0
  3. tinybird/ch_utils/engine.py +855 -0
  4. tinybird/check_pypi.py +25 -0
  5. tinybird/client.py +1281 -0
  6. tinybird/config.py +117 -0
  7. tinybird/connectors.py +428 -0
  8. tinybird/context.py +23 -0
  9. tinybird/datafile.py +5589 -0
  10. tinybird/datatypes.py +434 -0
  11. tinybird/feedback_manager.py +1022 -0
  12. tinybird/git_settings.py +145 -0
  13. tinybird/sql.py +865 -0
  14. tinybird/sql_template.py +2343 -0
  15. tinybird/sql_template_fmt.py +281 -0
  16. tinybird/sql_toolset.py +350 -0
  17. tinybird/syncasync.py +682 -0
  18. tinybird/tb_cli.py +25 -0
  19. tinybird/tb_cli_modules/auth.py +252 -0
  20. tinybird/tb_cli_modules/branch.py +1043 -0
  21. tinybird/tb_cli_modules/cicd.py +434 -0
  22. tinybird/tb_cli_modules/cli.py +1571 -0
  23. tinybird/tb_cli_modules/common.py +2082 -0
  24. tinybird/tb_cli_modules/config.py +344 -0
  25. tinybird/tb_cli_modules/connection.py +803 -0
  26. tinybird/tb_cli_modules/datasource.py +900 -0
  27. tinybird/tb_cli_modules/exceptions.py +91 -0
  28. tinybird/tb_cli_modules/fmt.py +91 -0
  29. tinybird/tb_cli_modules/job.py +85 -0
  30. tinybird/tb_cli_modules/pipe.py +858 -0
  31. tinybird/tb_cli_modules/regions.py +9 -0
  32. tinybird/tb_cli_modules/tag.py +100 -0
  33. tinybird/tb_cli_modules/telemetry.py +310 -0
  34. tinybird/tb_cli_modules/test.py +107 -0
  35. tinybird/tb_cli_modules/tinyunit/tinyunit.py +340 -0
  36. tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py +71 -0
  37. tinybird/tb_cli_modules/token.py +349 -0
  38. tinybird/tb_cli_modules/workspace.py +269 -0
  39. tinybird/tb_cli_modules/workspace_members.py +212 -0
  40. tinybird/tornado_template.py +1194 -0
  41. tinybird-0.0.1.dev0.dist-info/METADATA +2815 -0
  42. tinybird-0.0.1.dev0.dist-info/RECORD +45 -0
  43. tinybird-0.0.1.dev0.dist-info/WHEEL +5 -0
  44. tinybird-0.0.1.dev0.dist-info/entry_points.txt +2 -0
  45. tinybird-0.0.1.dev0.dist-info/top_level.txt +4 -0
tinybird/__cli__.py ADDED
@@ -0,0 +1,8 @@
1
+
2
+ __name__ = 'tinybird'
3
+ __description__ = 'Tinybird Command Line Tool'
4
+ __url__ = 'https://www.tinybird.co/docs/cli/introduction.html'
5
+ __author__ = 'Tinybird'
6
+ __author_email__ = 'support@tinybird.co'
7
+ __version__ = '0.0.1.dev0'
8
+ __revision__ = 'cc5b76003c'
@@ -0,0 +1,244 @@
1
+ ORIGIN_WS_NAME = "origin"
2
+ MAIN_WS_NAME = "main"
3
+ LIVE_WS_NAME = "live"
4
+ SNAPSHOT_WS_NAME = "snapshot"
5
+
6
+ ENABLED_TABLE_FUNCTIONS = {"generateRandom", "null", "numbers", "numbers_mt", "values", "zeros", "zeros_mt"}
7
+ # there's a workspace limit allowed_table_functions used in the APIs limit in cheriff
8
+ COPY_ENABLED_TABLE_FUNCTIONS = frozenset(
9
+ ["postgresql", "mysql", "mongodb", "url", "azureBlobStorage", "gcs", "iceberg", "s3", "deltaLake"]
10
+ )
11
+
12
+ ENABLED_SYSTEM_TABLES = {
13
+ "functions",
14
+ "numbers",
15
+ "numbers_mt",
16
+ "one",
17
+ }
18
+
19
+ RESERVED_DATABASE_NAMES = {
20
+ "tinybird",
21
+ "system",
22
+ "public",
23
+ "default",
24
+ "main",
25
+ ORIGIN_WS_NAME,
26
+ MAIN_WS_NAME,
27
+ LIVE_WS_NAME,
28
+ SNAPSHOT_WS_NAME,
29
+ "_temporary_and_external_tables",
30
+ }
31
+
32
+ # Expect this to not be a complete list of all CH Reserved keywords.
33
+
34
+ SQL_KEYWORDS = {
35
+ # Clickhouse/src/Client/Suggest.cpp
36
+ "add",
37
+ "admin",
38
+ "after",
39
+ "alias",
40
+ "all",
41
+ "alter",
42
+ "and",
43
+ "any",
44
+ "array",
45
+ "as",
46
+ "asc",
47
+ "async",
48
+ "attach",
49
+ "between",
50
+ "by",
51
+ "case",
52
+ "check",
53
+ "clear",
54
+ "cluster",
55
+ "collate",
56
+ "column",
57
+ "copy",
58
+ "create",
59
+ "cross",
60
+ "database",
61
+ "databases",
62
+ "deduplicate",
63
+ "default",
64
+ "desc",
65
+ "describe",
66
+ "detach",
67
+ "distinct",
68
+ "drop",
69
+ "else",
70
+ "end",
71
+ "engine",
72
+ "except",
73
+ "exists",
74
+ "fetch",
75
+ "final",
76
+ "for",
77
+ "format",
78
+ "freeze",
79
+ "from",
80
+ "full",
81
+ "global",
82
+ "grant",
83
+ "group",
84
+ "having",
85
+ "host",
86
+ "identified",
87
+ "if",
88
+ "ilike",
89
+ "in",
90
+ "inner",
91
+ "insert",
92
+ "interval",
93
+ "into",
94
+ "ip",
95
+ "join",
96
+ "key",
97
+ "kill",
98
+ "left",
99
+ "like",
100
+ "limit",
101
+ "limits",
102
+ "local",
103
+ "materialized",
104
+ "modify",
105
+ "name",
106
+ "not",
107
+ "on",
108
+ "only",
109
+ "optimize",
110
+ "option",
111
+ "or",
112
+ "order",
113
+ "outer",
114
+ "outfile",
115
+ "part",
116
+ "partition",
117
+ "permissive",
118
+ "policy",
119
+ "populate",
120
+ "prewhere",
121
+ "primary",
122
+ "processlist",
123
+ "profile",
124
+ "project",
125
+ "query",
126
+ "quota",
127
+ "randomized",
128
+ "readonly",
129
+ "regexp",
130
+ "rename",
131
+ "replace",
132
+ "restrictive",
133
+ "revoke",
134
+ "right",
135
+ "role",
136
+ "row",
137
+ "sample",
138
+ "select",
139
+ "set",
140
+ "settings",
141
+ "show",
142
+ "sync",
143
+ "table",
144
+ "tables",
145
+ "temporary",
146
+ "test",
147
+ "then",
148
+ "to",
149
+ "totals",
150
+ "tracking",
151
+ "truncate",
152
+ "union",
153
+ "use",
154
+ "user",
155
+ "using",
156
+ "values",
157
+ "view",
158
+ "when",
159
+ "where",
160
+ "with",
161
+ "writable"
162
+ # Extra keywords that were added here but don't come from CH source code
163
+ "anti",
164
+ "asof",
165
+ "cube",
166
+ "explain",
167
+ "file",
168
+ "fill",
169
+ "max",
170
+ "min",
171
+ "null",
172
+ "rollout",
173
+ "semi",
174
+ "step",
175
+ "ties",
176
+ "variable",
177
+ }
178
+
179
+ FORBIDDEN_SQL_KEYWORDS = {
180
+ "add",
181
+ "after",
182
+ "all",
183
+ "and",
184
+ "any",
185
+ "array",
186
+ "as",
187
+ "asc",
188
+ "between",
189
+ "by",
190
+ "case",
191
+ "collate",
192
+ "cross",
193
+ "default",
194
+ "desc",
195
+ "distinct",
196
+ "else",
197
+ "end",
198
+ "exists",
199
+ "from",
200
+ "full",
201
+ "global",
202
+ "group",
203
+ "having",
204
+ "if",
205
+ "ilike",
206
+ "in",
207
+ "inner",
208
+ "insert",
209
+ "interval",
210
+ "into",
211
+ "join",
212
+ "left",
213
+ "like",
214
+ "limit",
215
+ "limits",
216
+ "materialized",
217
+ "not",
218
+ "on",
219
+ "or",
220
+ "order",
221
+ "outer",
222
+ "prewhere",
223
+ "right",
224
+ "sample",
225
+ "select",
226
+ "then",
227
+ "to",
228
+ "totals",
229
+ "union",
230
+ "using",
231
+ "where",
232
+ "with",
233
+ # Extra keywords that were added here but don't come from CH source code
234
+ "anti",
235
+ "asof",
236
+ "cube",
237
+ "max",
238
+ "min",
239
+ "null",
240
+ "semi",
241
+ }
242
+
243
+ CH_SETTINGS_JOIN_ALGORITHM_HASH = "hash" # uses 'hash' by default, https://clickhouse.com/docs/en/operations/settings/settings/#settings-join_algorithm
244
+ CH_SETTINGS_JOIN_ALGORITHM_AUTO = "auto,hash"