Hasura GRAPHQL Integrated Pipelinedb test

Source: Internet
Author: User

In fact, because Pipelinedb is a native support PG, there should be no big problem, the following is the test

Run with Doker-compose

Configuration
    • Docker-compose file
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:[email protected]:5432/pipeline serve --enable-console;      "volumes:  db_data:
    • Description
      Mainly for the addition of pipelinedb and the configuration of the Graphql-engine connection PG
Start && Run
    • Start
docker-compose up -d
    • Effect
Add Pipelinedb Data

Stream operation

    • Create stream
CREATE STREAM stream_test1 (x integer, y integer,z text);
    • Create 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;
    • Inserting data
INSERT INTO stream_test1(x,y,z) VALUES(1,2,‘A‘),(3,4,‘B‘),(5,6,‘C‘),(7,8,‘D‘),(1,2,‘A‘);
    • Inquire
select * from v_sum;select * from v_group;
Add GRAPHQL Table
    • View the tables created by the Pipelinedb system
    • Add GRAPHQL Support
    • Data query
Description

It is very convenient to use the combination, that is, the simple Hasura engine, while integrating the Pipelinedb stream features, very good and powerful

Resources

Https://github.com/hasura/graphql-engine
Http://docs.pipelinedb.com/installation.html

Hasura GRAPHQL Integrated Pipelinedb test

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.