question

Davip avatar image
Davip asked ddieruf answered

How can I create a Pulsar schema with the Javascript client?

How can I create a schema on Javascript pulsar client? When sinking, I can’t map the messages to my Astra table and I think it’s because of the absence of schema. Though on pulsar docs, I saw that the Javascript client doesn’t support schema. What’s the best way to go about this?

astra streaming
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

ddieruf avatar image
ddieruf answered

Hi Davip, if you are having a problem pushing data to AstraDB using the Cassandra sink, you don't need a schema. You can write the data as key/value json.

key: {"name":"foo"}
value: {"salary":10000}

then you can map as

name=key.name,salary=value.salary

Please note, you'll need to use the 'StringCassandraSinkTask' version.

Share
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.