dinigo opened a new issue, #27107:
URL: https://github.com/apache/airflow/issues/27107

   ### Apache Airflow Provider(s)
   
   dbt-cloud
   
   ### Versions of Apache Airflow Providers
   
   ```
   apache-airflow-providers-dbt-cloud==2.2.0
   ```
   
   ### Apache Airflow version
   
   2.2.5
   
   ### Operating System
   
   Ubuntu 18.04
   
   ### Deployment
   
   Composer
   
   ### Deployment details
   
   _No response_
   
   ### What happened
   
   Instructing `DbtCloudGetJobRunArtifactOperator` to save results in a path 
like `{{ var.value.base_path }}/dbt_run_warehouse/{{ run_id 
}}/run_results.json` fails because it contains a path not created yet.
   
   
   ```
   Traceback (most recent call last):
     File 
"/opt/python3.8/lib/python3.8/site-packages/airflow/providers/dbt/cloud/operators/dbt.py",
 line 216, in execute
       with open(self.output_file_name, "w") as file:
   FileNotFoundError: [Errno 2] No such file or directory: 
'/home/airflow/gcs/data/dbt/dbt_run_warehouse/manual__2022-10-17T22:18:25.469526+00:00/run_results.json'
   ```
   
   
   ### What you think should happen instead
   
   It should create this path and dump the content of the requested artefact
   
   ### How to reproduce
   
   ```python
   with DAG('test') as dag:
     DbtCloudGetJobRunArtifactOperator(
       task_id='dbt_run_warehouse',
       run_id=12341234,
       path='run_results.json',
       output_file_name='{{ var.value.dbt_base_target_folder 
}}/dbt_run_warehouse/{{ run_id }}/run_results.json'
   ```
   
        
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to