def to_flyte_idl(self): """ :rtype: _qubole.QuboleHiveJob """ return _qubole.QuboleHiveJob( query_collection=self._query_collection.to_flyte_idl(), cluster_label=self._cluster_label, tags=self._tags)
def _transform_for_user_output(self, outputs): """ Just execute the function and return the list of Hive queries returned. :param dict[Text,flytekit.models.common.FlyteIdlEntity] outputs: :rtype: list[Text] """ futures = outputs.get(_sdk_constants.FUTURES_FILE_NAME) if futures: queries = [] task_ids_to_defs = { t.id.name: _qubole_models.QuboleHiveJob.from_flyte_idl( _ParseDict(t.custom, _qubole_pb2.QuboleHiveJob())) for t in futures.tasks } for node in futures.nodes: queries.append(task_ids_to_defs[ node.task_node.reference_id.name].query.query) return queries else: return []