Git Product home page Git Product logo

Comments (4)

dlg99 avatar dlg99 commented on August 15, 2024 1

Here is a short getting started guide: https://medium.com/building-the-open-data-stack/datastax-presents-snowflake-sink-connector-for-apache-pulsar-53629b196064
It is a bit late to help you but it I hope it will help someone else

from snowflake-connector.

dlg99 avatar dlg99 commented on August 15, 2024

Thank you!
The connector needs Apache Pulsar 2.9+ or Datastax Luna Streaming 2.8 (relevant changes cherry-picked there).

I'll work on a better documentation; if you have a fix for apache/pulsar#12880 I'll be happy to review the PR (or I'll get to fixing it a little bit later).

regarding the schema, I used the following CLI commands:

Set retention for the namespace:

$ bin/pulsar-admin namespaces set-retention public/default -t -1 -s 100M

Set topic schema:

$ cat ~/schema_sf_js.json
{
    "type": "JSON",
    "schema": "{\"type\":\"record\",\"name\":\"SnowflakeTestSchema\",\"namespace\":\"com.foo\",\"fields\":[{\"name\":\"col1\",\"type\":[\"null\",\"string\"]},{\"name\":\"col2\",\"type\":[\"null\",\"string\"]}]}",
    "properties": {}
}

$ bin/pulsar-admin schemas upload --filename ~/schema_sf_js.json snowflake-test

and to send the messages:

$ cat ~/a.json
{"col1": "val1", "col2": "val2"}


$ bin/pulsar-client produce snowflake-test -f ~/a.json -n 200 -vs json:"{\"type\":\"record\",\"name\":\"SnowflakeTestSchema\",\"namespace\":\"com.foo\",\"fields\":[{\"name\":\"col1\",\"type\":[\"null\",\"string\"]},{\"name\":\"col2\",\"type\":[\"null\",\"string\"]}]}"

from snowflake-connector.

kaja78 avatar kaja78 commented on August 15, 2024

@dig99 Thanks, I was not aware about the -vs option in pulsar client...

I created the PR: apache/pulsar#12893

from snowflake-connector.

dlg99 avatar dlg99 commented on August 15, 2024

Added link to the blog post into the readme.

from snowflake-connector.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.