5A. [Repositories] Working with Raw Files in Code Repositories9. Viewing Module Contents

9 - Viewing Module Contents

This content is also available at learn.palantir.com ↗ and is presented here for accessibility purposes.

📖 Task Introduction

When Code Assist is running, you can ctrl+click on certain code elements, including variables and module names, to expand their definitions.

🔨 Task Instructions

  1. Open your passenger_flight_alerts_preprocessed.py file.

  2. Ensure Code Assist is running. Refresh it if it isn’t.

  3. Ctrl+click on the sanitize_schema_for_parquet module name on line 2 of your code editor.

    • This opens the module definition in a new code tab in your repository.
  4. Try it again, this time by ctrl+clicking on the StructType method on line 13.

In these exercises, your used available Foundry packages and APIs to access and parse raw files. The same APIs and packages also enable you to write to non-linear file types. Since this is an advanced topic, we suggest you read the documentation pages on file access with Python and Spark schema inference.