All Projects → tmc → Pqstream

tmc / Pqstream

Licence: mit
pqstream turns your postgres database into an event stream

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Pqstream

upper
Upper is a open source back-end framework based on the Dart language.
Stars: ✭ 39 (-91.22%)
Mutual labels:  postgres, grpc
go-grpc-pg
Simple service exposing a gRPC interface, with a connection to PostgreSQL on the backend
Stars: ✭ 33 (-92.57%)
Mutual labels:  postgres, grpc
Doctor
Doctor is a documentation server for your docs in github
Stars: ✭ 391 (-11.94%)
Mutual labels:  postgres
Awesome Grpc
A curated list of useful resources for gRPC
Stars: ✭ 4,932 (+1010.81%)
Mutual labels:  grpc
With advisory lock
Advisory locking for ActiveRecord
Stars: ✭ 409 (-7.88%)
Mutual labels:  postgres
Grpc Websocket Proxy
A proxy to transparently upgrade grpc-gateway streaming endpoints to use websockets
Stars: ✭ 395 (-11.04%)
Mutual labels:  grpc
Posthog
🦔 PostHog provides open-source product analytics that you can self-host.
Stars: ✭ 5,488 (+1136.04%)
Mutual labels:  postgres
Deno Nessie
A modular Deno library for PostgreSQL, MySQL, MariaDB and SQLite migrations
Stars: ✭ 381 (-14.19%)
Mutual labels:  postgres
Nrpc
nRPC is like gRPC, but over NATS
Stars: ✭ 440 (-0.9%)
Mutual labels:  grpc
Viper
Viper 是一个基于Anno微服务引擎开发的Dashboard项目、示例项目。Anno 底层通讯采用 grpc、thrift。自带服务发现、调用链追踪、Cron 调度、限流、事件总线等等
Stars: ✭ 402 (-9.46%)
Mutual labels:  grpc
Gnorm
A database-first code generator for any language
Stars: ✭ 415 (-6.53%)
Mutual labels:  postgres
Faasm
High-performance stateful serverless runtime based on WebAssembly
Stars: ✭ 403 (-9.23%)
Mutual labels:  grpc
Gnomock
Test your code without writing mocks with ephemeral Docker containers 📦 Setup popular services with just a couple lines of code ⏱️ No bash, no yaml, only code 💻
Stars: ✭ 398 (-10.36%)
Mutual labels:  postgres
Javaspringbootsamples
SpringBoot、Dubbo、SpringCloud的各种集成例子:Atomikos、gRPC、Thrift、Seata、ShardingSphere、Dubbo、Hmily、Nacos、Consul、Ribbon、Jedis、Lettuce、Redisson等框架
Stars: ✭ 399 (-10.14%)
Mutual labels:  grpc
Sqlboiler
Generate a Go ORM tailored to your database schema.
Stars: ✭ 4,497 (+912.84%)
Mutual labels:  postgres
Spring boot
Spring Boot 使用总结 和 demo。 如果您觉得本代码对您有所帮助,请点击页面右上方"Star"
Stars: ✭ 431 (-2.93%)
Mutual labels:  grpc
Php Grpc
🔌 Fast and furious GRPC server for PHP applications
Stars: ✭ 387 (-12.84%)
Mutual labels:  grpc
Go Microservice Helpers
A collection of handy snippets that simplify creation of GRPC servers and clients
Stars: ✭ 400 (-9.91%)
Mutual labels:  grpc
Gruf
gRPC Ruby Framework
Stars: ✭ 411 (-7.43%)
Mutual labels:  grpc
Airframe
Essential Building Blocks for Scala
Stars: ✭ 442 (-0.45%)
Mutual labels:  grpc

pqstream

pqstream is a program that streams changes out of a postgres database with the intent of populating other systems and enabling stream processing of data sets.

ci status go report card coverage

installation

$ go get -u github.com/tmc/pqstream/cmd/{pqs,pqsd}

basic usage

create an example database:

$ createdb dbname
# echo "create table notes (id serial, created_at timestamp, note text)" | psql dbname

connect the agent:

$ pqsd -connect postgresql://user:[email protected]/dbname

connect the cli:

$ pqs

at this point you will see streams of database operations rendered to stdout:

(in a psql shell):

dbname=# insert into notes values (default, default, 'here is a sample note');
INSERT 0 1
dbname=# insert into notes values (default, default, 'here is a sample note');
INSERT 0 1
dbname=# update notes set note = 'here is an updated note' where id=1;
UPDATE 1
dbname=# delete from notes where id = 1;
DELETE 1
dbname=#

our client should now show our operations:

$ pqs
{"schema":"public","table":"notes","op":"INSERT","id":"1","payload":{"created_at":null,"id":1,"note":"here is a sample note"}}
{"schema":"public","table":"notes","op":"INSERT","id":"2","payload":{"created_at":null,"id":2,"note":"here is a sample note"}}
{"schema":"public","table":"notes","op":"UPDATE","id":"1","payload":{"created_at":null,"id":1,"note":"here is an updated note"},"changes":{"note":"here is a sample note"}}
{"schema":"public","table":"notes","op":"DELETE","id":"1","payload":{"created_at":null,"id":1,"note":"here is an updated note"}}

field redaction

If there's a need to prevent sensitive fields (i.e. PII) from being exported the redactions flag can be used with pqsd:

$ pqsd -connect postgresql://user:[email protected]/dbname -redactions='{"public":{"users":["first_name","last_name","email"]}}'

The redactions is encoded in JSON and conforms to the following layout:

'{"schema":{"table":["field1","field2"]}}'`
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].