flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-6746) Table API / SQL Docs: Common Page
Date Tue, 30 May 2017 12:08:05 GMT

    [ https://issues.apache.org/jira/browse/FLINK-6746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16029317#comment-16029317
] 

ASF GitHub Bot commented on FLINK-6746:
---------------------------------------

Github user sunjincheng121 commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4012#discussion_r119069339
  
    --- Diff: docs/dev/table/common.md ---
    @@ -68,28 +63,24 @@ env.execute("Your Query");
     
     <div data-lang="scala" markdown="1">
     {% highlight scala %}
    -val env = ExecutionEnvironment.getExecutionEnvironment
    +// For batch programs use ExecutionEnvironment instead of StreamExecutionEnvironment
    +val env = StreamExecutionEnvironment.getExecutionEnvironment
     
     // Create a TableEnvironment
     val tableEnv = TableEnvironment.getTableEnvironment(env)
     
     // Register a Table
    -tableEnv.registerTable("yourTable", ...)             // or
    -tableEnv.registerTableSource("yourTableSrc", ...)    // or
    -tableEnv.registerDataStream("yourTableStream", ...)  // or
    -tableEnv.registerDataSet("yourTableSet", ...)        // or
    -tableEnv.registerExternalCatalog("yourCatalog", ...)
    -
    -// Create a table from a Table API query
    -val tapiResult = tableEnv.scan("yourTableSrc").select(...)
    -// Or create a table from a SQL query
    -val sqlResult  = tableEnv.sql("SELECT ... FROM yourTableSrc ...")
    -
    -// Emit a Table
    -resultTable.writeToSink(...)     // or
    -resultTable.toAppendStream(...)  // or
    -resultTable.toRetractStream(...) // or
    -resultTable.toDataSet(...)
    +tableEnv.registerTable("table1", ...)           // or
    +tableEnv.registerTableSource("table2", ...)     // or
    +tableEnv.registerExternalCatalog("extCat", ...) 
    +
    +// Create a Table from a Table API query
    +val tapiResult = tableEnv.scan("table1").select(...)
    +// Create a Table from a SQL query
    +val sqlResult  = tableEnv.sql("SELECT ... FROM table2 ...")
    +
    +// Emit a Table to a TableSink
    +resultTable.writeToSink(...)
    --- End diff --
    
    Do we need unified naming `sqlResult` `tapiResult` -> `resultTable`?


> Table API / SQL Docs: Common Page
> ---------------------------------
>
>                 Key: FLINK-6746
>                 URL: https://issues.apache.org/jira/browse/FLINK-6746
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Documentation, Table API & SQL
>    Affects Versions: 1.3.0
>            Reporter: Fabian Hueske
>            Assignee: Fabian Hueske
>
> Update and refine ./docs/dev/table/common.md in feature branch https://github.com/apache/flink/tree/tableDocs



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message