Checking your account

You can read the lesson while its saved answers and constructions load. Learning controls will open once that work is ready.

Introduction to Databricks

Read the files belonging to this table version

Coding challenges

The pending reading appeared in version 0

The first file gave the expected readings. A second file has appeared before it was included in the published table.

BOTIE

Version 0 lists only batch-0.parquet, containing P7 and P2. A new batch-1.parquet contains P9 but is not listed. The output unexpectedly includes P9. What should we inspect first?
The inputs we are comparing

Retained committed file lists

Same in both cases

  1. version
    0
    files
    ["readings/batch-0.parquet"]

Requested version number

Same in both cases

0

Stored files with decoded records

Only the first batch exists

[
  {
    "key": "readings/batch-0.parquet",
    "rows": [
      {
        "pump": "P7",
        "temperature_c": 12
      },
      {
        "pump": "P2",
        "temperature_c": 18
      }
    ]
  }
]

A pending file now exists too

[
  {
    "key": "readings/batch-0.parquet",
    "rows": [
      {
        "pump": "P7",
        "temperature_c": 12
      },
      {
        "pump": "P2",
        "temperature_c": 18
      }
    ]
  },
  {
    "key": "readings/batch-1.parquet",
    "rows": [
      {
        "pump": "P9",
        "temperature_c": 27
      }
    ]
  }
]
Result for only the first batch exists
  1. pump
    P7
    temperature_c
    12
  2. pump
    P2
    temperature_c
    18
Choose an explanation to test
A new committed file order and another pending object

This check uses the pieces from “Put publication state before file reading”.

BOTIE

Version 5 names evening.parquet before morning.parquet. A pending file is also stored. Return only version 5’s rows in its declared file order.
Retained committed file lists
  1. version
    5
    files
    ["evening.parquet","morning.parquet"]
Requested version number
5
Stored files with decoded records
[
  {
    "key": "morning.parquet",
    "rows": [
      {
        "pump": "P1",
        "temperature_c": 11
      }
    ]
  },
  {
    "key": "pending.parquet",
    "rows": [
      {
        "pump": "P9",
        "temperature_c": 99
      }
    ]
  },
  {
    "key": "evening.parquet",
    "rows": [
      {
        "pump": "P2",
        "temperature_c": 17
      }
    ]
  }
]

Use a number, text, or an array matching the requested result. A named result uses field names, such as {"count": 2}. For a matrix, put each row in brackets. Saving your prediction runs your current construction on these inputs and checks the earlier examples too.

Build a construction in the workspace above first. This case will test those pieces.

If version 0 remains named but its only data file is removed, what should the read do?

Keep the version identity, its active file list and the data needed to read it.

This local model receives decoded Python-like records and already reconstructed manifests. It does not access storage, replay a Delta transaction log or implement the real table format’s transaction and failure guarantees.

Continue the courseWorkspaces and Compute →
← What Is Databricks?