tinybird 4.6.10.dev0__py3-none-any.whl → 4.6.11.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.
@@ -121,6 +121,12 @@ class TableDetails:
121
121
  def is_mergetree_family(self) -> bool:
122
122
  return self.engine is not None and "mergetree" in self.engine.lower()
123
123
 
124
+ def is_view(self) -> bool:
125
+ return self.original_engine == "View"
126
+
127
+ def is_merge_final_engine(self) -> bool:
128
+ return self.original_engine == "MergeFinal"
129
+
124
130
  def supports_alter_add_column(self) -> bool:
125
131
  return self.is_mergetree_family() or (self.engine is not None and self.engine.lower() == "null")
126
132
 
@@ -221,8 +221,6 @@ INTERNAL_TABLES: Tuple[str, ...] = (
221
221
  "kafka_ops_log",
222
222
  "datasources_storage",
223
223
  "endpoint_errors",
224
- "bi_stats_rt",
225
- "bi_stats",
226
224
  )
227
225
 
228
226
  PREVIEW_CONNECTOR_SERVICES = ["s3", "s3_iamrole", "gcs"]
@@ -1725,7 +1723,9 @@ def parse(
1725
1723
 
1726
1724
  parser_state.current_node["indexes"] = indexes
1727
1725
 
1728
- def assign_var(v: str, allowed_values: Optional[set[str]] = None) -> Callable[[VarArg(str), KwArg(Any)], None]:
1726
+ def assign_var(
1727
+ v: str, allowed_values: Optional[set[str]] = None, lowercase: bool = False
1728
+ ) -> Callable[[VarArg(str), KwArg(Any)], None]:
1729
1729
  @multiline_not_supported
1730
1730
  def _f(*args: str, **kwargs: Any):
1731
1731
  s = _unquote((" ".join(args)).strip())
@@ -1736,6 +1736,8 @@ def parse(
1736
1736
  lineno=kwargs["lineno"],
1737
1737
  pos=1,
1738
1738
  )
1739
+ if lowercase:
1740
+ val = val.lower()
1739
1741
  parser_state.current_node[v.lower()] = val
1740
1742
 
1741
1743
  return _f
@@ -2048,7 +2050,9 @@ def parse(
2048
2050
  "import_schedule": assign_var("import_schedule"),
2049
2051
  "import_strategy": import_strategy_deprecated, # Deprecated, always append
2050
2052
  "import_bucket_uri": assign_var("import_bucket_uri"),
2051
- "import_format": assign_var("import_format"),
2053
+ # Lowercase: format checks and executor routing downstream expect
2054
+ # lowercase values (ANALYTICS-A8M)
2055
+ "import_format": assign_var("import_format", lowercase=True),
2052
2056
  "import_from_timestamp": assign_var("import_from_timestamp"),
2053
2057
  "import_service": import_service_deprecated, # Deprecated
2054
2058
  "import_external_datasource": import_external_datasource_deprecated, # Deprecated, BQ and SFK
@@ -244,49 +244,6 @@ def get_tinybird_service_datasources() -> List[Dict[str, Any]]:
244
244
  {"name": "rows_quarantine", "type": "SimpleAggregateFunction(max, UInt64)"},
245
245
  ],
246
246
  },
