Coder Social home page Coder Social logo

rocketmq-streams-sql's Introduction

Rocketmq Streams SQL

Rocketmq Streams SQL 为 Rocketmq Streams 的开发提供了基于SQL的开发体验, 让基于消息队列的流式开发更加容易;

Features

  • 采用标准的流式SQL规范,可以与其他的流计算框架如Flink完美兼容;
  • 兼容Flink自带的udfudafudtf,除此之外,用户还可以通过实现相关接口来轻松扩展函数;

TableStream Example

    import com.alibaba.rsqldb.clients.*;
    String sql="CREATE FUNCTION now as 'com.sql.Function';\n"
                           + "CREATE TABLE graph_vertex_proc (\n"
                           + "  `time` varchar,\n"
                           + "  `uuid` varchar,\n"
                           + "  aliuid varchar,\n"
                           + "  pid varchar,\n"
                           + "  file_path varchar,\n"
                           + "  cmdline varchar,\n"
                           + "  tty varchar,\n"
                           + "  cwd varchar,\n"
                           + "  perm varchar\n"
                           + ") WITH (\n"
                           + " type='metaq',\n"
                           + " topic='blink_dXXXXXXX',\n"
                           + " pullIntervalMs='100',\n"
                           + " consumerGroup='CID_BLINK_SOURCE_001',\n"
                           + " fieldDelimiter='#'\n"
                           + ");\n"
                           + "CREATE TABLE graph_proc_label_extend (\n"
                           + "  `time` varchar,\n"
                           + "  `uuid` varchar,\n"
                           + "  aliuid varchar,\n"
                           + "  pid varchar,\n"
                           + "  file_path varchar,\n"
                           + "  cmdline varchar,\n"
                           + "  tty varchar,\n"
                           + "  cwd varchar,\n"
                           + "  perm varchar\n"
                           + ") WITH (type = 'print');\n"
                           + "INSERT\n"
                           + "  INTO graph_proc_label_extend\n"
                           + "SELECT\n"
                           + "  `time`,\n"
                           + "  `uuid`,\n"
                           + "  aliuid,\n"
                           + "  pid,\n"
                           + "  file_path,\n"
                           + "  cmdline,\n"
                           + "  tty,\n"
                           + "  cwd,\n"
                           + "  perm\n"
                           + "FROM\n"
                           + "  graph_vertex_proc;";
     SQLStreamClient sqlStreamClient= new SQLStreamClient("test_namespace", "test_pipeline",sql);
     sqlStreamClient.start();
  

Maven Repository

<dependency>
    <groupId>com.alibaba</groupId>
    <artifactId>rsqldb-clients</artifactId>
    <version>1.0.0-SNAPSHOT</version>
</dependency>

rocketmq-streams-sql's People

Contributors

yuanxiaodong avatar

Watchers

嚎叫 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.