0

我想在 Azure Synapse 上创建管道,其中一个流程是使用笔记本读取、验证然后继续管道或停止管道

if(validation=True): #success on validation
   return df #continue the pipeline
if(validation=False): #failed on validation
   return error #stop the pipeline

我已经在 stackoverflow 和 google 中进行了研究,但我找不到具体的方法。我已经尝试过 break 和 mssparkutils.notebook.exit 但它不起作用

4

1 回答 1

0

已经解决了。你可以这样做

if validations==True:
   print(df)
else:
   raise TypeError('Validation failed')
于 2021-07-05T06:50:17.680 回答