Skip to content

Commit fdd9a8f

Browse files
committed
make style
1 parent 96d5be2 commit fdd9a8f

File tree

1 file changed

+6
-67
lines changed

1 file changed

+6
-67
lines changed

docs/integrations/engines/doris.md

Lines changed: 6 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
SQLMesh supports Doris through its MySQL-compatible protocol, while providing Doris-specific optimizations for table models, indexing, partitioning, and other features. The adapter is designed to leverage Doris's strengths for analytical workloads, with sensible defaults and support for advanced configuration.
88

9-
## Connection Configuration
9+
## Connection Configuration Example
1010

1111
```yaml
1212
doris:
@@ -21,13 +21,8 @@ doris:
2121
charset: utf8mb4
2222
connect_timeout: 60
2323
state_connection:
24-
# Use postgres as state connection
25-
type: postgres
26-
host: 127.0.0.1
27-
port: 5432
28-
user: your_user
29-
password: your_password
30-
database: your_database
24+
# Use duckdb as state connection
25+
type: duckdb
3126
```
3227
3328
## Table Models
@@ -36,13 +31,6 @@ Doris supports three table models: DUPLICATE, UNIQUE, and AGGREGATE. SQLMesh sup
3631

3732
### DUPLICATE Model (Default)
3833

39-
The DUPLICATE model allows duplicate data and is optimized for high-throughput scenarios like log data and streaming ingestion.
40-
41-
**Features:**
42-
- **High Write Performance**: Optimized for append-only workloads
43-
- **No Deduplication**: Allows duplicate records
44-
- **Streaming Friendly**: Ideal for real-time data ingestion
45-
4634
**Example Configuration:**
4735
```sql
4836
MODEL (
@@ -61,26 +49,18 @@ MODEL (
6149

6250
### UNIQUE Model
6351

64-
The UNIQUE model is ideal for dimension tables and scenarios requiring data updates. It ensures key uniqueness and supports efficient UPSERT operations.
65-
66-
**Features:**
67-
- **Primary Key Updates**: New data overwrites existing records with matching keys
68-
- **Merge-on-Write**: Can be enabled for better query performance
69-
- **Automatic Deduplication**: Ensures data uniqueness based on specified key columns
70-
7152
**Example Configuration:**
7253
```sql
7354
MODEL (
74-
name dim_users,
55+
name user_events,
7556
kind FULL,
7657
physical_properties (
7758
unique_key 'user_id',
7859
distributed_by (
7960
kind = 'HASH',
8061
expressions = 'user_id',
8162
buckets = 16
82-
),
83-
enable_unique_key_merge_on_write = 'true'
63+
)
8464
)
8565
);
8666
```
@@ -139,7 +119,7 @@ MODEL (
139119

140120
### Partitioning
141121

142-
Doris supports range partitioning and list partitioning to improve query performance.
122+
Doris table supports range partitioning and list partitioning to improve query performance.
143123

144124
**Custom Partition Expression:**
145125
```sql
@@ -327,47 +307,6 @@ FROM user_events
327307
GROUP BY user_id;
328308
```
329309

330-
## Schema Management
331-
332-
### Creating Schemas
333-
334-
```sql
335-
-- Schemas in Doris are databases
336-
CREATE DATABASE IF NOT EXISTS my_schema;
337-
```
338-
339-
### Dropping Schemas
340-
341-
```sql
342-
-- Doris doesn't support CASCADE clause
343-
DROP DATABASE my_schema;
344-
```
345-
346-
## Data Operations
347-
348-
### Table Operations
349-
350-
**Create Table Like:**
351-
```sql
352-
-- Create a new table with the same structure as an existing table
353-
CREATE TABLE new_table LIKE existing_table;
354-
```
355-
356-
**Rename Table:**
357-
```sql
358-
-- Rename a table
359-
ALTER TABLE old_table_name RENAME new_table_name;
360-
```
361-
362-
**Delete Operations:**
363-
```sql
364-
-- Delete specific records
365-
DELETE FROM table_name WHERE condition;
366-
367-
-- Full table deletion uses TRUNCATE for better performance
368-
DELETE FROM table_name WHERE TRUE; -- Executes as TRUNCATE TABLE
369-
```
370-
371310
## Dependencies
372311

373312
To use Doris with SQLMesh, install the required MySQL driver:

0 commit comments

Comments
 (0)