Git Product home page Git Product logo

ruleengine's Introduction

RuleEngine

tagging system based on Apache Flink

编译打包

  • 推荐使用maven 3.2.5版本
  • mvn clean install

unit test

目前unit test running 依赖于本地的postgres server. 所以在跑之前在本地安装postgres,可以通过 docker的方式安装

docker pull postgres:9.4
docker run --name postgres -e POSTGRES_PASSWORD=123456 -p 25432:5432 -d postgres:9.4

Postgres Connector

  • table source ddl
CREATE TABLE csv_adfeature (
  aid VARCHAR NOT NULL,
  advertiser_id VARCHAR NOT NULL,
  campaign_id VARCHAR NOT NULL,
  creative_id VARCHAR NOT NULL,
  creative_size VARCHAR NOT NULL,
  category_id VARCHAR NOT NULL,
  product_id VARCHAR NOT NULL,
  product_type VARCHAR NOT NULL,
  PRIMARY KEY(aid)
) WITH (
  type = 'postgres',
  connector.version = '9.4',
  username = 'postgres',
  password = '123456',
  tablename = 'adFeature',
  dburl = 'jdbc:postgresql://localhost:5432/postgres'
);
  • Temporal Table Join
// create probe side table
create table train (
  aid VARCHAR NOT NULL,
  uid VARCHAR NOT NULL,
  label VARCHAR NOT NULL
) with (
  type = 'csv',
  firstLineAsHeader='true',
  path = 'file:///bigdata/datasets/train10.csv'
);


// temporal table join
SELECT
p.aid, p.uid, b.advertiser_id
FROM train AS p
INNER JOIN
adfeature FOR SYSTEM_TIME AS OF PROCTIME() AS b
ON p.aid = b.aid;

ruleengine's People

Contributors

hongtao12310 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.