I want to check if the 1 outputs variable of 1 tas...
# ask-the-community
r
I want to check if the 1 outputs variable of 1 task can be match with 1 inputs variable of another task. So simplely i check it by get task_pb2 with flytekit.client.raw.get_task
Copy code
#task1 and task2 type is flyteidl.admin.task_pb2.Task
type1 = task1.closure.compiled_task.template.interface.outputs.variables['output_1_task_1].type
type2 = task2.closure.compiled_task.template.interface.inputs.variables['input_1_task_2].type

if type1 == type2:
   return True
else:
   return False
is this condition good enough for all type, set of types. Include hard case such as TypeTransform, Simple Schema, ...?
k
yes, I think so.
did you see any error?
r
I have just tested with simple type and it's ok
@Kevin Su i will ask you later if i have any issues.
k
thanks. also test structuredDataset when you get a chance.