Repository: incubator-beam Updated Branches: refs/heads/python-sdk 4414e20a6 -> 9ded359da
Add snippet for standard sql Project: http://git-wip-us.apache.org/repos/asf/incubator-beam/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-beam/commit/dc68365f Tree: http://git-wip-us.apache.org/repos/asf/incubator-beam/tree/dc68365f Diff: http://git-wip-us.apache.org/repos/asf/incubator-beam/diff/dc68365f Branch: refs/heads/python-sdk Commit: dc68365f01b4e33ac459abbe2c6fd5567f7b5bc7 Parents: 4414e20 Author: Sourabh Bajaj <sourabhba...@google.com> Authored: Wed Nov 30 14:59:15 2016 -0800 Committer: Robert Bradshaw <rober...@gmail.com> Committed: Thu Dec 1 09:40:31 2016 -0800 ---------------------------------------------------------------------- sdks/python/apache_beam/examples/snippets/snippets.py | 9 +++++++++ 1 file changed, 9 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/dc68365f/sdks/python/apache_beam/examples/snippets/snippets.py ---------------------------------------------------------------------- diff --git a/sdks/python/apache_beam/examples/snippets/snippets.py b/sdks/python/apache_beam/examples/snippets/snippets.py index 891f464..8d05130 100644 --- a/sdks/python/apache_beam/examples/snippets/snippets.py +++ b/sdks/python/apache_beam/examples/snippets/snippets.py @@ -915,6 +915,15 @@ def model_bigqueryio(): query='SELECT year, mean_temp FROM samples.weather_stations')) # [END model_bigqueryio_query] + # [START model_bigqueryio_query_standard_sql] + p = beam.Pipeline(options=PipelineOptions()) + weather_data = p | beam.io.Read( + 'ReadYearAndTemp', + beam.io.BigQuerySource( + query='SELECT year, mean_temp FROM `samples.weather_stations`', + use_legacy_sql=False)) + # [END model_bigqueryio_query_standard_sql] + # [START model_bigqueryio_schema] schema = 'source:STRING, quote:STRING' # [END model_bigqueryio_schema]