Can you preview/run Palantir Foundry Transforms locally in VS Code

Viewed 395

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.

However, I've yet been able to preview or run any of the .py transform files. 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.

from transforms.api import transform_df, Input, Output, configure
ModuleNotFoundError: No module named 'transforms'

Any help is appreciated!

2 Answers

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.

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.

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.

Related