@@ -108,40 +108,26 @@ with the name of the table you want to query information about.
108
108
109
109
---
110
110
111
- {{% code-placeholders "TABLE_NAME" %}}
111
+ {{% code-placeholders "TABLE_NAME _ (1|2|3)| TABLE_NAME" %}}
112
112
113
- ### View partition templates of all tables
113
+ ### View the partition template of a specific table
114
114
115
115
``` sql
116
- SELECT * FROM system .tables
116
+ SELECT * FROM system .tables WHERE table_name = ' TABLE_NAME '
117
117
```
118
118
119
119
#### Example results
120
120
121
121
| table_name | partition_template |
122
122
| :--------- | :----------------------------------------------------------------------------------------- |
123
123
| weather | ` {"parts":[{"timeFormat":"%Y-%m-%d"},{"bucket":{"tagName":"location","numBuckets":250}}]} ` |
124
- | home | ` {"parts":[{"timeFormat":"%Y-%m-%d"},{"tagValue":"room"},{"tagValue":"sensor_id"}]} ` |
125
- | numbers | ` {"parts":[{"timeFormat":"%Y"}]} ` |
126
124
127
125
{{% note %}}
128
126
If a table doesn't include a partition template in the output of this command,
129
127
the table uses the default (1 day) partition strategy and doesn't partition
130
128
by tags or tag buckets.
131
129
{{% /note %}}
132
130
133
- ### View the partition template of a specific table
134
-
135
- ``` sql
136
- SELECT * FROM system .tables WHERE table_name = ' TABLE_NAME'
137
- ```
138
-
139
- #### Example results
140
-
141
- | table_name | partition_template |
142
- | :--------- | :----------------------------------------------------------------------------------------- |
143
- | weather | ` {"parts":[{"timeFormat":"%Y-%m-%d"},{"bucket":{"tagName":"location","numBuckets":250}}]} ` |
144
-
145
131
### View all partitions for a table
146
132
147
133
``` sql
@@ -166,6 +152,8 @@ SELECT
166
152
COUNT (* ) AS partition_count
167
153
FROM
168
154
system .partitions
155
+ WHERE
156
+ table_name IN (' TABLE_NAME_1' , ' TABLE_NAME_2' , ' TABLE_NAME_3' )
169
157
GROUP BY
170
158
table_name
171
159
```
0 commit comments