# Preview transforms in local development There are two main ways to preview transforms in local development with VS Code: * [Preview transforms with the Palantir extension for Visual Studio Code for Python](#preview-with-the-palantir-extension-for-visual-studio-code-python-only) * [Preview transforms with Gradle-based local preview for Java](#gradle-based-local-preview-for-java) ## Preview with the Palantir extension for Visual Studio Code (Python only) The Palantir extension for Visual Studio Code supports local preview functionality. Refer to the [extension documentation](../../palantir-extension-for-visual-studio-code/overview/index.md) for installation instructions. Once the extension has been installed and the environment is ready for preview, your transforms should be automatically discovered in the **Preview** tab as shown below. ![Preview functionality for a Python transforms repository in the extension for Visual Studio Code.](../../../assets/0a68eb0f98d30df645c7562b8301330a801ae0c664a9f58f3f38ce7db23f9114.webp) You can also run local preview for Python transforms. When running preview locally, parts of the datasets are streamed to your machine. For more information, review the [documentation for transforms preview](../../palantir-extension-for-visual-studio-code/transforms-preview/index.md). ## Gradle-based local preview for Java This section details the steps required to preview Python and Java transforms in local development. For additional context, review our documentation for [Java local development](../../transforms-java/local-development/index.md). You can also learn more about [how to preview transforms](../../code-repositories/preview-transforms/index.md). Gradle-based local preview executes the preview remotely, inside of Foundry. ### Prerequisites and limitations Local preview support requires that the local branch must be tracking a remote branch such that the local branch needs to be pushed at least once, on top of existing prerequisites for local development. Note the following additional limitations: * The preview URI can only be accessed by the user who ran the preview and is available on a temporary basis. ### Run dataset preview Before running the preview, you must set up the environment for local development and ensure that your repository is [upgraded to the latest template version](../../code-repositories/repository-upgrades/index.md#manual-branch-upgrade). 1. Run `./gradlew displayTransformsList` which will return a list of all available transforms. ![Use datasetPreview task to list all available transforms](../../../assets/890376ee1002ba5012680c88821f0f46d60cffe5b8747941d7c5181109ee3afd.webp) 2. Run `./gradlew datasetPreview --transformId=` with `` replaced by one of the transform ids (blue text on the screenshot above), which will return a link to Foundry where the already-computed preview can be accessed. ![Use datasetPreview task to run preview and get Foundry link](../../../assets/072f60a4bc0c6b3ad4999b2f5d9b9cb3f8168ccad0992a2ec653bcece8b04709.webp) ![Precomputed dataset preview in Foundry](../../../assets/2ec41a770c7e7b6eab44570353dd8c9fd17cc9473a1aab3abea197f6d3c47919.webp) 3. (Optional) Add `--printMode=table` flag to the command above to print the first 10 rows of all previewed datasets directly in your terminal instead of being provided a link to the preview. ![Use datasetPreview task to run preview and print to terminal](../../../assets/a69c4c737677ac2cf3b6768c3222f2300687de4582d98eafd27548bbbe12a552.webp) 4. (Optional) To include input files in the preview, add `--inputFiles=:` where `` is one of the input datasets from the selected transform function and `` is the file path within the input dataset. ![Use input files arguments to include dataset's files](../../../assets/fa60e95fda8a5213456e7af31f4ca3bed500a46299d541a7212fa832ec6b3f1e.webp) 5. (Optional) To include output files in the preview, add `--outputFiles=:` where `` is one of the output datasets from the selected transform function and `` is the file path within the output dataset. ![Use output files arguments to include dataset's files](../../../assets/7ca807304a56631346b4f9828b6f881175c6095a943b7968c7342869a258156a.webp)