Documentation
¶
Overview ¶
Package show is the show command: an object of the repo, read from its compiled AML, by the identity the semantic catalog gives it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Show = command.Define(command.Def[ShowInput, anfranode.ShowResult]{ Name: "show", Short: "Show the repo's datasets, or one dataset: their models, fields and metrics", Long: "Show an object of the repo, read from its compiled AML: with no fqn, the repo and every dataset\n" + "in full; with a dataset's fqn, that dataset in full, as AQL can query it. Its interface, not its\n" + "implementation: names, labels, types, roles and AQL definitions, never SQL or tables. What is\n" + "wrong in the repo for it comes with it, as diagnostics: files that do not compile, a data source\n" + "it does not configure.", ReadOnly: true, Idempotent: true, Timeout: 2 * time.Minute, Needs: func(ShowInput) command.Sidecars { return command.Sidecars{Node: true} }, Normalize: func(in ShowInput) ShowInput { in.Fqn = strings.TrimSpace(in.Fqn) return in }, Run: func(ctx context.Context, cc command.CommandContext, in ShowInput) (anfranode.ShowResult, error) { if err := command.RequireSidecars(cc, command.Sidecars{Node: true}); err != nil { return anfranode.ShowResult{}, err } fqn, typ := in.Fqn, "" if fqn != "" { typ = in.Type } sources, err := cc.ResolveDataSources() if err != nil { return anfranode.ShowResult{}, err } res, err := aml.Show(ctx, cc.Clients.Node, cc.Repo, sources, typ, fqn) if v, ok := refused(err); ok { return anfranode.ShowResult{}, apperr.EncapsulateWith(err, apperr.ValidationFailed, v.Message, apperr.Violate(v)) } return res, err }, })
Show shows the repo, or a dataset in full.
Functions ¶
This section is empty.
Types ¶
type ShowInput ¶
type ShowInput struct {
Fqn string `json:"fqn,omitempty" cli:"positional" doc:"the fqn of the object to show; absent, the repo"`
Type string `` /* 138-byte string literal not displayed */
}
ShowInput is what to show, as the semantic catalog identifies it: an entity type and its fqn. No fqn: the repo.
Click to show internal directories.
Click to hide internal directories.