semantic

package
v1.95.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package semantic provides semantic layer abstractions.

Package semantic provides semantic layer abstractions.

Package semantic provides abstractions for semantic metadata providers.

Index

Constants

View Source
const MaxStringLength = 2000

MaxStringLength is the maximum length for sanitized strings.

Variables

View Source
var DefaultInjectionLogger = &InjectionLogger{
	logFunc: log.Printf,
}

DefaultInjectionLogger is the default logger for injection attempts.

View Source
var ErrDocumentNotFound = errors.New("document not found")

ErrDocumentNotFound reports that a document URN did not resolve to a document. GetDocument returns it (wrapped) so a caller can distinguish a stale reference from a transport failure. It is defined here, on the capability interface, rather than per-implementation so every DocumentSearcher agrees on the sentinel.

Functions

This section is empty.

Types

type AssertionResult added in v1.44.0

type AssertionResult struct {
	AssertionURN string `json:"assertion_urn,omitempty"` // URN identifying the assertion
	Type         string `json:"type"`                    // FRESHNESS, SCHEMA, DATA_QUALITY
}

AssertionResult represents a single assertion reference within a data contract.

type CacheConfig

type CacheConfig struct {
	TTL time.Duration
}

CacheConfig configures the cache.

type CachedProvider

type CachedProvider struct {
	// contains filtered or unexported fields
}

CachedProvider wraps a Provider with caching.

func NewCachedProvider

func NewCachedProvider(provider Provider, cfg CacheConfig) *CachedProvider

NewCachedProvider creates a caching wrapper around a provider.

func (*CachedProvider) BrowseDocuments added in v1.93.0

func (c *CachedProvider) BrowseDocuments(ctx context.Context, offset, limit int) ([]DocumentResult, int, error)

