[英]Can you preview/run Palantir Foundry Transforms locally in VS Code
After I run ./gradlew idea
the build is succesful and I have been able to push code changes to the cloud via git very easily.在我运行
./gradlew idea
之后,构建成功并且我已经能够非常轻松地通过 git 将代码更改推送到云端。
However, I've yet been able to preview or run any of the .py
transform files.但是,我还不能预览或运行任何
.py
转换文件。 Does anyone know if this is possible?有谁知道这是否可能?
This is the error I get which I understand but do not know how to install the package since I believe it's a Palantir Foundry thing.这是我得到的错误,我理解但不知道如何安装 package,因为我相信这是 Palantir Foundry 的东西。
from transforms.api import transform_df, Input, Output, configure
ModuleNotFoundError: No module named 'transforms'
Any help is appreciated!任何帮助表示赞赏!
Unfortunately this isn't possible.不幸的是,这是不可能的。 A workaround could be to make your changes locally and commit to your repo, then go back to Foundry and run a preview.
一种解决方法可能是在本地进行更改并提交到您的存储库,然后将 go 返回 Foundry 并运行预览。
You could locally re-implement the decorators transform_df, configure
and classes Input, Output
of the transforms.api
of Foundry until Palantir provides a workaround to run code unmodified locally.您可以在本地重新实现装饰器
transform_df, configure
和类Input, Output
的transforms.api
的 Foundry,直到 Palantir 提供一种解决方法来在本地运行未修改的代码。
In your implementation you would need to fetch the dataset from Foundry, read it with pyspark and pass it as argument to your compute function.在您的实现中,您需要从 Foundry 获取数据集,使用 pyspark 读取它,并将其作为参数传递给您的计算 function。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.