File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed
docs/doc/30-reference/20-functions/111-system-functions Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ title : FUSE_BLOCK
3
+ ---
4
+
5
+ Returns the block information of a snapshot of table.
6
+
7
+ ## Syntax
8
+
9
+ ``` sql
10
+ FUSE_BLOCK(' <database_name>' , ' <table_name>' ,' <snapshot_id>' )
11
+ ```
12
+
13
+ ## Examples
14
+
15
+ ``` sql
16
+ CREATE TABLE mytable (c int );
17
+ INSERT INTO mytable values (1 );
18
+ INSERT INTO mytable values (2 );
19
+
20
+ -- Obtain a snapshot ID
21
+ SELECT snapshot_id FROM FUSE_SNAPSHOT(' default' , ' mytable' ) limit 1 ;
22
+
23
+ -- -
24
+ + -- --------------------------------+
25
+ | snapshot_id |
26
+ + -- --------------------------------+
27
+ | 51e84b56458f44269b05a059b364a659 |
28
+ + -- --------------------------------+
29
+
30
+ SELECT * FROM FUSE_BLOCK(' default' , ' mytable' , ' 51e84b56458f44269b05a059b364a659' );
31
+
32
+ -- -
33
+ + -- --------------------------------+----------------------------+----------------------------------------------------+------------+----------------------------------------------------+-------------------+
34
+ | snapshot_id | timestamp | block_location | block_size | bloom_filter_location | bloom_filter_size |
35
+ + -- --------------------------------+----------------------------+----------------------------------------------------+------------+----------------------------------------------------+-------------------+
36
+ | 51e84b56458f44269b05a059b364a659 | 2022 - 09 - 15 07 :14 :14 .137268 | 1 / 7 / _b/ 39a6dbbfd9b44ad5a8ec8ab264c93cf5_v0 .parquet | 4 | 1 / 7 / _i/ 39a6dbbfd9b44ad5a8ec8ab264c93cf5_v1 .parquet | 221 |
37
+ | 51e84b56458f44269b05a059b364a659 | 2022 - 09 - 15 07 :14 :14 .137268 | 1 / 7 / _b/ d0ee9688c4d24d6da86acd8b0d6f4fad_v0 .parquet | 4 | 1 / 7 / _i/ d0ee9688c4d24d6da86acd8b0d6f4fad_v1 .parquet | 219 |
38
+ + -- --------------------------------+----------------------------+----------------------------------------------------+------------+----------------------------------------------------+-------------------+
39
+ ```
You can’t perform that action at this time.
0 commit comments