[ 
https://issues.apache.org/jira/browse/BEAM-7700?focusedWorklogId=282477&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-282477
 ]

ASF GitHub Bot logged work on BEAM-7700:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 25/Jul/19 06:51
            Start Date: 25/Jul/19 06:51
    Worklog Time Spent: 10m 
      Work Description: robinyqiu commented on pull request #9129: [BEAM-7700] 
Java transform catalog
URL: https://github.com/apache/beam/pull/9129#discussion_r307125233
 
 

 ##########
 File path: website/src/documentation/transforms/java/other/create.md
 ##########
 @@ -0,0 +1,58 @@
+---
+layout: section
+title: "Create"
+permalink: /documentation/transforms/java/other/create/
+section_menu: section-menu/documentation.html
+---
+<!--
+Licensed 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.
+-->
+# Create
+<table align="left">
+    <a target="_blank" class="button"
+        
href="https://beam.apache.org/releases/javadoc/current/index.html?org/apache/beam/sdk/transforms/Create.html";>
+      <img src="https://beam.apache.org/images/logos/sdks/java.png"; 
width="20px" height="20px"
+           alt="Javadoc" />
+     Javadoc
+    </a>
+</table>
+<br>
+Creates a collection containing a specified set of elements. This is useful
+for testing, as well as creating an initial input to process in parallel.
+For example, a single element to execute a one-time `ParDo` or a list of 
filenames to be read.
+
+
+## Examples
+**Example**: create a `PCollection` from an in-memory `List`:
+
+```java
+public static void main(String[] args) {
+    // Create a Java Collection, in this case a List of Strings.
+    static final List<String> LINES = Arrays.asList(
+      "To be, or not to be: that is the question: ",
+      "Whether 'tis nobler in the mind to suffer ",
+      "The slings and arrows of outrageous fortune, ",
+      "Or to take arms against a sea of troubles, ");
+
+    // Create the pipeline.
+    PipelineOptions options =
+        PipelineOptionsFactory.fromArgs(args).create();
+    Pipeline p = Pipeline.create(options);
+
+    // Apply Create, passing the list and the coder, to create the PCollection.
+    p.apply(Create.of(LINES)).setCoder(StringUtf8Coder.of())
+}
+```
+
+## Related transforms 
+* [ParDo]({{ site.baseurl }}/documentation/transforms/java/elementwise/pardo)
 
 Review comment:
   I think we can remove the reference here.
 
----------------------------------------------------------------
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: 282477)
    Time Spent: 2h  (was: 1h 50m)

> Java transform catalog
> ----------------------
>
>                 Key: BEAM-7700
>                 URL: https://issues.apache.org/jira/browse/BEAM-7700
>             Project: Beam
>          Issue Type: Improvement
>          Components: website
>            Reporter: Rose Nguyen
>            Assignee: Rose Nguyen
>            Priority: Minor
>          Time Spent: 2h
>  Remaining Estimate: 0h
>
> Create catalog of core transforms (Java)
> -Java transforms overview
> -Links to Javadocs
> -Brief description
> -Related transforms
> -Links to programming guide
> -Examples section to integrate Colab notebooks
>  
> See BEAM-7464 for Python.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to