airflow_renv_operator.py
def execute(self, context: dict) -> str:
        """Execute the R script in the project-local environment."""
        logger.info(f'Working from project: {self.project_path}')

        # Restore environment to ensure it matches lockfile
        self.restore_environment()

        # Execute script within environment
        logger.info(f'Executing R script in project-local environment: {self.script_path}')
        result = self.subprocess_hook.run_command(command=['Rscript', str(self.script_path)])
        if result.exit_code != 0:
            raise AirflowException(f'Rscript returned a non-zero exit code: {result.exit_code}')
        return result.output
Execute the R script in the project-local environment.
Execute the R script in the project-local environment.
Execute the R script in the project - local environment .
def execute(self, context: dict) -> str:
        logger.info(f'Working from project: {self.project_path}')
        self.restore_environment()
        logger.info(f'Executing R script in project-local environment: {self.script_path}')
        result = self.subprocess_hook.run_command(command=['Rscript', str(self.script_path)])
        if result.exit_code != 0:
            raise AirflowException(f'Rscript returned a non-zero exit code: {result.exit_code}')
        return result.output
def execute ( self , context : dict ) -> str : logger . info ( f'Working from project: {self.project_path}' ) self . restore_environment ( ) logger . info ( f'Executing R script in project-local environment: {self.script_path}' ) result = self . subprocess_hook . run_command ( command = [ 'Rscript' , str ( self . script_path ) ] ) if result . exit_code != 0 : raise AirflowException ( f'Rscript returned a non-zero exit code: {result.exit_code}' ) return result . output
Execute the R script in the project-local environment.
Execute the R script in the project - local environment .
"""Execute the R script in the project-local environment.""" # Restore environment to ensure it matches lockfile # Execute script within environment
self
context
dict