247
- {
248
- "name": "tinybird.bi_stats_rt",
249
- "description": "Contains information about all requests to your BI Connector interface in real time.",
250
- "dateColumn": "start_datetime",
251
- "engine": {
252
- "engine": "MergeTree",
253
- "sorting_key": "cityHash64(query_normalized), start_datetime",
254
- "ttl": "start_datetime + toIntervalDay(7)",
255
- },
256
- "columns": [
257
- {"name": "start_datetime", "type": "DateTime"},
258
- {"name": "query", "type": "String"},
259
- {"name": "query_normalized", "type": "String"},
260
- {"name": "error_code", "type": "Int32"},
261
- {"name": "error", "type": "Nullable(String)"},
262
- {"name": "duration", "type": "UInt64"},
263
- {"name": "read_rows", "type": "UInt64"},
264
- {"name": "read_bytes", "type": "UInt64"},
265
- {"name": "result_rows", "type": "UInt64"},
266
- {"name": "result_bytes", "type": "UInt64"},
267
- ],
268
- },
269
- {
270
- "name": "tinybird.bi_stats",
271
- "description": "Aggregates the stats in tinybird.bi_stats_rt by day.",
272
- "dateColumn": "date",
273
- "engine": {"engine": "MergeTree", "sorting_key": "cityHash64(query_normalized), start_datetime"},
274
- "columns": [
275
- {"name": "date", "type": "Date"},
276
- {"name": "query_normalized", "type": "String"},
277
- {"name": "view_count", "type": "UInt64"},
278
- {"name": "error_count", "type": "UInt64"},
279
- {"name": "avg_duration_state", "type": "AggregateFunction(avg, Float32)"},
280
- {
281
- "name": "quantile_timing_state",
282
- "type": "AggregateFunction(quantilesTiming(0.9, 0.95, 0.99), Float64)",
283
- },
284
- {"name": "read_bytes_sum", "type": "UInt64"},
285
- {"name": "read_rows_sum", "type": "UInt64"},
286
- {"name": "avg_result_rows_state", "type": "AggregateFunction(avg, Float32)"},
287
- {"name": "avg_result_bytes_state", "type": "AggregateFunction(avg, Float32)"},
288
- ],
289
- },
290
247
  {
291
248
  "name": "tinybird.sinks_ops_log",
292
249
  "description": "Contains information about your Sink pipes.",
@@ -483,6 +440,7 @@ def get_tinybird_service_datasources() -> List[Dict[str, Any]]:
483
440
  {"name": "error_code", "type": "Int16"},
484
441
  {"name": "error", "type": "String"},
485
442
  {"name": "fix_suggestion", "type": "String"},
443
+ {"name": "fix_suggestion_ai", "type": "String"},
486
444
  {"name": "run_validation", "type": "DateTime"},
487
445
  ],
488
446
  },
@@ -798,51 +756,6 @@ def get_organization_service_datasources() -> List[Dict[str, Any]]:
798
756
  {"name": "token_name", "type": "String"},
799
757
  ],
800
758
  },
