简体   繁体   English

如何在 Palantir Foundry 中读取和写入同一个文件?

[英]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.

相关问题 如何使用 Palantir Foundry 在 Pyspark 中编写 case 语句 - How do I write case statements in Pyspark using Palantir Foundry 如何在 Palantir Foundry 中测试转换? - How to test a transformation in Palantir Foundry? Palantir Foundry - 文件和文件夹名称列表 - Palantir Foundry - File and Folder names list 如何通过将数据帧作为输入来编写 pytest 以获取 palantir 代工厂中的所有必需值 - How to write pytest by taking dataframe as an input to fetch all the required values in palantir foundry 如何在 Palantir Foundry 中合并多个动态输入? - How to union multiple dynamic inputs in Palantir Foundry? 如何在 Palantir Foundry 中上传未经身份验证的数据集 - How to upload dataset without authentication in Palantir foundry 如何在 Palantir Foundry 中获取文件夹的总大小? - How to get total size of the folder in Palantir Foundry? 如何在 Palantir Foundry 中检查列是否始终具有相同的值? - How do I check a column always has the same value in Palantir Foundry? 在 Palantir Foundry 中,如何使用 OOMing 驱动程序或执行程序解析一个非常大的 csv 文件? - In Palantir Foundry how do I parse a very large csv file with OOMing the driver or executor? 如何将日志从代工厂平台的代码库写入新文件 - How to Write logs into new file from Code Repository in foundry Platform
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM