Skip to content

tomasalmeida/ksqldb-query-examples

Repository files navigation

ksqldb-query-examples

Some sample queries with ksqlDB

How to run

Cluster

    docker-compose up -d

Ksqldb cli

    docker exec -it ksqldb-cli ksql http://ksqldb-server:8088

Rest API calls

Load file (ktable-store-latest-value-by-time.sql)

    curl -X "POST" "http://localhost:8088/query" \
        -H "Accept: application/vnd.ksql.v1+json" \
        -d $'{
    "ksql": "SELECT * FROM values_table where key=1;",
    "streamsProperties": {}
    }' | jq
    curl -X "POST" "http://localhost:8088/query" \
        -H "Accept: application/vnd.ksql.v1+json" \
        -d $'{
    "ksql": "SELECT * FROM values_table EMIT CHANGES;",
    "streamsProperties": {}
    }'

About

Some sample queries with ksqlDB

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages