Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-10487

fix invalid Flink SQL example

    XMLWordPrintableJSON

Details

    Description

      On https://ci.apache.org/projects/flink/flink-docs-master/dev/table/sql.html , the example is :

      StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
      StreamTableEnvironment tableEnv = TableEnvironment.getTableEnvironment(env);
      
      // ingest a DataStream from an external source
      DataStream<Tuple3<Long, String, Integer>> ds = env.addSource(...);
      
      // SQL query with an inlined (unregistered) table
      Table table = tableEnv.toTable(ds, "user, product, amount");
      Table result = tableEnv.sqlQuery(
        "SELECT SUM(amount) FROM " + table + " WHERE product LIKE '%Rubber%'");
      ...
      

      But there's no API of toTable() in StreamTableEnvironment

      cc fhueske

      Attachments

        Issue Links

          Activity

            People

              phoenixjiangnan Bowen Li
              phoenixjiangnan Bowen Li
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: