def __init__(self, qubole_conn_id="qubole_default", *args, **kwargs): self.args = args self.kwargs = kwargs self.kwargs['qubole_conn_id'] = qubole_conn_id self.hook = QuboleHook(*self.args, **self.kwargs) super(QuboleOperator, self).__init__(*args, **kwargs) if self.on_failure_callback is None: self.on_failure_callback = QuboleHook.handle_failure_retry if self.on_retry_callback is None: self.on_retry_callback = QuboleHook.handle_failure_retry
def execute(self, context): # Reinitiating the hook, as some template fields might have changed self.hook = QuboleHook(*self.args, **self.kwargs) return self.hook.execute(context)
def __init__(self, qubole_conn_id="qubole_default", *args, **kwargs): self.args = args self.kwargs = kwargs self.kwargs['qubole_conn_id'] = qubole_conn_id self.hook = QuboleHook(*self.args, **self.kwargs) super(QuboleOperator, self).__init__(*args, **kwargs)
def get_hook(self): # Reinitiating the hook, as some template fields might have changed return QuboleHook(*self.args, **self.kwargs)