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: docs/en/connector-v2/sink/Hive.md
+51-1
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,7 @@ By default, we use 2PC commit to ensure `exactly-once`
47
47
48
48
### table_name [string]
49
49
50
-
Target Hive table name eg: db1.table1
50
+
Target Hive table name eg: db1.table1, and if the source is multiple mode, you can use `${database_name}.${table_name}` to generate the table name, it will replace the `${database_name}` and `${table_name}` with the value of the CatalogTable generate from the source.
51
51
52
52
### metastore_uri [string]
53
53
@@ -343,6 +343,56 @@ sink {
343
343
}
344
344
```
345
345
346
+
### example 2
347
+
348
+
We have multiple source table like this:
349
+
350
+
```bash
351
+
create table test_1(
352
+
)
353
+
PARTITIONED BY (xx);
354
+
355
+
create table test_2(
356
+
)
357
+
PARTITIONED BY (xx);
358
+
...
359
+
```
360
+
361
+
We need read data from these source tables and write to another tables:
362
+
363
+
The job config file can like this:
364
+
365
+
```
366
+
env {
367
+
# You can set flink configuration here
368
+
parallelism = 3
369
+
job.name="test_hive_source_to_hive"
370
+
}
371
+
372
+
source {
373
+
Hive {
374
+
tables_configs = [
375
+
{
376
+
table_name = "test_hive.test_1"
377
+
metastore_uri = "thrift://ctyun6:9083"
378
+
},
379
+
{
380
+
table_name = "test_hive.test_2"
381
+
metastore_uri = "thrift://ctyun7:9083"
382
+
}
383
+
]
384
+
}
385
+
}
386
+
387
+
sink {
388
+
# choose stdout output plugin to output data to console
Copy file name to clipboardExpand all lines: seatunnel-connectors-v2/connector-file/connector-file-local/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/local/source/config/LocalFileSourceConfig.java
Copy file name to clipboardExpand all lines: seatunnel-connectors-v2/connector-hive/src/main/java/org/apache/seatunnel/connectors/seatunnel/hive/commit/HiveSinkAggregatedCommitter.java
Copy file name to clipboardExpand all lines: seatunnel-connectors-v2/connector-hive/src/main/java/org/apache/seatunnel/connectors/seatunnel/hive/config/HiveConfig.java
+2-1
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,4 @@
1
+
1
2
/*
2
3
* Licensed to the Apache Software Foundation (ASF) under one or more
3
4
* contributor license agreements. See the NOTICE file distributed with
0 commit comments