Building a Data Factory Studio Pipeline

This example shows you how to build a pipeline for the Data Factory Studio editor.

This task shows you how to:

Create and Configure the Pipeline

Before you begin: Learn how to build a simple pipeline. See Example: Building and Running a Simple Pipeline.
  1. Create a new pipeline using the Adhoc Data Processing template. For more information, see Creating a Pipeline Overview.
  2. From the Parameters panel, specify the manifest parameters as follows:

    • For Input Manifest, specify:
      [{"prefix": "some_content.txt", "bucket_name": "adppesat1", "local_path": "input_data/"}]
    • For Output Manifest, specify:
      [{"local_path": "output/", "bucket_path": "results", "bucket_name": "adppesat1"}]

  3. Click in the corner to open the User defined workload component.


  4. Add a Adhoc Python Script component to the Data Port component.


  5. Add the following code to the Script parameter:

    import os
    import adhoc_data_processing as adp
    
    def main(input_manifest, output_manifest, pipeline_state, job_id):
        input = input_manifest[0]['local_path']
        output = output_manifest[0]['local_path']
        os.makedirs(output)
    
        filename = os.listdir(input)[0]
        with open(f"{output}/{job_id}", "w") as f:
            f.write(f"filesize of {filename} is {os.stat(input).st_size}")
     
    plp_df = adp.run(main, globals())
    
    

  6. Run the pipeline.

    For more information, see Running the Pipeline.

Publish the Pipeline

  1. From the Pipeline Creator home page, click Manage Pipelines.
  2. From the Actions column, select Publish for the pipeline.