Hisoka-X commented on code in PR #6082:
URL: https://github.com/apache/seatunnel/pull/6082#discussion_r1442547319
##########
docs/en/connector-v2/formats/avro.md:
##########
@@ -0,0 +1,125 @@
+# Avro format
+
+Avro is very popular in streaming data pipeline. Now seatunnel supports Avro
format in kafka connector.
+
+# How to use Avro format
+
+## Kafka uses example
+
+- This is an example to generate data from fake source and sink to kafka with
avro format.
+
+```bash
+env {
+ parallelism = 1
+ job.mode = "BATCH"
+
+ #spark config
+ spark.app.name = "SeaTunnel"
+ spark.executor.instances = 1
+ spark.executor.cores = 1
+ spark.executor.memory = "1g"
+ spark.master = local
+}
+
+source {
+ FakeSource {
+ row.num = 90
+ schema = {
+ fields {
+ c_map = "map<string, string>"
+ c_array = "array<int>"
+ c_string = string
+ c_boolean = boolean
+ c_tinyint = tinyint
+ c_smallint = smallint
+ c_int = int
+ c_bigint = bigint
+ c_float = float
+ c_double = double
+ c_bytes = bytes
+ c_date = date
+ c_decimal = "decimal(38, 18)"
+ c_timestamp = timestamp
+ c_row = {
+ c_map = "map<string, string>"
+ c_array = "array<int>"
+ c_string = string
+ c_boolean = boolean
+ c_tinyint = tinyint
+ c_smallint = smallint
+ c_int = int
+ c_bigint = bigint
+ c_float = float
+ c_double = double
+ c_bytes = bytes
+ c_date = date
+ c_decimal = "decimal(38, 18)"
+ c_timestamp = timestamp
+ }
+ }
+ }
+ result_table_name = "fake"
+ }
+}
+
+sink {
+ Kafka {
+ bootstrap.servers = "kafkaCluster:9092"
+ topic = "test_avro_topic_fake_source"
+ format = avro
+ }
+}
+```
+
+- This is an example read data from kafka with avro format and print to
console.
+
+```bash
+env {
+ parallelism = 1
+ job.mode = "BATCH"
+
+ # You can set spark configuration here
+ spark.app.name = "SeaTunnel"
+ spark.executor.instances = 1
+ spark.executor.cores = 1
+ spark.executor.memory = "1g"
+ spark.master = local
Review Comment:
```suggestion
```
##########
docs/en/connector-v2/formats/avro.md:
##########
@@ -0,0 +1,125 @@
+# Avro format
+
+Avro is very popular in streaming data pipeline. Now seatunnel supports Avro
format in kafka connector.
+
+# How to use Avro format
+
+## Kafka uses example
+
+- This is an example to generate data from fake source and sink to kafka with
avro format.
+
+```bash
+env {
+ parallelism = 1
+ job.mode = "BATCH"
+
+ #spark config
+ spark.app.name = "SeaTunnel"
+ spark.executor.instances = 1
+ spark.executor.cores = 1
+ spark.executor.memory = "1g"
+ spark.master = local
Review Comment:
```suggestion
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]