Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

json type routine load job failed #54223

Open
TCGOGOGO opened this issue Dec 23, 2024 · 0 comments
Open

json type routine load job failed #54223

TCGOGOGO opened this issue Dec 23, 2024 · 0 comments
Labels
type/bug Something isn't working

Comments

@TCGOGOGO
Copy link

TCGOGOGO commented Dec 23, 2024

Steps to reproduce the behavior (Required)

just follow the example shown in official website
https://docs.starrocks.io/zh/docs/3.2/loading/RoutineLoad

Expected behavior (Required)

successfully data insert

Real behavior (Required)

Error message:

previous task aborted because of illegal json started with H

I also checked related code,

return Status::DataQualityError(fmt::format("illegal json started with {}", c));

Warning log only shows invalid starting character, which in fact helpless for debugging. Hope more information of payload can be provided in exception situation
btw, below is the way I produce kafka message, json type message is ok checked by corresponding consumer

from kafka import KafkaProducer
from kafka.errors import KafkaError
from orjson import orjson

producer = KafkaProducer(bootstrap_servers=['xxxx'],
                         key_serializer=lambda m: bytes(m, encoding="utf-8") if m else None,
                         value_serializer=lambda m: orjson.dumps(m, option=orjson.OPT_NON_STR_KEYS))

try:
    data = {"commodity_id": "1", "customer_name": "Mark Twain", "country": "US","pay_time": 1589191487,"price": 875}
    producer.send('simon', data)
    producer.flush()
except KafkaError as e:
    print(e)

StarRocks version (Required)

3.2.8-759cc78

@TCGOGOGO TCGOGOGO added the type/bug Something isn't working label Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant