Data Exploration in the Code IDE

The Paradime Code IDE offers powerful tools for data exploration and query iteration: the Data Explorer and Scratchpad. These features allow you to preview your data, test queries, and experiment with code efficiently.

Estimated completion time: 10 minutes


Prerequisites

  • Basic understanding of SQL and dbt™ concepts


What You'll Learn

In this guide, you'll learn how to:

  • Use the Data Explorer for compilation and data preview

  • Utilize the Scratchpad for temporary code experiments

  • Leverage these tools to improve your workflow efficiency


1. Data Explorer

The Data Explorer provides a Just in Time (JIT) live compiler, allowing you to preview compiled SQL without first compiling your entire dbt™️ project.

Key Features:

  • JIT Live Compiler: Instantly see how your SQL compiles, including resolved macros and Jinja blocks.

  • Data Preview with Customizable Limits: View query results directly in the IDE, with adjustable row limits.

  • CSV Download Option: Easily export your preview data.

  • Support for Partial SQL Previews: Test specific parts of your query by highlighting and previewing only the selected portion.

How to Use:

  1. Access the Data Explorer: Click the 🔍 icon on the right panel to open the preview data view.

  2. View Compiled SQL: Your compiled SQL will display automatically, showing resolved macros and Jinja blocks.

-- This is the original dbt model code
-- It uses the ref() function to reference another model
SELECT
  *
FROM
  {{ ref('nba_player_info') }}
  1. Preview Data: Click the "Preview Data" button to view your dbt™️ model or query results.

  2. Preview Partial SQL: Highlight a specific portion of SQL and click "Preview Data" to view results for that portion.

  3. Adjust Query Limit: Change the default limit (1-1000) in the "Query Limit" text box.

  4. Download Results: Click "Download CSV" to save preview data.


2. Scratchpad

The Scratchpad feature allows for quick, temporary experiments in SQL and/or dbt™️, with instant data previews.

Key Features:

  1. Temporary File Creation: Quickly create and experiment with code without affecting main project files.

  2. Support for SQL and dbt™ Syntax: Write queries using both standard SQL and dbt™-specific functions.

  3. Instant Data Preview: Leverage the Data Explorer for immediate results.

  4. Session Persistence: Scratchpad files remain available across sessions.

  5. Automatic Git Ignoring: Keep your repository clean by excluding scratchpad files from version control.

How to Use:

  1. Create a New Scratchpad File:

    • Click the "New File" button at the top-right of your screen.

    • Paradime creates a file in the "paradime_scratch" folder (e.g., "scratch-1", "scratch-2").

  2. Write and Test Code:

    • Use SQL or dbt™️ syntax (including ref(), macros, etc.).

    • Leverage the Data Explorer for instant previews.

  3. Organize Your Scratchpad:

    • Rename files as needed for better organization.

  4. Utilize Across Sessions:

    • Scratchpad files remain available after logging out and back in.

  5. Maintain a Clean Git Repository:

    • Scratchpad files are automatically gitignored.



Summary

You've learned how to use the Data Explorer for JIT compilation and data preview, and how to leverage the Scratchpad for temporary code experiments. These tools can significantly speed up your workflow, allowing you to quickly validate SQL queries and experiment with code without affecting your main project.

Next, we'll explore how to use DinoAI for accelerating your analytics engineering workflow.

Last updated

#350: Bolt - Template fixes pt 1

Change request updated