Component evidence

openReader (inspect/reader.go)

dtctl · pkg/inspect/reader.go · go · Apache-2.0
files

Reads JSONL, JSON, CSV, and Parquet files for data inspection

Source preview first 800 characters · full source over MCP
// Source: https://github.com/Dynatrace/dtctl | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
package inspect

import (
	"os"
	"sort"
	"strconv"
	"strings"

	"github.com/Dynatrace/dtctl/pkg/output"
)

// Reader streams records out of a spilled file one at a time, so a row-access
// primitive reads only what it returns and memory never scales with the file
// size. Row order is file order (= spill order = the DQL result order); a reader
// never re-sorts (sorting is a query concern — push `| sort` into DQL, IN7).
type Reader interface {
	// Columns returns the column names when the format carries a cheap schema
	// (Parquet footer, CSV header). It returns nil when the schema is onl

... (truncated -- full source via MCP)