标签:group by 创建 添加 ext -- 应该 vol ice 特性
实际上因为pipelinedb 是原生支持pg的,所以应该不存在太大的问题,以下为测试
使用doker-compose 运行
version: ‘3.6‘
services:
postgres:
image: tkanos/pipelinedb_kafka
ports:
- "5432:5432"
graphql-engine:
image: hasura/graphql-engine:v1.0.0-alpha06
ports:
- "8080:8080"
depends_on:
- "postgres"
environment:
- "POSTGRES_PASSWORD:pipeline"
command: >
/bin/sh -c "
graphql-engine --database-url postgres://pipeline:pipeline@postgres:5432/pipeline serve --enable-console;
"
volumes:
db_data:
docker-compose up -d
stream 操作
CREATE STREAM stream_test1 (x integer, y integer,z text);
CREATE CONTINUOUS VIEW v_sum as select sum( x + y ) FROM stream_test1;
CREATE CONTINUOUS VIEW V_GROUP AS SELECT count(*) as coun,x,y,z FROM stream_test1 GROUP BY x,y,z;
INSERT INTO stream_test1(x,y,z) VALUES(1,2,‘A‘),(3,4,‘B‘),(5,6,‘C‘),(7,8,‘D‘),(1,2,‘A‘);
select * from v_sum;
select * from v_group;
结合起来使用还是很方便的,即有hasura引擎的简单,同时集成了pipelinedb的stream 特性,很好很强大
https://github.com/hasura/graphql-engine
http://docs.pipelinedb.com/installation.html
标签:group by 创建 添加 ext -- 应该 vol ice 特性
原文地址:https://www.cnblogs.com/rongfengliang/p/9535967.html