[英]How to read from and write to the same file in Palantir Foundry?
I have a very simple task of updating contents of a control file in Palantir Foundry.我有一个非常简单的任务是更新 Palantir Foundry 中控制文件的内容。 I need to read the contents of the file, perform a check and then write back to the same file.我需要读取文件的内容,执行检查,然后写回同一个文件。 However, if I provide the same file as Input and Output in the transform, I get the following error -但是,如果我在转换中提供与 Input 和 Output 相同的文件,则会收到以下错误 -
Cyclic dependency exists in the code for the following Foundry datasets:...
Is there a workaround for this?有解决方法吗?
No there isn't a work around for this, this is by design to have reproducible builds.不,没有解决方法,这是设计使具有可重现的构建。 If you need to have a cycle in your build, you need to pass it through something outside of transforms, for example by using an ontology object with a write back to a different dataset which you can read from afterwards, so that it breaks the cyclic dependency.如果你需要在你的构建中有一个循环,你需要通过转换之外的东西来传递它,例如通过使用一个本体 object 回写到你可以在之后读取的不同数据集,以便它打破循环依赖。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.