Giter Club home page Giter Club logo

sqlstreamingtonosql's Introduction

From SQL to NoSQL streaming

Stream to standard Couchbase server

Prerequisite: Run sh cleanup.sh to clean up previous containers

Steps:

  1. To start Confluent Platform, Couchbase server and SQL Server inside the same network run: docker compose up -d. This will start SQL server with pre populated tables and Couchbase server with all the scopes and collection already created. If you want to connect to SQL server instance use this credentials: SA/Password!
  2. Create the SQL Server Source and Sink Connectors:
  1. Access to Control Center on localhost:9021 and verify that the connectors are OK
  2. Create proper KSQLDB streams to transform the data and load them in Couchbase (see file ksqldb). To do this simply run:
  • source deployksql.sh
  • deploy_ksql ksqldb.sql
  1. Verify that all data have been streamed and inserted in target Couchbase collections :)

Stream to Couchbase Capella

Set up your Couchbase cluster on Capella

  1. Select Cloud Provider, region and CIDR config
  2. Select a 3 data/query/index nodes 4vCPU,16GB RAM, 50GB Disk
  3. Choose basic plan with one AZ
  4. Create cluster
  5. Create a bucket named "raw" without backup policies
  6. Create a scope named "store"
  7. Create 4 collections named "products", "customers", "orders", "order_items"
  8. Create a user named "application", choose a password, and give read/write access to the "store" scope
  9. Configure your IP in the allowed IPs
  10. Copy the root certificate into a capella.pem file
  11. To start Confluent Platform and SQL Server inside the same network run: docker compose up -d.
  12. Copy capella.pem file into kafka connect container : docker cp capella.pem connect:/home/appuser
  13. Edit CouchbaseTLSSinkConnector.json and provide :
  • "couchbase.seed.nodes": "paste url from capella cluster connect",
  • "couchbase.username": "application"
  • "couchbase.password": "paste application user password"
  1. Create the SQL Server Source and Sink Connectors:
  1. Access to Control Center on localhost:9021 and verify that the connectors are OK
  2. Create proper KSQLDB streams to transform the data and load them in Couchbase (see file ksqldb). To do this simply run:
  • source deployksql.sh
  • deploy_ksql ksqldb.sql
  1. Verify that all data have been streamed and inserted in target Couchbase collections :)

sqlstreamingtonosql's People

Contributors

belio avatar raphael-chir avatar daquintas avatar wd40-flex avatar

Stargazers

LinuxNomad avatar Davide Pellegatta avatar

Watchers

James Cloos avatar  avatar  avatar  avatar

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.