[
https://issues.apache.org/jira/browse/BEAM-2288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16009810#comment-16009810
]
ASF GitHub Bot commented on BEAM-2288:
--------------------------------------
GitHub user XuMingmin opened a pull request:
https://github.com/apache/beam/pull/3137
[BEAM-2288] Refine DSL interface
Refine DSL interface as design doc of BEAM-2010:
1. rename BeamSqlRunner to BeamSQLEnvironment;
2. Move pipeline as external parameter, to integrate with none-DSL
components;
Be sure to do all of the following to help us incorporate your contribution
quickly and easily:
- [ ] Make sure the PR title is formatted like:
`[BEAM-<Jira issue #>] Description of pull request`
- [ ] Make sure tests pass via `mvn clean verify`.
- [ ] Replace `<Jira issue #>` in the title with the actual Jira issue
number, if there is one.
- [ ] If this contribution is large, please file an Apache
[Individual Contributor License
Agreement](https://www.apache.org/licenses/icla.pdf).
---
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/XuMingmin/beam BEAM-2288
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/beam/pull/3137.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #3137
----
commit 4d7f78679008edd04da2006cdaba3336de799a43
Author: mingmxu <[email protected]>
Date: 2017-05-14T18:02:37Z
Refine DSL interface as design doc of BEAM-2010:
1. rename BeamSqlRunner to BeamSQLEnvironment;
2. Move pipeline as external parameter, to integrate with none-DSL
components;
----
> Refine DSL interface
> --------------------
>
> Key: BEAM-2288
> URL: https://issues.apache.org/jira/browse/BEAM-2288
> Project: Beam
> Issue Type: Improvement
> Components: dsl-sql
> Reporter: Xu Mingmin
> Assignee: Xu Mingmin
>
> As part of BEAM-2010, it update the interface to explain SQL query, to link
> with Pipeline, so below part is supported:
> {code}
> //prepare environment of BeamSQL
> BeamSQLEnvironment sqlEnv = BeamSQLEnvironment.create();
> //register table metadata
> sqlEnv.addTableMetadata(String tableName, BeamSqlTable tableMetadata);
> //register UDF
> sqlEnv.registerUDF(String functionName, Method udfMethod);
> //explain a SQL statement, SELECT only, and return as a PCollection;
> PCollection<BeamSQLRow> phase1Stream = sqlEnv.explainSQL(pipeline, String
> sqlStatement);
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)