Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Blog
  • Pricing
  • Documentation
© 2025 Direct Cursus Technology L.L.C.
Yandex DataSphere
  • Getting started
    • All guides
      • Authentication in DataSphere Jobs
      • Running a job in DataSphere Jobs
      • Working with jobs from Visual Studio Code
      • Using results of completed jobs
      • Working with a service agent from a job
    • Migrating a workflow to a new version
  • Terraform reference
  • Audit Trails events
  • Access management
  • Pricing policy
  • Public materials
  • Release notes

In this article:

  • Downloading via DataSphere CLI
  • Downloading via DAG Airflow
  1. Step-by-step guides
  2. DataSphere Jobs
  3. Using results of completed jobs

Using results of completed jobs

Written by
Yandex Cloud
Updated at December 4, 2024
  • Downloading via DataSphere CLI
  • Downloading via DAG Airflow

Sometimes you need to process the job outputs or use them to run another job. To do this, download them using the DataSphere Jobs SDK download_job_files function or substitute them into another job using the DAG Airflow operator.

Downloading via DataSphere CLIDownloading via DataSphere CLI

If the total size of job results exceeds the maximum total size of files you can download via DataSphere CLI, only the files with the total size not exceeding this limit will be downloaded.

To download job results into the working directory using DataSphere CLI, run this command by substituting the job ID:

Bash
datasphere project job download-files --id <job_ID>

The function has optional parameters:

  • with_logs: Download logs, false by default.
  • with_diagnostics: Download diagnostic files, false by default.
  • with_diagnostics: File download directory, the working directory by default.

To use the downloaded data in another job, specify the data in the input parameter in the config.yaml file.

Downloading via DAG AirflowDownloading via DAG Airflow

You can use a DAG operator to load the output file of one job (result.txt) and provide it as an input file (INPUT_DATA) for another:

Python
from typing import Dict

from airflow.decorators import dag, task
import pendulum

from datasphere import SDK

now = pendulum.now()

@dag(dag_id='output_files_for_other_job', start_date=now, schedule="@daily", catchup=False)
def run():
    @task(task_id='fork_job')
    def fork_job(files_job_id: str, fork_source_job_id: str):
        sdk = SDK()
        sdk.download_job_files(files_job_id)
        job = sdk.fork_job(fork_source_job_id, vars={'INPUT_DATA': 'result.txt'})
        job.wait()

    fork_job('<ID_of_job_to_download>', '<ID_of_job_to_run>')

See alsoSee also

  • DataSphere CLI

Was the article helpful?

Previous
Working with jobs from Visual Studio Code
Next
Working with a service agent from a job
© 2025 Direct Cursus Technology L.L.C.