801
- {
802
- "name": "organization.bi_stats_rt",
803
- "description": "Contains information about all requests to the BI Connector interface for the whole Organization in real time.",
804
- "dateColumn": "start_datetime",
805
- "engine": {
806
- "engine": "MergeTree",
807
- "sorting_key": "cityHash64(query_normalized), start_datetime",
808
- "ttl": "start_datetime + toIntervalDay(7)",
809
- },
810
- "columns": [
811
- {"name": "database", "type": "String"},
812
- {"name": "start_datetime", "type": "DateTime"},
813
- {"name": "query", "type": "String"},
814
- {"name": "query_normalized", "type": "String"},
815
- {"name": "error_code", "type": "Int32"},
816
- {"name": "error", "type": "Nullable(String)"},
817
- {"name": "duration", "type": "UInt64"},
818
- {"name": "read_rows", "type": "UInt64"},
819
- {"name": "read_bytes", "type": "UInt64"},
820
- {"name": "result_rows", "type": "UInt64"},
821
- {"name": "result_bytes", "type": "UInt64"},
822
- ],
823
- },
824
- {
825
- "name": "organization.bi_stats",
826
- "description": "Aggregates the stats in organization.bi_stats_rt by day.",
827
- "dateColumn": "date",
828
- "engine": {"engine": "MergeTree", "sorting_key": "database, cityHash64(query_normalized), date"},
829
- "columns": [
830
- {"name": "database", "type": "String"},
831
- {"name": "date", "type": "Date"},
832
- {"name": "query_normalized", "type": "String"},
833
- {"name": "view_count", "type": "UInt64"},
834
- {"name": "error_count", "type": "UInt64"},
835
- {"name": "avg_duration_state", "type": "AggregateFunction(avg, Float32)"},
836
- {
837
- "name": "quantile_timing_state",
838
- "type": "AggregateFunction(quantilesTiming(0.9, 0.95, 0.99), Float64)",
839
- },
840
- {"name": "read_bytes_sum", "type": "UInt64"},
841
- {"name": "read_rows_sum", "type": "UInt64"},
842
- {"name": "avg_result_rows_state", "type": "AggregateFunction(avg, Float32)"},
843
- {"name": "avg_result_bytes_state", "type": "AggregateFunction(avg, Float32)"},
844
- ],
845
- },
846
759
  {
847
760
  "name": "organization.metrics_logs",
848
761
  "description": "Metrics of your organization's dedicated clusters",
tinybird/tb/__cli__.py CHANGED
@@ -4,5 +4,5 @@ __description__ = 'Tinybird Command Line Tool'
4
4
  __url__ = 'https://www.tinybird.co/docs/forward/commands'
5
5
  __author__ = 'Tinybird'
6
6
  __author_email__ = 'support@tinybird.co'
7
- __version__ = '4.6.10.dev0'
8
- __revision__ = 'fa1549d'
7
+ __version__ = '4.6.11.dev0'
8
+ __revision__ = 'd98671a'
@@ -21,7 +21,6 @@ from tinybird.tb.modules.feedback_manager import FeedbackManager
21
21
 
22
22
  LOG_SOURCES: Tuple[str, ...] = (
23
23
  "tinybird.pipe_stats_rt",
24
- "tinybird.bi_stats_rt",
25
24
  "tinybird.block_log",
26
25
  "tinybird.datasources_ops_log",
27
26
  "tinybird.endpoint_errors",
@@ -39,7 +38,6 @@ DEFAULT_LOG_SOURCES: Tuple[str, ...] = (
39
38
 
40
39
  TIMESTAMP_COLUMNS: Dict[str, str] = {
41
40
  "tinybird.pipe_stats_rt": "start_datetime",
42
- "tinybird.bi_stats_rt": "start_datetime",
43
41
  "tinybird.block_log": "timestamp",
44
42
  "tinybird.datasources_ops_log": "timestamp",
45
43
  "tinybird.endpoint_errors": "start_datetime",
@@ -61,16 +59,6 @@ RELEVANT_DETAIL_FIELDS: Dict[str, Tuple[str, ...]] = {
61
59
  "read_bytes",
62
60
  "result_rows",
63
61
  ),
64
- "tinybird.bi_stats_rt": (
65
- "query_normalized",
66
- "error_code",
67
- "error",
68
- "duration",
69
- "read_rows",
70
- "read_bytes",
71
- "result_rows",
72
- "result_bytes",
73
- ),
74
62
  "tinybird.block_log": (
75
63
  "datasource_name",
76
64
  "status",
@@ -207,7 +195,7 @@ _TEMPORAL_DETAIL_FIELDS = {
207
195
  _DURATION_DETAIL_FIELDS = {"duration", "elapsed_time", "processing_time"}
208
196
  _ROW_COUNT_DETAIL_FIELDS = {"rows", "read_rows", "written_rows", "result_rows", "quarantine_lines"}
209
197
  _BYTE_COUNT_DETAIL_FIELDS = {"bytes", "read_bytes", "result_bytes", "written_bytes"}
210
- _MILLISECOND_DURATION_SOURCES = {"tinybird.bi_stats_rt"}
198
+ _MILLISECOND_DURATION_SOURCES: Set[str] = set()
211
199
 
212
200
 
213
201
  def _to_iso_utc(dt: datetime) -> str:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: tinybird
3
- Version: 4.6.10.dev0
3
+ Version: 4.6.11.dev0
4
4
  Summary: Tinybird Command Line Tool
5
5
  Home-page: https://www.tinybird.co/docs/forward/commands
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
+ 4.6.10
56
+ ********
57
+
58
+ - `Removed` `tinybird.bi_stats_rt` from `tb logs` sources. The BI Connector `bi_stats` / `bi_stats_rt` service datasources are deprecated.
59
+
55
60
  4.6.9
56
61
  *******
57
62
 
@@ -3,7 +3,7 @@ tinybird/datatypes.py,sha256=DRScTI1-lgYjbC7u_4qxOLFleWL-vief_eBg_9WU37U,11304
3
3
  tinybird/feedback_manager.py,sha256=ZnRsExCkEZKuslmSxn3m706-0UIZ_qOpdek9ar16KOI,68001
4
4
  tinybird/git_settings.py,sha256=mqWgeboOlOFsSo97qyv595UCR2R1QCAqT4GTawBNPBg,3935
5
5
  tinybird/prompts.py,sha256=FNYpphDYlrXpm5AQM3yfQPbj4gd_TVnwoaoeswtx0OE,32699
6
- tinybird/service_datasources.py,sha256=Fp3a_Evte1u1U4f4D8fchgbtv6BgJIIyBbmOLtgLu4Q,58162
6
+ tinybird/service_datasources.py,sha256=asBTXONMv7sf7LFBx1a4eTcZCHPUq-I3r030AtorRzY,53643
7
7
  tinybird/sql.py,sha256=L3tTmm62iTrf6WQdcV8mmwrCMitLFUvJ3OfDzyRTMGw,47385
8
8
  tinybird/sql_template.py,sha256=8A5Jfzej7OHXzbfFMGpbq-YUzSEOoDHy5u7uy0vLZo4,127947
9
9
  tinybird/sql_template_fmt.py,sha256=Ma4qcs-2r8ZXQC4GUmrCqYz34DsnGF8k5lE2Jwnr314,10638
@@ -11,15 +11,15 @@ tinybird/sql_toolset.py,sha256=TvWeH3DsB13SfJ97V_t_ZaFTJ1IAtsrxQ8E3FLL8_tE,27442
11
11
  tinybird/syncasync.py,sha256=rIPmCvygWSFqfnlVqhZH4N9gVVTvD6DEPsfoxGizYrI,27776
12
12
  tinybird/tornado_template.py,sha256=1_0nYFk_xJh_TMHh6AKkJILvnNY6xYmaM-uJ3Ofv7e8,42085
13
13
  tinybird/ch_utils/constants.py,sha256=yTNizMzgYNBzUc2EV3moBfdrDIggOe9hiuAgWF7sv2c,4333
14
- tinybird/ch_utils/engine.py,sha256=rZ2f5QsG3iDB60a1IwSJmTIqcCkjTHe5GzBPqTGvvOc,36711
15
- tinybird/datafile/common.py,sha256=pe9en0Kr8Bat_DyQjSjO2185BnEHkXGwrGN-tlaX68A,110244
14
+ tinybird/ch_utils/engine.py,sha256=OkR86FOOUPRpCsRxlR-kunykg-K4Daqo3uS06X1uvYQ,36887
15
+ tinybird/datafile/common.py,sha256=ASO118MEypTFiPcL9Kgr9VSje9iMbMjrUiz0CvdRDPw,110449
16
16
  tinybird/datafile/exceptions.py,sha256=8rw2umdZjtby85QbuRKFO5ETz_eRHwUY5l7eHsy1wnI,556
17
17
  tinybird/datafile/parse_connection.py,sha256=GxmGp_XnWbDZPDbh_PBxitlIMqZRYfDwxMBw-JQBp1g,1890
18
18
  tinybird/datafile/parse_datasource.py,sha256=yd58HrUF4yNJXLn6OsvKGpZJpvrcjLGAeJG1lgBe_zk,1891
19
19
  tinybird/datafile/parse_pipe.py,sha256=-9bbgVuiWRyDYydrLVflDBt8GstZotMy6dklsrc6MUY,3859
20
20
  tinybird/iterating/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
21
  tinybird/iterating/data_branch_modes.py,sha256=5YuDa-gr8mKwmES8Xro6TRKbQtaOtIw4GbC606Qhu3o,184
22
- tinybird/tb/__cli__.py,sha256=sBCB0K5JZxO0_l6bDnUh46X7CvaCCTd0a3HrDVNAGqo,246
22
+ tinybird/tb/__cli__.py,sha256=y6cbgNzDADefv9m_dqrO8n6feS_k0xev5FIudmGlk48,246
23
23
  tinybird/tb/check_pypi.py,sha256=Gp0HkHHDFMSDL6nxKlOY51z7z1Uv-2LRexNTZSHHGmM,552
24
24
  tinybird/tb/cli.py,sha256=IjiGfNIpxSxi1odK1kMj9s8lEhx3sAUgGA263XdmyR0,1119
25
25
  tinybird/tb/client.py,sha256=wgXYa_CSKi-ymWnX-j8-CNHCNdQrUWQA6ezT0REMPOs,56830
@@ -57,7 +57,7 @@ tinybird/tb/modules/local_logs.py,sha256=TTrfEQr3wVoddrQiKslSWJQ8BE4FOlMQZbH1yJ5
57
57
  tinybird/tb/modules/login.py,sha256=fxgcsN0fMhjzT_6C8VrwGTxnLxLVuWlZvASFr8I9yUU,1885
58
58
  tinybird/tb/modules/login_common.py,sha256=oRIAJm1cwJ4t4hZb1RKRmyylZuYz0mrEBo0xTOZHSQ8,22185
59
59
  tinybird/tb/modules/logout.py,sha256=sniI4JNxpTrVeRCp0oGJuQ3yRerG4hH5uz6oBmjv724,1009
60
- tinybird/tb/modules/logs.py,sha256=uSQi_A6QIFOjAoj1h8XOI_51AQ3uk5UEg2TjYbZxDJA,21462
60
+ tinybird/tb/modules/logs.py,sha256=M05V2OgWqv2suaCzz8c5IDfCnXhVqZ9WIh8rNQpolSg,21165
61
61
  tinybird/tb/modules/materialization.py,sha256=SaomNeaAzLWtcnsZdetYBxEq0ihY1cRzh23n3Z1P_c4,5643
62
62
  tinybird/tb/modules/open.py,sha256=ddABA4guIrBhrCKXYpkH4cfiAcFOG2B1eVePk5BEXto,1799
63
63
  tinybird/tb/modules/pipe.py,sha256=xPKtezhnWZ6k_g82r4XpgKslofhuIxb_PvynH4gdUzI,2393
@@ -99,8 +99,8 @@ tinybird/tb_cli_modules/config.py,sha256=Ey9yqM27C4Irglm5-63RXte8K0bFh8ConKdIoAa
99
99
  tinybird/tb_cli_modules/exceptions.py,sha256=pmucP4kTF4irIt7dXiG-FcnI-o3mvDusPmch1L8RCWk,3367
100
100
  tinybird/tb_cli_modules/regions.py,sha256=QjsL5H6Kg-qr0aYVLrvb1STeJ5Sx_sjvbOYO0LrEGMk,166
101
101
  tinybird/tb_cli_modules/telemetry.py,sha256=W098H6jmS4kpE7hN3tadaREBTf7oMocel-lkKWN0pU8,10466
102
- tinybird-4.6.10.dev0.dist-info/METADATA,sha256=v8zmTgNakaitSAm774g0Ti5iS6IX4SklvIX08s4-ACg,14923
103
- tinybird-4.6.10.dev0.dist-info/WHEEL,sha256=beeZ86-EfXScwlR_HKu4SllMC9wUEj_8Z_4FJ3egI2w,91
104
- tinybird-4.6.10.dev0.dist-info/entry_points.txt,sha256=LwdHU6TfKx4Qs7BqqtaczEZbImgU7Abe9Lp920zb_fo,43
105
- tinybird-4.6.10.dev0.dist-info/top_level.txt,sha256=ZIQJTPCzMqnfDzM_hEGZrJqDSEcKnIK_49T86DGWpyQ,78
106
- tinybird-4.6.10.dev0.dist-info/RECORD,,
102
+ tinybird-4.6.11.dev0.dist-info/METADATA,sha256=DXBS55QevyySh7N55AlvYBmTGad4mU2icvsVAzTCXb8,15080
103
+ tinybird-4.6.11.dev0.dist-info/WHEEL,sha256=beeZ86-EfXScwlR_HKu4SllMC9wUEj_8Z_4FJ3egI2w,91
104
+ tinybird-4.6.11.dev0.dist-info/entry_points.txt,sha256=LwdHU6TfKx4Qs7BqqtaczEZbImgU7Abe9Lp920zb_fo,43
105
+ tinybird-4.6.11.dev0.dist-info/top_level.txt,sha256=ZIQJTPCzMqnfDzM_hEGZrJqDSEcKnIK_49T86DGWpyQ,78
106
+ tinybird-4.6.11.dev0.dist-info/RECORD,,