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

ASF GitHub Bot commented on STORM-1366:
---------------------------------------

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

    https://github.com/apache/storm/pull/931#discussion_r47147232
  
    --- Diff: documentation/storm-sql.md ---
    @@ -0,0 +1,87 @@
    +---
    +title: Storm SQL integration
    +layout: documentation
    +documentation: true
    +---
    +
    +The Storm SQL integration allows users to run SQL queries over streaming 
data in Storm. Not only the SQL interface allows faster development cycles on 
streaming analytics, but also opens up the opportunities to unify batch data 
processing like [Apache Hive](///hive.apache.org) and real-time streaming data 
analytics.
    +
    +At a very high level StormSQL compiles the SQL queries to 
[Trident](Trident-API-Overview.html) topologies and executes them in Storm 
clusters. This document provides information of how to use StormSQL as end 
users. For people that are interested in more details in the design and the 
implementation of StormSQL please refer to the [this](storm-sql-internal.html) 
page.
    +
    +## Usage
    +
    +Run the ``storm sql`` command to compile SQL statements into Trident 
topology, and submit it to the Storm cluster
    +
    +```
    +$ bin/storm sql <sql-file> <topo-name>
    +```
    +
    +In which `sql-file` contains a list of SQL statements to be executed, and 
`topo-name` is the name of the topology.
    +
    +
    +## Supported Features
    +
    +The following features are supported in the current repository:
    +
    +* Streaming from and to external data sources
    +* Filtering tuples
    +* Projections
    +
    +## Specifying External Data Sources
    +
    +In StormSQL data is represented by external tables. Users can specify data 
sources using the `CREATE EXTERNAL TABLE` statement. For example, the following 
statement specifies a Kafka spouts and sink:
    +
    +```
    +CREATE EXTERNAL TABLE FOO (ID INT PRIMARY KEY) LOCATION 
'kafka://localhost:2181/brokers?topic=test' TBLPROPERTIES 
'{"producer":{"bootstrap.servers":"localhost:9092","acks":"1","key.serializer":"storm.kafka.IntSerializer","value.serializer":"storm.kafka.ByteBufferSerializer"}}'
    +```
    +
    +The syntax of `CREATE EXTERNAL TABLE` closely follows the one defined in 
[Hive Data Definition 
Language](https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL).
    --- End diff --
    
    We may want to actually document the Storm syntax here in case it diverges 
or differs from the Hive syntax.


> Add documentation for StormSQL into the website
> -----------------------------------------------
>
>                 Key: STORM-1366
>                 URL: https://issues.apache.org/jira/browse/STORM-1366
>             Project: Apache Storm
>          Issue Type: Documentation
>          Components: documentation, storm-sql
>            Reporter: Haohui Mai
>            Assignee: Haohui Mai
>
> This jira proposes to add documentation of StormSQL into the Apache Storm 
> website.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to