hailin0 commented on code in PR #3185:
URL: 
https://github.com/apache/incubator-seatunnel/pull/3185#discussion_r1016625140


##########
docs/en/connector-v2/source/GoogleSheets.md:
##########
@@ -0,0 +1,80 @@
+# GoogleSheets
+
+> GoogleSheets source connector
+
+## Description
+
+Used to read data from GoogleSheets.
+
+## Key features
+
+- [x] [batch](../../concept/connector-v2-features.md)
+- [ ] [stream](../../concept/connector-v2-features.md)
+- [ ] [exactly-once](../../concept/connector-v2-features.md)
+- [x] [schema projection](../../concept/connector-v2-features.md)
+- [ ] [parallelism](../../concept/connector-v2-features.md)
+- [ ] [support user-defined split](../../concept/connector-v2-features.md)
+- [ ] file format
+    - [ ] text
+    - [ ] csv
+    - [ ] json
+
+## Options
+
+| name                | type         | required | default value |
+|-------------------  |--------------|----------|---------------|
+| service_account_key | string       | yes      | -             |
+| sheet_id            | string       | yes      | -             |
+| sheet_name          | string       | yes      | -             |
+| headers             | array        | yes      | -             |
+| schema              | config       | yes      | -             |
+
+### service_account_key [string]
+
+google cloud service account, base64 required
+
+### sheet_id [string]
+
+sheet id in a Google Sheets URL
+
+### sheet_name [string]
+
+the name of the sheet you want to import
+
+### headers [array]
+
+as column name
+
+### schema [config]
+
+#### fields [config]
+
+the schema fields of upstream data
+
+## Example
+
+simple:
+
+```hocon
+  GoogleSheets {
+    service_account_key = "seatunnel-test"
+    sheet_id = "1VI0DvyZK-NIdssSdsDSsSSSC-_-rYMi7ppJiI_jhE"
+    sheet_name = "sheets01"
+    range = "A1:C3"
+    headers = ["a", "b", "c"]
+    schema = {
+      fields {
+        a = int
+        b = string
+        c = string

Review Comment:
   > > headers and fields#key are duplicated define, can you remove headers?
   > 
   > Header specifies the name of each column in the table,Is orderly.But 
fields # key is unordered. I think it should be irreplaceable
   
   @skyoct 
   
   reference to here, use SeaTunnelSchema to keep fields#key order
   
   
https://github.com/apache/incubator-seatunnel/blob/dev/seatunnel-connectors-v2/connector-common/src/main/java/org/apache/seatunnel/connectors/seatunnel/common/schema/SeaTunnelSchema.java#L207



-- 
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]

Reply via email to