apache / apache/texera

Add controller for selecting a dataset file

Open
#7,524 0 comments 0 reactions 1 assignee Claimed by @xuang7 View on GitHub
Dominant language
Scala
Stars
314
Forks
187
Avg merge
1d 21h
Merged PRs (30d)
214

Description

### Feature Summary

Step 6 of the operator-demo video generator: add a controller for the dataset-selection flow, so source operators can point at a real file and produce output.

Source operators read from a dataset rather than from an upstream operator. Their file is chosen through a modal that picks a dataset, a version, and a file, and only that flow sets a usable file reference on the operator.

### Proposed Solution or Design

Add a new `DatasetControllerBuilder` to the Playwright layer. It drives the file-selection modal used by source operators.

```
new DatasetControllerBuilder(ctx)
.datasetName(dataset.name)
.datasetVersion(dataset.version)
.file("movies.csv")
.execute()
```

The controller handles:
- opening the file-selection modal,
- selecting the dataset by name,
- selecting the required dataset version,
- selecting the file and confirming the choice,
- waiting for the operator to load the reference and infer its schema.

File selection must go through the modal because it sets the full dataset URI on the operator. Directly filling the form field only sets a file name and can overwrite that URI, causing the operator to fail at runtime.

Frontend hooks:
Add stable `data-testid` attributes for the modal controls where needed, and extend the guard test accordingly.

### Affected Area

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.