You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/05/04 13:33:13 UTC
[GitHub] [pulsar] cometa-haley opened a new issue, #15434: [Doc]
cometa-haley opened a new issue, #15434:
URL: https://github.com/apache/pulsar/issues/15434
### What issue do you find in Pulsar docs?
I am having a lot of issues while working with Functions and Connectors for the following reason:
If a create a producer using python like this:
```
class InfluxTestSchema(Record):
measurement = String()
tags = Map(String())
fields = Map(Integer())
client = pulsar.Client('pulsar://localhost:6650')
producer = client.create_producer('another-test-topic', schema=JsonSchema(InfluxTestSchema))
while True:
msg = InfluxTestSchema(
measurement='test_measurement',
tags={"name": f'mickey_mouse'},
fields={"age": random.randint(0, 100)}
)
producer.send(msg)
sleep(5)
```
I am then able to use the a connector for loading the data somewhere else. BUT if I try to use a function to preprocess the data in some way, Connectors (I have tried Postgres and Influx) don't seem to be able to deserialize the data correctly.
Currently I am trying to use a custom SerDe class for achieving the same effect as `JsonSchema(InfluxTestSchema)` in create_producer, but it doesn't seem to work.
I would like to know how can I achieve the same behavior or how can I tell my sink that I am using a custom SerDe class (since I cannot give the sink my python code).
Sorry if it is a dumb question, I am kind of a Pulsar n00b.
### What is your suggestion?
Maybe some documentation in the functions section would help. If I figure out how to accomplish the task, would be glad to help out documenting it =)
### Do you have any references?
Main source: https://pulsar.apache.org/docs/en/functions-develop/
### Would you like to fix this issue?
Yes <3!
### Note
- [X] I have researched my question.
--
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@pulsar.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] momo-jun commented on issue #15434: [Doc] JSON/AVRO SerDe for Functions and Connectors
Posted by GitBox <gi...@apache.org>.
momo-jun commented on issue #15434:
URL: https://github.com/apache/pulsar/issues/15434#issuecomment-1119198993
Hi @freeznet can you take a look at this issue? Shall we clarify more in the SerDe section? It's beyond my knowledge.
--
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@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] momo-jun closed issue #15434: [Doc] JSON/AVRO SerDe for Functions and Connectors
Posted by GitBox <gi...@apache.org>.
momo-jun closed issue #15434: [Doc] JSON/AVRO SerDe for Functions and Connectors
URL: https://github.com/apache/pulsar/issues/15434
--
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@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] momo-jun commented on issue #15434: [Doc] JSON/AVRO SerDe for Functions and Connectors
Posted by GitBox <gi...@apache.org>.
momo-jun commented on issue #15434:
URL: https://github.com/apache/pulsar/issues/15434#issuecomment-1247484303
Close the issue because of no plan for it yet, and a workaround has been provided instead.
--
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@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] Anonymitaet commented on issue #15434: [Doc] JSON/AVRO SerDe for Functions and Connectors
Posted by GitBox <gi...@apache.org>.
Anonymitaet commented on issue #15434:
URL: https://github.com/apache/pulsar/issues/15434#issuecomment-1118525825
FYI @momo-jun since u'r working on the function docs.
--
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@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] github-actions[bot] commented on issue #15434: [Doc] JSON/AVRO SerDe for Functions and Connectors
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #15434:
URL: https://github.com/apache/pulsar/issues/15434#issuecomment-1146724666
The issue had no activity for 30 days, mark with Stale label.
--
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@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] github-actions[bot] commented on issue #15434: [Doc] JSON/AVRO SerDe for Functions and Connectors
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #15434:
URL: https://github.com/apache/pulsar/issues/15434#issuecomment-1200607389
The issue had no activity for 30 days, mark with Stale label.
--
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@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] freeznet commented on issue #15434: [Doc] JSON/AVRO SerDe for Functions and Connectors
Posted by GitBox <gi...@apache.org>.
freeznet commented on issue #15434:
URL: https://github.com/apache/pulsar/issues/15434#issuecomment-1171895925
Hi @cometa-haley, currently the python functions do not support customize the schema, so all messages send from python functions are in BYTES schema, and this is why the other connectors cannot handle the messages correctly.
There is a hacky way to do:
- use a Java function with the SerDe to convert the messages from Python (BYTES) to Avro Schema messages as an intermediate step, then use the output of Java function to the connectors.
--
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@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org