You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-16Lines changed: 21 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -97,22 +97,6 @@ To start using ClickHouse-Schema in your projects, follow these steps:
97
97
- Use `<your_schema>.GetOptions()` to access the options passed when creating the table schema.
98
98
- Use `<your_schema>.GetCreateTableQueryAsList()` to get the `CREATETABLE` query as a list of strings, which can be helpful for debugging or logging.
99
99
100
-
## Schema Options
101
-
102
-
When creating a schema, you can provide the following options:
103
-
104
-
- **`table_name`** (required): The name of the table in ClickHouse
105
-
- **`primary_key`** (optional): The primary key for the table. If not specified, `order_by` must be specified
106
-
- **`order_by`** (optional): The ORDER BY clause for the table. If not specified, `primary_key` must be specified
107
-
- **`database`** (optional): The database to use for the table
108
-
- **`on_cluster`** (optional): The name of the cluster to use for the table
109
-
- **`engine`** (optional): The engine to use for the table, default is `MergeTree()`
110
-
- **`partition_by`** (optional): The partition expression for the table. Can be any valid ClickHouse expression:
111
-
- Single expression: `"toYYYYMM(visitDate)"` or `"visitDate"`
112
-
- Tuple of expressions: `"(toMonday(startDate), eventType)"`
113
-
- Complex expressions: `"sipHash64(userId) % 16"`
114
-
- **`additional_options`** (optional): An array of strings that are appended to the end of the CREATE TABLE query (e.g., `['COMMENT \'Table comment\'']`)
@@ -131,3 +115,24 @@ When creating a schema, you can provide the following options:
131
115
- IP Addresses - `IPv4` and `IPv6`
132
116
133
117
And support for more types is coming!
118
+
119
+
120
+
## Schema Options
121
+
122
+
When creating a schema, you can provide the following options:
123
+
124
+
- `table_name` (required): The name of the table in ClickHouse
125
+
- `primary_key` (optional): The primary key for the table. If not specified, `order_by` must be specified
126
+
- `order_by` (optional): The ORDER BY clause for the table. If not specified, `primary_key` must be specified
127
+
- `database` (optional): The database to use for the table
128
+
- `on_cluster` (optional): The name of the cluster to use for the table
129
+
- `engine` (optional): The engine to use for the table, default is `MergeTree()`
130
+
- `partition_by` (optional): The partition expression for the table. Can be any valid ClickHouse
131
+
- `additional_options` (optional): An array of strings that are appended to the end of the CREATE TABLE query (e.g., `['COMMENT \'Table comment\'']`)
132
+
133
+
## ☕ Support this project
134
+
135
+
If you find this project helpful, consider buying me a coffee.
136
+
Your support helps me maintain and improve it.
137
+
138
+
[](https://www.paypal.com/donate/?business=9U7SF754EBPZ2&no_recurring=1¤cy_code=CAD)
0 commit comments