You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "chessplay (via GitHub)" <gi...@apache.org> on 2024/09/05 02:13:54 UTC
[I] [Bug] [Module Name] Bug title [seatunnel]
chessplay opened a new issue, #7585:
URL: https://github.com/apache/seatunnel/issues/7585
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22bug%22) and found no similar issues.
### What happened
I am working on a streaming job using kafka protobuf format feature, where I need to parse a Kafka topic containing a protobuf message with nested objects in an array,The data format cloud be seen in my seaTunnel config ,The protobuf message has a repeated field CurrentUserInfo as part of the CurrentUserContent message。I tried to extract CurrentUserInfo field using struct query as the https://seatunnel.apache.org/docs/2.3.7/transform-v2/sql#struct-query show but failed.
### SeaTunnel Version
2.3.7-dev
### SeaTunnel Config
```conf
env {
parallelism = 1
job.mode = "STREAMING"
}
source {
Kafka {
schema = {
fields {
sn = string
tenantId = int
buildingId = int
groupId = int
deviceAliasName = string
buildingName = string
productType = string
utcCode = int
updateTime = bigint
expireTime = bigint
totalUsers = int
activeUsers = int
usersOf2G = int
usersOf5G = int
usersOf6G = int
usersOfBadRssi = int
usersOfNormalRssi = int
usersOfGoodRssi = int
withEapScoreUsers = int
CurrentUserInfo {
userId=int
mac=string
userIp=string
onlineTime=bigint
updateTime=bigint
ssid=string
rssi=int
uplinkRate=float
downlinkRate=float
updownlinkRate=float
upRate=bigint
downRate=bigint
upDownRate=bigint
wifiUp=bigint
wifiDown=bigint
wifiUpDown=bigint
timeDelay=int
pktLoseRate=int
radioIndex=int
band=string
channel=string
floorNoise=int
utilization=int
activeTime=bigint
score=int
scoreReason=string
maxRate=int
name=string
}
}
}
topic = "pb-wirelessUser"
format = protobuf
protobuf_message_name = CurrentUserContent
protobuf_schema = """
syntax = "proto3";
package com.ruijie.cloud.macc.log.proto.sta;
message CurrentUserContent {
string sn = 1;
uint32 tenantId = 2;
uint32 buildingId = 3;
uint32 groupId = 4;
string deviceAliasName = 5;
string buildingName = 6;
string productType = 7;
int32 utcCode = 8;
int64 updateTime = 9;
int64 expireTime = 10;
uint32 totalUsers = 11;
uint32 activeUsers = 12;
uint32 usersOf2G = 13;
uint32 usersOf5G = 14;
uint32 usersOf6G = 15;
uint32 usersOfBadRssi = 16;
uint32 usersOfNormalRssi = 17;
uint32 usersOfGoodRssi = 18;
int32 withEapScoreUsers = 19;
repeated CurrentUserInfo userList = 20;
}
message CurrentUserInfo {
int32 userId = 1;
string mac = 2;
string userIp = 3;
int64 onlineTime = 4;
int64 updateTime = 5;
string ssid = 6;
int32 rssi = 7;
float uplinkRate = 8;
float downlinkRate = 9;
float updownlinkRate = 10;
int64 upRate = 11;
int64 downRate = 12;
int64 upDownRate = 13;
int64 wifiUp = 14;
int64 wifiDown = 15;
int64 wifiUpDown = 16;
int32 timeDelay = 17;
int32 pktLoseRate = 18;
int32 radioIndex = 19;
string band = 20;
string channel = 21;
int32 floorNoise = 22;
int32 utilization = 23;
int64 activeTime = 24;
int32 score = 25;
string scoreReason = 26;
int32 maxRate = 27;
string name = 28;
}
"""
consumer.group = "seatunnel-test"
bootstrap.servers = "192.168.105.102:9092"
kafka.config = {
max.poll.records = 500
auto.offset.reset = "latest"
enable.auto.commit = "false"
}
result_table_name = "kafka_table"
}
}
transform {
Sql {
source_table_name = "kafka_table"
result_table_name = "kafka_table2"
query = "select CurrentUserInfo.userId from kafka_table"
}
}
sink {
Console {
source_table_name = "kafka_table2"
}
}
```
### Running Command
```shell
I run the program
```
### Error Exception
```log

```
### Zeta or Flink or Spark Version
_No response_
### Java or Scala Version
java8
### Screenshots
_No response_
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
--
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: commits-unsubscribe@seatunnel.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] [Connector-v2] Parsing array data failed when using kafka protobuf format [seatunnel]
Posted by "KangTomwk (via GitHub)" <gi...@apache.org>.
KangTomwk commented on issue #7585:
URL: https://github.com/apache/seatunnel/issues/7585#issuecomment-2428664975
At present, this version does not support nested types and requires modifying the converter method of the ProtobufToRowConverter class
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] [Connector-v2] Parsing array data failed when using kafka protobuf format [seatunnel]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #7585: [Bug] [Connector-v2] Parsing array data failed when using kafka protobuf format
URL: https://github.com/apache/seatunnel/issues/7585
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] [Connector-v2] Parsing array data failed when using kafka protobuf format [seatunnel]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #7585:
URL: https://github.com/apache/seatunnel/issues/7585#issuecomment-2513273140
This issue has been closed because it has not received response for too long time. You could reopen it if you encountered similar problems in the future.
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] [Connector-v2] Parsing array data failed when using kafka protobuf format [seatunnel]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #7585:
URL: https://github.com/apache/seatunnel/issues/7585#issuecomment-2499311601
This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] [Connector-v2] Parsing array data failed when using kafka protobuf format [seatunnel]
Posted by "zhangshenghang (via GitHub)" <gi...@apache.org>.
zhangshenghang commented on issue #7585:
URL: https://github.com/apache/seatunnel/issues/7585#issuecomment-2334295578
Reference documents or examples of e2e
- https://github.com/apache/seatunnel/blob/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-kafka-e2e/src/test/resources/protobuf/kafka_protobuf_to_assert.conf
- https://github.com/apache/seatunnel/blob/dev/docs/zh/connector-v2/source/Kafka.md#protobuf%E9%85%8D%E7%BD%AE
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org