[
https://issues.apache.org/jira/browse/BEAM-12024?focusedWorklogId=602303&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-602303
]
ASF GitHub Bot logged work on BEAM-12024:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 26/May/21 12:49
Start Date: 26/May/21 12:49
Worklog Time Spent: 10m
Work Description: pcoet commented on a change in pull request #14886:
URL: https://github.com/apache/beam/pull/14886#discussion_r639684437
##########
File path: sdks/python/apache_beam/examples/dataframe/README.md
##########
@@ -0,0 +1,139 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+# Example DataFrame API Pipelines
+
+This module contains example pipelines that use the [Beam DataFrame
+API](https://beam.apache.org/documentation/dsls/dataframes/overview/).
+
+### Pre-requisites
+
+You must have `apache-beam>=2.30.0` installed in order to run these pipelines,
+since the `apache_beam.exampels.dataframe` module was added in that release.
Review comment:
Typo: "exampels"
##########
File path: sdks/python/apache_beam/examples/dataframe/README.md
##########
@@ -0,0 +1,139 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+# Example DataFrame API Pipelines
+
+This module contains example pipelines that use the [Beam DataFrame
+API](https://beam.apache.org/documentation/dsls/dataframes/overview/).
+
+### Pre-requisites
+
+You must have `apache-beam>=2.30.0` installed in order to run these pipelines,
+since the `apache_beam.exampels.dataframe` module was added in that release.
+
+### Wordcount Pipeline
+
+Wordcount is the "Hello World" of data analytic systems, so of course we
+had to implement it for the Beam DataFrame API! See `wordcount.py` for the
+implementation. Note it demonstrates how to integrate the DataFrame API with
+a larger Beam pipeline by using [Beam
+Schemas](https://beam.apache.org/documentation/programming-guide/#what-is-a-schema)
+in conjunction with
+[to_dataframe](https://beam.apache.org/releases/pydoc/current/apache_beam.dataframe.convert.html#apache_beam.dataframe.convert.to_dataframe)
+and
+[to_pcollection](https://beam.apache.org/releases/pydoc/current/apache_beam.dataframe.convert.html#apache_beam.dataframe.convert.to_pcollection).
+
+#### Running the pipeline
+
+To run the pipeline locally:
+
+```sh
+python -m apache_beam.examples.dataframe.wordcount \
+ --input gs://dataflow-samples/shakespeare/kinglear.txt \
+ --output counts
+```
+
+This will produce files like `counts-XXXXX-of-YYYYY` with contents like:
+```
+KING: 243
+LEAR: 236
+DRAMATIS: 1
+PERSONAE: 1
+king: 65
+of: 447
+Britain: 2
+OF: 15
+FRANCE: 10
+DUKE: 3
+...
+```
+
+### Taxi Ride Example Pipelines
+
+`taxiride.py` contains implementations for two DataFrame pipelines that
+process the well-known [NYC Taxi
+dataset](https://www1.nyc.gov/site/tlc/about/tlc-trip-record-data.page). These
+pipelines don't use any Beam primitives, instead they build end-to-end
pipelines
+using the DataFrame API, by leveraging [DataFrame
+IOs](https://beam.apache.org/releases/pydoc/current/apache_beam.dataframe.io.html).
+
+The module defines two pipelines. The `location_id_agg` pipline does a grouped
Review comment:
Typo: "pipline"
##########
File path: sdks/python/apache_beam/examples/dataframe/README.md
##########
@@ -0,0 +1,139 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+# Example DataFrame API Pipelines
+
+This module contains example pipelines that use the [Beam DataFrame
+API](https://beam.apache.org/documentation/dsls/dataframes/overview/).
+
+### Pre-requisites
+
+You must have `apache-beam>=2.30.0` installed in order to run these pipelines,
+since the `apache_beam.exampels.dataframe` module was added in that release.
+
+### Wordcount Pipeline
+
+Wordcount is the "Hello World" of data analytic systems, so of course we
+had to implement it for the Beam DataFrame API! See `wordcount.py` for the
+implementation. Note it demonstrates how to integrate the DataFrame API with
+a larger Beam pipeline by using [Beam
+Schemas](https://beam.apache.org/documentation/programming-guide/#what-is-a-schema)
+in conjunction with
+[to_dataframe](https://beam.apache.org/releases/pydoc/current/apache_beam.dataframe.convert.html#apache_beam.dataframe.convert.to_dataframe)
+and
+[to_pcollection](https://beam.apache.org/releases/pydoc/current/apache_beam.dataframe.convert.html#apache_beam.dataframe.convert.to_pcollection).
+
+#### Running the pipeline
+
+To run the pipeline locally:
+
+```sh
+python -m apache_beam.examples.dataframe.wordcount \
+ --input gs://dataflow-samples/shakespeare/kinglear.txt \
+ --output counts
+```
+
+This will produce files like `counts-XXXXX-of-YYYYY` with contents like:
+```
+KING: 243
+LEAR: 236
+DRAMATIS: 1
+PERSONAE: 1
+king: 65
+of: 447
+Britain: 2
+OF: 15
+FRANCE: 10
+DUKE: 3
+...
+```
+
+### Taxi Ride Example Pipelines
+
+`taxiride.py` contains implementations for two DataFrame pipelines that
+process the well-known [NYC Taxi
+dataset](https://www1.nyc.gov/site/tlc/about/tlc-trip-record-data.page). These
+pipelines don't use any Beam primitives, instead they build end-to-end
pipelines
Review comment:
"primitives, instead" -> "primitives. Instead"
##########
File path: sdks/python/apache_beam/examples/dataframe/README.md
##########
@@ -0,0 +1,139 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+# Example DataFrame API Pipelines
+
+This module contains example pipelines that use the [Beam DataFrame
+API](https://beam.apache.org/documentation/dsls/dataframes/overview/).
+
+### Pre-requisites
+
+You must have `apache-beam>=2.30.0` installed in order to run these pipelines,
+since the `apache_beam.exampels.dataframe` module was added in that release.
+
+### Wordcount Pipeline
+
+Wordcount is the "Hello World" of data analytic systems, so of course we
+had to implement it for the Beam DataFrame API! See `wordcount.py` for the
+implementation. Note it demonstrates how to integrate the DataFrame API with
+a larger Beam pipeline by using [Beam
+Schemas](https://beam.apache.org/documentation/programming-guide/#what-is-a-schema)
+in conjunction with
+[to_dataframe](https://beam.apache.org/releases/pydoc/current/apache_beam.dataframe.convert.html#apache_beam.dataframe.convert.to_dataframe)
+and
+[to_pcollection](https://beam.apache.org/releases/pydoc/current/apache_beam.dataframe.convert.html#apache_beam.dataframe.convert.to_pcollection).
+
+#### Running the pipeline
+
+To run the pipeline locally:
+
+```sh
+python -m apache_beam.examples.dataframe.wordcount \
+ --input gs://dataflow-samples/shakespeare/kinglear.txt \
+ --output counts
+```
+
+This will produce files like `counts-XXXXX-of-YYYYY` with contents like:
+```
+KING: 243
+LEAR: 236
+DRAMATIS: 1
+PERSONAE: 1
+king: 65
+of: 447
+Britain: 2
+OF: 15
+FRANCE: 10
+DUKE: 3
+...
+```
+
+### Taxi Ride Example Pipelines
+
+`taxiride.py` contains implementations for two DataFrame pipelines that
+process the well-known [NYC Taxi
+dataset](https://www1.nyc.gov/site/tlc/about/tlc-trip-record-data.page). These
+pipelines don't use any Beam primitives, instead they build end-to-end
pipelines
+using the DataFrame API, by leveraging [DataFrame
+IOs](https://beam.apache.org/releases/pydoc/current/apache_beam.dataframe.io.html).
+
+The module defines two pipelines. The `location_id_agg` pipline does a grouped
+aggregation on the drop-off location ID. The `borough_enrich` pipeline extends
+this example by joining the zone lookup table to find the borough where each
+drop off occurred, and aggregation
+
+#### Data
+Some snapshots of NYC taxi data have been staged in
+`gs://apache-beam-samples` for use with these example pipelines:
+
+- `gs://apache-beam-samples/nyc_taxi/2017/yellow_tripdata_2017-*.csv`: CSV
files
+ containing taxiride data for each month of 2017 (similar directories exist
for
Review comment:
"taxiride" -> "taxi ride"
##########
File path: sdks/python/apache_beam/examples/dataframe/README.md
##########
@@ -0,0 +1,139 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+# Example DataFrame API Pipelines
+
+This module contains example pipelines that use the [Beam DataFrame
+API](https://beam.apache.org/documentation/dsls/dataframes/overview/).
+
+### Pre-requisites
+
+You must have `apache-beam>=2.30.0` installed in order to run these pipelines,
+since the `apache_beam.exampels.dataframe` module was added in that release.
+
+### Wordcount Pipeline
+
+Wordcount is the "Hello World" of data analytic systems, so of course we
+had to implement it for the Beam DataFrame API! See `wordcount.py` for the
+implementation. Note it demonstrates how to integrate the DataFrame API with
+a larger Beam pipeline by using [Beam
+Schemas](https://beam.apache.org/documentation/programming-guide/#what-is-a-schema)
+in conjunction with
+[to_dataframe](https://beam.apache.org/releases/pydoc/current/apache_beam.dataframe.convert.html#apache_beam.dataframe.convert.to_dataframe)
+and
+[to_pcollection](https://beam.apache.org/releases/pydoc/current/apache_beam.dataframe.convert.html#apache_beam.dataframe.convert.to_pcollection).
+
+#### Running the pipeline
+
+To run the pipeline locally:
+
+```sh
+python -m apache_beam.examples.dataframe.wordcount \
+ --input gs://dataflow-samples/shakespeare/kinglear.txt \
+ --output counts
+```
+
+This will produce files like `counts-XXXXX-of-YYYYY` with contents like:
+```
+KING: 243
+LEAR: 236
+DRAMATIS: 1
+PERSONAE: 1
+king: 65
+of: 447
+Britain: 2
+OF: 15
+FRANCE: 10
+DUKE: 3
+...
+```
+
+### Taxi Ride Example Pipelines
+
+`taxiride.py` contains implementations for two DataFrame pipelines that
+process the well-known [NYC Taxi
+dataset](https://www1.nyc.gov/site/tlc/about/tlc-trip-record-data.page). These
+pipelines don't use any Beam primitives, instead they build end-to-end
pipelines
+using the DataFrame API, by leveraging [DataFrame
+IOs](https://beam.apache.org/releases/pydoc/current/apache_beam.dataframe.io.html).
+
+The module defines two pipelines. The `location_id_agg` pipline does a grouped
+aggregation on the drop-off location ID. The `borough_enrich` pipeline extends
+this example by joining the zone lookup table to find the borough where each
+drop off occurred, and aggregation
Review comment:
It seems like this sentence is not finished.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 602303)
Time Spent: 6h 20m (was: 6h 10m)
> Add well-documented DataFrame example pipelines
> -----------------------------------------------
>
> Key: BEAM-12024
> URL: https://issues.apache.org/jira/browse/BEAM-12024
> Project: Beam
> Issue Type: Improvement
> Components: sdk-py-core
> Reporter: Brian Hulette
> Priority: P2
> Labels: dataframe-api
> Time Spent: 6h 20m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)