title: How to connect kubeflow pipeline components
body: <p>I want to establish a pipeline connection between the components by passing any kind of data just to make it look like organized like flowchart with arrows. Right now it is like below<a href="https://i.stack.imgur.com/Jgbqs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Jgbqs.png" alt="enter image description here" /></a></p>
  <p>Irrespective of whether the docker container generates output or not I would want pass some sample data between the components. However If any changes is required in the docker container code or the .yaml please let me know</p>
  <p><strong>KFP Code</strong></p>
  <pre><code>import os
  from pathlib import Path
  import requests
  
  import kfp
  
  #Load the component
  component1 = kfp.components.load_component_from_file('comp_typed.yaml')
  component2 = kfp.components.load_component_from_file('component2.yaml')
  component3 = kfp.components.load_component_from_file('component3.yaml')
  component4 = kfp.components.load_component_from_file('component4.yaml')
  
  #Use the component as part of the pipeline
  @kfp.dsl.pipeline(name='Document Processing Pipeline', description='Document Processing Pipeline')
  def data_passing():
      task1 = component1()
      task2 = component2(task1.output)
      task3 = component3(task2.output)
      task4 = component4(task3.output)
  </code></pre>
  <p><strong>comp_typed.yaml code</strong></p>
  <pre><code>name: DPC
  description: This is an example
  implementation:
    container:
      image: gcr.io/pro1-in-us/dpc_comp1@sha256:3768383b9cd694936ef00464cb1bdc7f48bc4e9bbf08bde50ac7346f25be15de
      command: [python3, /dpc_comp1.py,]
  </code></pre>
  <p><strong>component2.yaml</strong></p>
  <pre><code>name: Custom_Plugin_1
  description: This is an example
  implementation:
    container:
      image: gcr.io/pro1-in-us/plugin1@sha256:16cb4aa9edf59bdf138177d41d46fcb493f84ce798781125dc7777ff5e1602e3
      command: [python3, /plugin1.py,]
  </code></pre>
  <p>I tried <a href="https://github.com/kubeflow/pipelines/blob/e54a8e3570649bae438b649eac757d4a7e02597a/components/sample/keras/train_classifier/component.yaml" rel="nofollow noreferrer">this</a> and <a href="https://github.com/kubeflow/pipelines/blob/master/samples/tutorials/Data%20passing%20in%20python%20components.ipynb" rel="nofollow noreferrer">this</a> but could not achieve anything except for error. I am new to python and kubeflow. What code changes should I make to pass data between all 4 components using KFP SDK. Data can be a file/string</p>
  <p>Let's Suppose, Component 1 downloads a .pdf file from gs bucket can i feed the same file into next downstream component?. Component 1 downloads file to <em>'/tmp/doc_pages'</em> location of component 1 docker container which i believe is local to that particular contain and the down stream components can not read them?</p>