BrowseDocuments forwards the document enumeration (#695) to the wrapped provider, preserving the DocumentSearcher capability through the cache decorator. It is not cached: a browse pages a mutating corpus and reports a live total, so a stale cached page or count would be worse than a fresh round trip. A wrapped provider without the capability yields an empty page and a zero total.

func (*CachedProvider) Close

func (c *CachedProvider) Close() error

Close closes the underlying provider.

func (*CachedProvider) GetColumnContext

func (c *CachedProvider) GetColumnContext(ctx context.Context, column ColumnIdentifier) (*ColumnContext, error)

GetColumnContext retrieves column context with caching.

func (*CachedProvider) GetColumnsContext

func (c *CachedProvider) GetColumnsContext(ctx context.Context, table TableIdentifier) (map[string]*ColumnContext, error)

GetColumnsContext retrieves columns context with caching.

func (*CachedProvider) GetCuratedQueryCount added in v0.25.0

func (c *CachedProvider) GetCuratedQueryCount(ctx context.Context, urn string) (int, error)

GetCuratedQueryCount retrieves curated query count with caching.

func (*CachedProvider) GetDocument added in v1.92.0

func (c *CachedProvider) GetDocument(ctx context.Context, urn string) (*DocumentResult, error)

GetDocument forwards the single-document read (#694) to the wrapped provider, preserving the DocumentSearcher capability through the cache decorator. It is not cached: a fetch is an explicit, low-frequency dereference whose whole point is the current full body, so serving a stale cached copy (e.g. just after an edit) would defeat it; the hot search path is what the snippet caches serve.

func (*CachedProvider) GetGlossaryTerm

func (c *CachedProvider) GetGlossaryTerm(ctx context.Context, urn string) (*GlossaryTerm, error)

GetGlossaryTerm retrieves a glossary term with caching.

func (*CachedProvider) GetLineage

func (c *CachedProvider) GetLineage(ctx context.Context, table TableIdentifier, direction LineageDirection, maxDepth int) (*LineageInfo, error)

GetLineage retrieves lineage with caching.

func (*CachedProvider) GetRelatedDocuments added in v1.91.0

func (c *CachedProvider) GetRelatedDocuments(ctx context.Context, urn string) ([]DocumentResult, error)

GetRelatedDocuments forwards the entity-keyed document lookup (#692) to the wrapped provider, preserving the DocumentSearcher capability through the cache decorator. It is keyed on a single entity URN (like GetGlossaryTerm/GetTableContext), so it is cached by URN: lineage expansion produces overlapping URN sets across successive searches, and serving repeats from cache spares the DataHub round trip on the hot search path.

func (*CachedProvider) GetTableContext

func (c *CachedProvider) GetTableContext(ctx context.Context, table TableIdentifier) (*TableContext, error)

GetTableContext retrieves table context with caching.

func (*CachedProvider) Invalidate

func (c *CachedProvider) Invalidate()

Invalidate clears the cache.

func (*CachedProvider) Name

func (c *CachedProvider) Name() string

Name returns the underlying provider name.

func (*CachedProvider) SearchDocuments added in v1.91.0

func (c *CachedProvider) SearchDocuments(ctx context.Context, query string, limit int) ([]DocumentResult, error)

SearchDocuments forwards the optional document-search capability (#692) to the wrapped provider, preserving it through the cache decorator. A wrapped provider that does not implement it (e.g. a noop catalog) yields no documents, so the capability is absent rather than always-empty. Not cached: queries vary too much.

func (*CachedProvider) SearchTables

func (c *CachedProvider) SearchTables(ctx context.Context, filter SearchFilter) ([]TableSearchResult, error)

SearchTables searches without caching (queries vary too much).

func (*CachedProvider) Unwrap added in v1.91.0

func (c *CachedProvider) Unwrap() Provider

Unwrap returns the wrapped provider, so a capability probe can inspect the real provider behind the decorator instead of the decorator's unconditional pass-throughs (SearchDocuments below always exists on CachedProvider, which would otherwise make an optional-capability type-assertion falsely succeed).

type ColumnContext

type ColumnContext struct {
	// Basic info
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`

	// Classification
	Tags          []string       `json:"tags,omitempty"`
	GlossaryTerms []GlossaryTerm `json:"glossary_terms,omitempty"`

	// Sensitivity
	IsPII       bool `json:"is_pii,omitempty"`
	IsSensitive bool `json:"is_sensitive,omitempty"`

	// Business metadata
	BusinessName string `json:"business_name,omitempty"`

	// InheritedFrom is set when metadata was inherited from upstream lineage.
	InheritedFrom *InheritedMetadata `json:"inherited_from,omitempty"`
}

ColumnContext provides semantic context for a column.

func (*ColumnContext) HasContent added in v0.24.0

func (c *ColumnContext) HasContent() bool

HasContent reports whether the column has any meaningful metadata worth including in enrichment responses. Columns with no description, tags, glossary terms, sensitivity flags, business name, or inherited metadata are considered empty and can be omitted to save tokens.

type ColumnIdentifier

type ColumnIdentifier struct {
	TableIdentifier
	Column string `json:"column"`
}

ColumnIdentifier uniquely identifies a column.

func (ColumnIdentifier) String

func (c ColumnIdentifier) String() string

String returns a dot-separated representation including the column.

type DataContractStatus added in v1.44.0

type DataContractStatus struct {
	Status           string            `json:"status"` // PASSING or FAILING
	AssertionResults []AssertionResult `json:"assertion_results,omitempty"`
}

DataContractStatus represents the pass/fail status of a data contract from DataHub 1.4.x.

type Deprecation

type Deprecation struct {
	Deprecated bool       `json:"deprecated"`
	Note       string     `json:"note,omitempty"`
	Actor      string     `json:"actor,omitempty"`
	DecommDate *time.Time `json:"decommission_date,omitempty"`
}

Deprecation indicates if an entity is deprecated.

type DocumentResult added in v1.91.0

type DocumentResult struct {
	URN     string `json:"urn"`
	Title   string `json:"title"`
	SubType string `json:"sub_type,omitempty"`
	Snippet string `json:"snippet,omitempty"`
	// Body is the full, untruncated document content. It is populated only by a
	// single-document read (GetDocument), where the whole point is to return the
	// complete content a search snippet elides; the relevance-search paths
	// (SearchDocuments, GetRelatedDocuments) leave it empty and populate the
	// bounded Snippet instead, so a multi-result search does not carry N full
	// bodies.
	Body string `json:"body,omitempty"`
	// Status is the publication state (PUBLISHED/UNPUBLISHED). The upstream search
	// applies no status filter, so a consumer carries this to exclude drafts.
	Status string `json:"status,omitempty"`
	// ShowInGlobalContext reports whether the document is meant to appear in global
	// search. The upstream search returns documents regardless of this flag, so a
	// search consumer must filter on it to honor a steward's choice to hide a document.
	ShowInGlobalContext bool     `json:"show_in_global_context"`
	RelatedAssetURNs    []string `json:"related_asset_urns,omitempty"`
}

DocumentResult is one DataHub context document returned by a relevance search (#692). Context documents are the non-dataset knowledge home that predates knowledge pages; surfacing them in search makes them discoverable (and migratable). The URN (urn:li:document:<id>) drills in, Snippet shows relevance, and ShowInGlobalContext distinguishes globally-visible documents from hidden ones.

type DocumentSearcher added in v1.91.0

type DocumentSearcher interface {
	// SearchDocuments ranks context documents by relevance to query; a query of "*"
	// lists all (an empty query does not list). Results carry ShowInGlobalContext and
	// Status so the caller can filter to globally-visible, published documents. limit
	// caps results (0 means the provider default).
	SearchDocuments(ctx context.Context, query string, limit int) ([]DocumentResult, error)

	// GetRelatedDocuments returns the context documents linked to an entity URN (the
	// reverse of a document's related assets), for entity-keyed discovery. Results
	// carry the same fields as SearchDocuments so the caller applies the same filter.
	GetRelatedDocuments(ctx context.Context, urn string) ([]DocumentResult, error)

	// GetDocument reads one context document by its URN, returning the full
	// untruncated body (in DocumentResult.Body) so an agent can dereference a
	// urn:li:document:<id> reference search emitted to the complete content. A URN
	// that resolves to no document returns ErrDocumentNotFound, which the fetch
	// surface maps to a structured not-found rather than an error.
	GetDocument(ctx context.Context, urn string) (*DocumentResult, error)

	// BrowseDocuments enumerates context documents for the browse surface (#695):
	// the offset/limit page of the complete document set plus the total document
	// count, so an agent can page the whole corpus to audit, dedup, or migrate it.
	// Unlike SearchDocuments this applies NO relevance threshold and NO
	// visibility/status filter: every document is enumerable (drafts and hidden
	// documents included), so the returned page and total describe the same complete
	// set. Results carry the same fields as SearchDocuments (a bounded Snippet, not
	// the full Body) since a listing shows what each document is, not its contents.
	BrowseDocuments(ctx context.Context, offset, limit int) (docs []DocumentResult, total int, err error)
}

DocumentSearcher is the optional document-search capability (#692): relevance search over DataHub context documents, the non-dataset knowledge home that predates knowledge pages. Only a real catalog provider implements it (the DataHub adapter); the noop provider does not, so a noop catalog adds no documents search source. The cache decorator forwards it. A consumer type-asserts a Provider to this to decide whether to register a documents search source.

func DocumentSearcherFrom added in v1.91.0

func DocumentSearcherFrom(p Provider) (DocumentSearcher, bool)

DocumentSearcherFrom reports the document-search capability of p, unwrapping any decorator chain (e.g. CachedProvider) so the answer reflects the real underlying provider rather than a decorator's unconditional pass-through. ok is false when no provider in the chain can search documents (so no documents source is registered); when ok, the returned searcher is p itself, so searches still flow through the decorator (and its cache/forwarding) rather than bypassing it.

type Domain

type Domain struct {
	URN         string `json:"urn"`
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
}

Domain represents a data domain.

type FieldFilter added in v1.50.0

type FieldFilter struct {
	// Field is the filter field (e.g., "fieldPaths", "fieldTags", "platform", "owners").
	Field string `json:"field"`

	// Values to match against.
	Values []string `json:"values"`

	// Condition is the match operator: CONTAIN, EQUAL (default), IN, EXISTS.
	Condition string `json:"condition,omitempty"`

	// Negated inverts the filter (exclude matching entities).
	Negated bool `json:"negated,omitempty"`
}

FieldFilter is a single search filter criterion.

type GlossaryTerm

type GlossaryTerm struct {
	URN         string `json:"urn"`
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
}

GlossaryTerm represents a business glossary term.

type Incident added in v1.44.0

type Incident struct {
	URN         string `json:"urn"`
	Type        string `json:"type"`
	Title       string `json:"title"`
	Description string `json:"description,omitempty"`
	State       string `json:"state"`
	Created     int64  `json:"created,omitempty"`
}

Incident represents an active data incident from DataHub 1.4.x.

type InheritedMetadata added in v0.8.0

type InheritedMetadata struct {
	// SourceURN is the DataHub URN of the upstream dataset.
	SourceURN string `json:"source_urn"`

	// SourceColumn is the column name in the upstream dataset.
	SourceColumn string `json:"source_column"`

	// Hops is the distance from the target dataset (1 = direct upstream).
	Hops int `json:"hops"`

	// MatchMethod indicates how the column was matched.
	// Values: "column_lineage", "name_exact", "name_transformed", "alias"
	MatchMethod string `json:"match_method"`
}

InheritedMetadata tracks the provenance of inherited column metadata.

type InjectionLogger added in v0.2.0

type InjectionLogger struct {
	// contains filtered or unexported fields
}

InjectionLogger logs detected prompt injection attempts.

func (*InjectionLogger) DetectAndLog added in v0.2.0

func (l *InjectionLogger) DetectAndLog(sanitizer *Sanitizer, source, field, input string) bool

DetectAndLog detects injection patterns in the input and logs if found. Returns true if injection was detected.

func (*InjectionLogger) Disable added in v0.2.0

func (l *InjectionLogger) Disable()

Disable disables injection logging.

func (*InjectionLogger) Enable added in v0.2.0

func (l *InjectionLogger) Enable()

Enable enables injection logging.

func (*InjectionLogger) LogInjectionAttempt added in v0.2.0

func (l *InjectionLogger) LogInjectionAttempt(source, field string, patterns []string)

LogInjectionAttempt logs a detected injection attempt.

func (*InjectionLogger) SetLogFunc added in v0.2.0

func (l *InjectionLogger) SetLogFunc(f func(format string, args ...any))

SetLogFunc sets the logging function for injection attempts.

type LineageDirection

type LineageDirection string

LineageDirection indicates the direction of lineage traversal.

const (
	LineageUpstream   LineageDirection = "upstream"
	LineageDownstream LineageDirection = "downstream"
)

Lineage direction constants.

type LineageEdge

type LineageEdge struct {
	URN            string `json:"urn"`
	Type           string `json:"type,omitempty"`
	TransformLogic string `json:"transform_logic,omitempty"`
}

LineageEdge represents an edge in the lineage graph.

type LineageEntity

type LineageEntity struct {
	URN      string        `json:"urn"`
	Type     string        `json:"type"`
	Name     string        `json:"name"`
	Platform string        `json:"platform,omitempty"`
	Depth    int           `json:"depth"`
	Parents  []LineageEdge `json:"parents,omitempty"`
	Children []LineageEdge `json:"children,omitempty"`
	Context  *TableContext `json:"context,omitempty"`
}

LineageEntity represents an entity in a lineage graph.

type LineageInfo

type LineageInfo struct {
	Direction LineageDirection `json:"direction"`
	Entities  []LineageEntity  `json:"entities"`
	MaxDepth  int              `json:"max_depth"`
}

LineageInfo contains lineage information for an entity.

type NoopProvider

type NoopProvider struct{}

NoopProvider is a no-op implementation for testing.

func NewNoopProvider

func NewNoopProvider() *NoopProvider

NewNoopProvider creates a new no-op provider.

func (*NoopProvider) Close

func (*NoopProvider) Close() error

Close does nothing.

func (*NoopProvider) GetColumnContext

func (*NoopProvider) GetColumnContext(_ context.Context, _ ColumnIdentifier) (*ColumnContext, error)

GetColumnContext returns empty context.

func (*NoopProvider) GetColumnsContext

func (*NoopProvider) GetColumnsContext(_ context.Context, _ TableIdentifier) (map[string]*ColumnContext, error)

GetColumnsContext returns empty map.

func (*NoopProvider) GetCuratedQueryCount added in v0.25.0

func (*NoopProvider) GetCuratedQueryCount(_ context.Context, _ string) (int, error)

GetCuratedQueryCount returns zero for the noop provider.

func (*NoopProvider) GetGlossaryTerm

func (*NoopProvider) GetGlossaryTerm(_ context.Context, _ string) (*GlossaryTerm, error)

GetGlossaryTerm returns an empty term.

func (*NoopProvider) GetLineage

func (*NoopProvider) GetLineage(_ context.Context, _ TableIdentifier, dir LineageDirection, maxDepth int) (*LineageInfo, error)

GetLineage returns empty lineage.

func (*NoopProvider) GetTableContext

func (*NoopProvider) GetTableContext(_ context.Context, _ TableIdentifier) (*TableContext, error)

GetTableContext returns empty context.

func (*NoopProvider) Name

func (*NoopProvider) Name() string

Name returns the provider name.

func (*NoopProvider) SearchTables

SearchTables returns empty results.

type Owner

type Owner struct {
	URN   string    `json:"urn"`
	Type  OwnerType `json:"type"`
	Name  string    `json:"name,omitempty"`
	Email string    `json:"email,omitempty"`
}

Owner represents a data owner.

type OwnerType

type OwnerType string

OwnerType indicates the type of owner.

const (
	OwnerTypeUser  OwnerType = "user"
	OwnerTypeGroup OwnerType = "group"
)

Owner type constants.

type Provider

type Provider interface {
	// Name returns the provider name.
	Name() string

	// GetTableContext retrieves semantic context for a table.
	GetTableContext(ctx context.Context, table TableIdentifier) (*TableContext, error)

	// GetColumnContext retrieves semantic context for a single column.
	GetColumnContext(ctx context.Context, column ColumnIdentifier) (*ColumnContext, error)

	// GetColumnsContext retrieves semantic context for all columns of a table.
	GetColumnsContext(ctx context.Context, table TableIdentifier) (map[string]*ColumnContext, error)

	// GetLineage retrieves lineage information for a table.
	GetLineage(ctx context.Context, table TableIdentifier, direction LineageDirection, maxDepth int) (*LineageInfo, error)

	// GetGlossaryTerm retrieves a glossary term by URN.
	GetGlossaryTerm(ctx context.Context, urn string) (*GlossaryTerm, error)

	// SearchTables searches for tables matching the filter.
	SearchTables(ctx context.Context, filter SearchFilter) ([]TableSearchResult, error)

	// GetCuratedQueryCount returns the number of curated/saved queries for a dataset.
	GetCuratedQueryCount(ctx context.Context, urn string) (int, error)

	// Close releases resources.
	Close() error
}

Provider retrieves semantic metadata from catalog systems. DataHub implements this. Future alternatives (Atlas, Unity Catalog) can too.

type SanitizeConfig added in v0.2.0

type SanitizeConfig struct {
	// MaxLength is the maximum length for strings (default: 2000).
	MaxLength int

	// StripInjectionPatterns removes detected injection patterns instead of flagging.
	StripInjectionPatterns bool

	// LogInjectionAttempts enables logging of detected injection attempts.
	LogInjectionAttempts bool
}

SanitizeConfig configures sanitization behavior.

func DefaultSanitizeConfig added in v0.2.0

func DefaultSanitizeConfig() SanitizeConfig

DefaultSanitizeConfig returns a safe default configuration.

type Sanitizer added in v0.2.0

type Sanitizer struct {
	// contains filtered or unexported fields
}

Sanitizer sanitizes metadata strings to prevent prompt injection and other attacks.

func NewSanitizer added in v0.2.0

func NewSanitizer(cfg SanitizeConfig) *Sanitizer

NewSanitizer creates a new sanitizer with the given configuration.

func (*Sanitizer) DetectInjection added in v0.2.0

func (*Sanitizer) DetectInjection(input string) (detected bool, patterns []string)

DetectInjection checks if the input contains potential prompt injection patterns. Returns true if injection is detected along with matched patterns.

func (*Sanitizer) SanitizeColumnContext added in v0.2.0

func (s *Sanitizer) SanitizeColumnContext(cc *ColumnContext) *ColumnContext

SanitizeColumnContext sanitizes all string fields in a ColumnContext.

func (*Sanitizer) SanitizeDescription added in v0.2.0

func (s *Sanitizer) SanitizeDescription(desc string) string

SanitizeDescription sanitizes a description field.

func (*Sanitizer) SanitizeString added in v0.2.0

func (s *Sanitizer) SanitizeString(input string) string

SanitizeString sanitizes a string by removing control characters, truncating to max length, and optionally stripping injection patterns.

func (*Sanitizer) SanitizeTableContext added in v0.2.0

func (s *Sanitizer) SanitizeTableContext(tc *TableContext) *TableContext

SanitizeTableContext sanitizes all string fields in a TableContext.

func (*Sanitizer) SanitizeTag added in v0.2.0

func (*Sanitizer) SanitizeTag(tag string) string

SanitizeTag validates and sanitizes a tag name. Returns empty string if the tag is invalid.

func (*Sanitizer) SanitizeTags added in v0.2.0

func (s *Sanitizer) SanitizeTags(tags []string) []string

SanitizeTags sanitizes a slice of tags, removing invalid ones.

type SearchFilter

type SearchFilter struct {
	Query    string   `json:"query"`
	Platform string   `json:"platform,omitempty"`
	Tags     []string `json:"tags,omitempty"`
	Domain   string   `json:"domain,omitempty"`
	Owner    string   `json:"owner,omitempty"`
	Limit    int      `json:"limit,omitempty"`
	Offset   int      `json:"offset,omitempty"`

	// EntityTypes restricts search to specific entity types (e.g., "DATASET", "DASHBOARD").
	// If empty, defaults to the DataHub client's DefaultEntityType.
	EntityTypes []string `json:"entity_types,omitempty"`

	// Mode selects the search strategy: "keyword" (default) or "semantic".
	Mode string `json:"mode,omitempty"`

	// Filters provides advanced field-level filtering (e.g., by column name, column tag).
	// All filters are AND'd together. These map directly to DataHub's searchAcrossEntities
	// orFilters and support fields like fieldPaths, fieldTags, fieldGlossaryTerms, etc.
	Filters []FieldFilter `json:"filters,omitempty"`
}

SearchFilter defines criteria for searching tables.

type StructuredProperty added in v1.44.0

type StructuredProperty struct {
	QualifiedName string `json:"qualified_name"`
	DisplayName   string `json:"display_name,omitempty"`
	Values        []any  `json:"values"`
}

StructuredProperty represents a typed custom property from DataHub 1.4.x.

type TableContext

type TableContext struct {
	// Basic info
	URN         string `json:"urn,omitempty"`
	Description string `json:"description,omitempty"`

	// Ownership
	Owners []Owner `json:"owners,omitempty"`

	// Classification
	Tags          []string       `json:"tags,omitempty"`
	GlossaryTerms []GlossaryTerm `json:"glossary_terms,omitempty"`
	Domain        *Domain        `json:"domain,omitempty"`

	// Status
	Deprecation *Deprecation `json:"deprecation,omitempty"`

	// Quality
	QualityScore *float64 `json:"quality_score,omitempty"`

	// Metadata
	CustomProperties map[string]string `json:"custom_properties,omitempty"`
	LastModified     *time.Time        `json:"last_modified,omitempty"`

	// Structured properties (DataHub 1.4.x)
	StructuredProperties []StructuredProperty `json:"structured_properties,omitempty"`

	// Incidents (DataHub 1.4.x)
	ActiveIncidents int        `json:"active_incidents,omitempty"`
	Incidents       []Incident `json:"incidents,omitempty"`

	// Data contracts (DataHub 1.4.x)
	DataContract *DataContractStatus `json:"data_contract,omitempty"`
}

TableContext provides semantic context for a table.

type TableIdentifier

type TableIdentifier struct {
	Catalog string `json:"catalog,omitempty"`
	Schema  string `json:"schema"`
	Table   string `json:"table"`
}

TableIdentifier uniquely identifies a table.

func (TableIdentifier) String

func (t TableIdentifier) String() string

String returns a dot-separated representation.

type TableSearchResult

type TableSearchResult struct {
	URN          string   `json:"urn"`
	Name         string   `json:"name"`
	Platform     string   `json:"platform,omitempty"`
	Description  string   `json:"description,omitempty"`
	Tags         []string `json:"tags,omitempty"`
	Domain       string   `json:"domain,omitempty"`
	MatchedField string   `json:"matched_field,omitempty"`
}

TableSearchResult represents a search result.

type URNResolver

type URNResolver interface {
	// ResolveURN converts a URN to a table identifier.
	ResolveURN(ctx context.Context, urn string) (*TableIdentifier, error)

	// BuildURN creates a URN from a table identifier.
	BuildURN(ctx context.Context, table TableIdentifier) (string, error)
}

URNResolver can resolve URNs to table identifiers.

Directories

Path Synopsis
Package datahub provides a DataHub implementation of the semantic provider.
Package datahub provides a DataHub implementation of the semantic provider.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL