Giter Site home page Giter Site logo

mtpatter / postgres-kafka-demo Goto Github PK

View Code? Open in Web Editor NEW
142.0 7.0 61.0 723 KB

Fully reproducible, Dockerized, step-by-step, demo on how to stream tables from Postgres to Kafka/KSQL back to Postgres. Detailed blog post published on Medium.

Home Page: https://medium.com/high-alpha/data-stream-processing-for-newbies-with-kafka-ksql-and-postgres-c30309cfaaf8?sk=3da652f7ab08ef3a138241569857e110

Dockerfile 100.00%
kafka kafka-connect ksql ksql-server postgresql debezium streaming

postgres-kafka-demo's Issues

The RESEARCH_AVE_BOOST ksql does not return any results

I went through the entire example, until the end. I cross checked the creation of the table and data all through.

The only modification I had to do was the creation as below.

CREATE TABLE research_ave_boost WITH (KAFKA_TOPIC='research_ave_boost', VALUE_FORMAT='delimited') AS SELECT research, SUM(admit_chance)/COUNT(admit_chance) as ave_chance FROM research_boost GROUP BY research;

However this query in ksql does not return any results.

`SELECT "AVE_CHANCE" FROM "RESEARCH_AVE_BOOST"

WHERE cast("RESEARCH" as INT)=0;`

CREATE research_ave_boost not work

Hi,
Below syntax works (WITH statement)?
CREATE TABLE research_ave_boost AS
SELECT research, SUM(admit_chance)/COUNT(admit_chance) as ave_chance
FROM research_boost
WITH (KAFKA_TOPIC='research_ave_boost', VALUE_FORMAT='delimited', KEY='research')
GROUP BY research;
Thanks
Brad

Adding the sink connector to ksql table leads

All other CURL posts work. But this one does not.

curl -X POST -H "Accept:application/json" -H "Content-Type: application/json" \ --data @postgres-sink.json http://localhost:8083/connectors curl: (7) Failed to connect to localhost port 8083: Connection refused

Creating the Downstream table research_ave_boost did not work when using WITH

Thanks for an awesome tutorial. I am running into the following, when executing the creation of the Downstream table. Please see below.

Statement:CREATE TABLE research_ave_boost AS SELECT research, SUM(admit_chance)/COUNT(admit_chance) as ave_chance FROM research_boost WITH (KAFKA_TOPIC='research_ave_boost', VALUE_FORMAT='delimited', KEY='research') GROUP BY research; Caused by: line 1:140: mismatched input 'WITH' expecting ';' Caused by: org.antlr.v4.runtime.InputMismatchException

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.