hasura graphql 集成pipelinedb测试
实际上因为pipelinedb 是原生支持pg的,所以应该不存在太大的问题,以下为测试
使用doker-compose 运行
配置
- docker-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:
- 说明
主要是进行pipelinedb 的添加以及graphql-engine 的连接pg的配置
启动&&运行
- 启动
docker-compose up -d
- 效果
添加pipelinedb 数据
stream 操作
- 创建stream
CREATE STREAM stream_test1 (x integer, y integer,z text);
- 创建 CONTINUOUS
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;
添加graphql table
- 查看pipelinedb 系统创建的表
- 添加 graphql 支持
- 数据查询
说明
结合起来使用还是很方便的,即有hasura引擎的简单,同时集成了pipelinedb的stream 特性,很好很强大
参考资料
https://github.com/hasura/graphql-engine
http://docs.pipelinedb.com/installation.html
hasura graphql 集成pipelinedb测试的更多相关文章
- prisma 集成 pipelinedb测试
pipelinedb 是一个基于pg数据库开发的stream sql 数据库,和prisma 集成起来可以开发很 方便的stream 应用 使用docker 安装 项目初始化 prisma init ...
- hasura graphql server 集成gatsby
hasura graphql server 社区基于gatsby-source-graphql 开发了gatsby-postgres-graphql 插件, 可以快速的开发丰富的网站 基本使用 安装h ...
- hasura graphql server event trigger 试用
hasura graphql server 是一个很不错的graphql 引擎,当前版本已经支持event triiger 了 使用此功能我们可以方便的集成webhook功能,实现灵活,稳定,快捷的消 ...
- 通过torodb && hasura graphql 让mongodb 快速支持graphql api
torodb 可以方便的将mongo 数据实时同步到pg,hasura graphql 可以方便的将pg 数据暴露为graphql api,集成在一起真的很方便 环境准备 docker-compose ...
- hasura graphql subscriptions 使用
subscriptions graphql 的一项实时数据推送的功能,还是很方便的,自己在直接使用subscriptions-transport-ws npm 包 的时候运行一直有错误(主要是依赖 ...
- hasura graphql-engine集成pgbouncer 连接池工具
pgbouncer 是一个轻量的pg 连接池工具,我们可以和hasura graphql-engine集成起来,进行连接的一些优化 环境准备 docker-compose 文件 version: '3 ...
- Hasura GraphQL schema 生成是如何工作的
不像大部分的graphql 引擎,使用标准的graphql 规范的处理模型,Hasura graphql 不存在resolver 的概念(实际上是有的,只是转换为了sql语法) 以下是Hasura g ...
- hasura graphql auth-webhook api 说明
hasura graphql 生产的使用是推荐使用webhook 进行角色访问控制的,官方同时提供了一个nodejs 的简单demo 代码 git clone https://github.com/h ...
- hasura graphql pg 自定义函数的使用
hasura graphql 的安装可以参考相关项目 创建函数 数据表创建 CREATE TABLE sql_function_table ( id SERIAL PRIMARY KEY, inp ...
随机推荐
- Confluence 6 使用 LDAP 授权连接一个内部目录 - 服务器设置
名字(Name) 名字的描述将会帮助你在目录中识别.例如: Internal directory with LDAP Authentication Corporate LDAP for Authent ...
- bzoj 1267 Kth Number I (点分治,堆)
超级钢琴的树上版本, 类似做法即可, 只不过区间转为dfs序了, 用点分求一下, 复杂度$O(nlog^2n)$ #include <iostream> #include <algo ...
- mysql timestamp的默认值
当default 0,default '0000-00-00 00:00:00'都失效的时候,请尝试下 ALTER table `coupon_gift` add column `time_end` ...
- Spring web flow的意义
为什么要使用Spring web flow呢? 这里需要强调的一点就是,但凡一个技术的出现和流行,必有其适用的环境和存在的意义. Spring web flow加强了中央集权,这个该怎么理解呢?以往我 ...
- CF-499div2-E-裴蜀定理
E. Border time limit per test 1 second memory limit per test 256 megabytes input standard input outp ...
- pycharm破解方法
1.下载破解文件到目录 E:/Program Files/JetBrains/PyCharm 2017.1.3安装目录下 链接:http://idea.lanyus.com/jar/Jetbrains ...
- Zookeeper架构、ZAB协议、选举
转载:深入浅出Zookeeper(一) Zookeeper架构及FastLeaderElection机制 (nice) ZooKeeper学习第六期---ZooKeeper机制架构 一.Zookee ...
- html页面展示Json样式
一般有些做后台数据查询,要把后台返回json数据展示到页面上,如果需要展示样式更清晰.直观.一目了然,就要用到html+css+js实现这个小功能 一.css代码 pre {outline: 1px ...
- 软工作业No.6 甜美女孩第四周
各成员在Alpha阶段认领的任务 成员 Alpha阶段认领的任务 整个项目预期的任务量 曾祎祺 安排每日任务,每晚总结 16% 邓画月 基础2048+自定义 16% 梁佩诗 负责界面 16% 何颖琪 ...
- 【DevExpress v17.2新功能预告】DevExtreme ASP.NET MVC新的强类型HTML Helpers
在ASP.NET MVC中构建视图时,强类型HTML helpers非常有用.像@Html.TextBoxFor(m => m.FirstName)这样内置的Helper方法已经存在很长时间了, ...