GithubHelp home page GithubHelp logo

alibaba / fast-modeling-language Goto Github PK

View Code? Open in Web Editor NEW
34.0 3.0 9.0 5.38 MB

阿里云计算平台DataWorks(https://help.aliyun.com/document_detail/276018.html) 团队出品,快速建模语言

License: Apache License 2.0

Java 79.67% Shell 0.04% ANTLR 19.26% TypeScript 0.94% HTML 0.04% JavaScript 0.04% FreeMarker 0.02%
aliyun java fml fastmodel dataworks

fast-modeling-language's Introduction

语言: 中文 | English

Fast Modeling Language

FML(Fast Modeling Language) is a SQL-like language designed for Dimensional Modeling. It is an attempt for fast modeling follows the “Kimball Dimensional Modeling Techniques Theory” and the “Alibaba’s OneData Theory.“ FML inherits many features from the SQL. For example, the FML studied and consulted the standard DDL syntax when creating a model, and extensions upon it. While designing a model, you no longer have to care about the specific rules for different kinds of big data engines. The FML Transformer will convert your models into a SQL syntax, which can be read directly by a certain kind of engine.

Features

  • A SQL-like language specially designed dimensional modeling.
  • Supports syntax definition in the process of data warehouse establishment, such as: Data Warehouse Planning, Fields Standards, Code Tables, Data Indicators.
  • Build with Java, you can build models easily with the Syntax Nodes Construct API.
  • Transforms models into varies syntax with the Transform API for common engines, such as: Hive, Hologres, Mysql.
  • Supports JDBC Driver mode, interact with the model engine.

Relation Document(Continuously updating): https://alibaba.github.io/fast-modeling-language/

Parser Example

import com.aliyun.fastmodel.core.parser.FastModelParser;
import com.aliyun.fastmodel.core.parser.FastModelParserFactory;

public class HelloFML {
    //单例
    private static final FastModelParser FAST_MODEL_PARSER = FastModelParserFactory.getInstance().get();

    public static void main(String[] args) {
        String fml
            = "create dim table t_1 alias 'alias_name' (col bigint alias 'alias_name' comment 'col_comment') comment 'comment';";
        CreateDimTable createDimTable = FAST_MODEL_PARSER.parseStatement(fml);
        //do your work
    }
}

Transformer Example

import com.aliyun.fastmodel.core.tree.BaseStatement;
import com.aliyun.fastmodel.transform.api.Transformer;
import com.aliyun.fastmodel.transform.api.TransformerFactory;
import com.aliyun.fastmodel.transform.api.context.TransformContext;
import com.aliyun.fastmodel.transform.api.dialect.DialectMeta;

public class HelloFMLTransformer {
    public static void main(String[] args) {
        DialectMeta dialectMeta =
            Transformer < BaseStatement > statementTransformer = TransformerFactory.getInstance().get(dialectMeta);
        statementTransformer.transform(statement, context).getNode();
    }
}

Building FML from Source

Build environment and conditions for FML

  • Unix-like environment (we use Linux, Mac OS X, Cygwin, WSL)
  • Git
  • Maven (version 3.5.0+ recommended)
  • Java 8

Clone and build

git clone [email protected]:alibaba/fast-modeling-language.git
cd fast-modeling-language
mvn clean package -DskipTests # this will take up to 10 minutes

Develop FML

IntelliJ IDEA is recommended for the FML Java project. We provide IntelliJ IDEA to developers who would like to commit to the FML code base. Developer’s IDE need to support at least:

  • Java project development
  • Support Maven

IntelliJ IDEA IntelliJ IDEA Plugins

Documentation

FML文档可The introduction and guide of the FML can be found under the doc/ directory, the docs is managed with the Docsify, to learn more about it: docsify quickstart

fast-modeling-language's People

Contributors

alibaba-oss avatar willam2004 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

fast-modeling-language's Issues

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.