dataplex

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2026 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"

CloudPlatformScope is a broad scope for Google Cloud Platform services.

View Source
const SourceType string = "dataplex"

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessGroup added in v1.6.0

type AccessGroup struct {
	ID             string `json:"id"`
	DisplayName    string `json:"displayName"`
	Description    string `json:"description"`
	GoogleGroup    string `json:"googleGroup"`
	ServiceAccount string `json:"serviceAccount"`
}

type Config

type Config struct {
	// Dataplex configs
	Name                      string   `yaml:"name" validate:"required"`
	Type                      string   `yaml:"type" validate:"required"`
	Project                   string   `yaml:"project" validate:"required"`
	ImpersonateServiceAccount string   `yaml:"impersonateServiceAccount" validate:"omitempty,email"`
	Scopes                    []string `yaml:"scopes"`
}

func (Config) Initialize

func (r Config) Initialize(ctx context.Context, tracer trace.Tracer) (sources.Source, error)

func (Config) SourceConfigType

func (r Config) SourceConfigType() string

type DataAsset added in v1.7.0

type DataAsset struct {
	LocationID         string                                             `json:"locationId"`
	DataProductID      string                                             `json:"dataProductId"`
	DataAssetID        string                                             `json:"dataAssetId"`
	ResourceURI        string                                             `json:"resourceUri"`
	Labels             map[string]string                                  `json:"labels"`
	AccessGroupConfigs map[string]*dataplexpb.DataAsset_AccessGroupConfig `json:"accessGroupConfigs,omitempty"`
}

Common between ListDataAssets and GetDataAsset. The only difference between the objects returned by these two methods is whether the AccessGroupConfigs field (marked omitempty) is included.

type DataProduct added in v1.6.0

type DataProduct struct {
	LocationID    string            `json:"locationId"`
	DataProductID string            `json:"dataProductId"`
	DisplayName   string            `json:"displayName"`
	Description   string            `json:"description"`
	OwnerEmails   []string          `json:"ownerEmails"`
	AssetCount    int32             `json:"assetCount"`
	Labels        map[string]string `json:"labels"`
	AccessGroups  []AccessGroup     `json:"accessGroups"`
}

type DataProductSummary added in v1.6.0

type DataProductSummary struct {
	LocationID    string   `json:"locationId"`
	DataProductID string   `json:"dataProductId"`
	DisplayName   string   `json:"displayName"`
	OwnerEmails   []string `json:"ownerEmails"`
	AssetCount    int32    `json:"assetCount"`
}

type Source

type Source struct {
	Config
	Client         *dataplexapi.CatalogClient
	DataScanClient *dataplexapi.DataScanClient
	// contains filtered or unexported fields
}

func (*Source) CatalogClient

func (s *Source) CatalogClient() *dataplexapi.CatalogClient

func (*Source) CreateDataAsset added in v1.7.0

func (s *Source) CreateDataAsset(
	ctx context.Context,
	locationID string,
	dataProductID string,
	dataAssetID string,
	resourceURI string,
	labels map[string]string,
	accessGroupConfigs map[string][]string,
) (map[string]string, error)

func (*Source) CreateDataProduct added in v1.7.0

func (s *Source) CreateDataProduct(
	ctx context.Context,
	locationID string,
	dataProductID string,
	displayName string,
	description string,
	ownerEmails []string,
	accessGroups []AccessGroup,
) (map[string]string, error)

dataProductId is optional. If empty, the Dataplex backend will automatically generate a unique ID.

func (*Source) GenerateDataDiscovery added in v1.5.0

func (s *Source) GenerateDataDiscovery(ctx context.Context, location, resourcePath string) (string, error)

func (*Source) GenerateDataInsights added in v1.5.0

func (s *Source) GenerateDataInsights(ctx context.Context, location, resourcePath string, publish bool) (string, error)

func (*Source) GenerateDataProfile added in v1.5.0

func (s *Source) GenerateDataProfile(ctx context.Context, location, resourcePath string, publish bool) (string, error)

func (*Source) GenerateDataQuality added in v1.5.0

func (s *Source) GenerateDataQuality(ctx context.Context, location, resourcePath string, specJSON string, publish bool) (string, error)

func (*Source) GetDataAsset added in v1.7.0

func (s *Source) GetDataAsset(ctx context.Context, locationID string, dataProductID string, dataAssetID string) (*DataAsset, error)

func (*Source) GetDataProduct added in v1.6.0

func (s *Source) GetDataProduct(ctx context.Context, locationID string, dataProductID string) (*DataProduct, error)

func (*Source) GetDataProductClient added in v1.6.0

func (s *Source) GetDataProductClient() *dataplexapi.DataProductClient

func (*Source) GetDataScan added in v1.5.0

func (s *Source) GetDataScan(ctx context.Context, location, scanID string) (*dataplexpb.DataScan, error)

func (*Source) GetDataScanClient added in v1.2.0

func (s *Source) GetDataScanClient() *dataplexapi.DataScanClient

func (*Source) GetJobStatus added in v1.5.0

func (s *Source) GetJobStatus(ctx context.Context, location, scanID, jobID string) (*dataplexpb.DataScanJob, error)

func (*Source) GetOperation added in v1.5.0

func (s *Source) GetOperation(ctx context.Context, opName string) (map[string]any, error)

func (*Source) ListDataAssets added in v1.6.0

func (s *Source) ListDataAssets(
	ctx context.Context,
	locationID string,
	dataProductID string,
	filter string,
	pageSize int,
	orderBy string,
) ([]*DataAsset, error)

func (*Source) ListDataProducts added in v1.6.0

func (s *Source) ListDataProducts(
	ctx context.Context,
	filter string,
	pageSize int,
	orderBy string,
) ([]*DataProductSummary, error)

func (*Source) LookupContext

func (s *Source) LookupContext(ctx context.Context, name string, resources []string) (*dataplexpb.LookupContextResponse, error)

func (*Source) LookupEntry

func (s *Source) LookupEntry(ctx context.Context, name string, view int, aspectTypes []string, entry string) (*dataplexpb.Entry, error)

func (*Source) ProjectID

func (s *Source) ProjectID() string

func (*Source) ProjectNumber added in v1.8.0

func (s *Source) ProjectNumber() int64

func (*Source) ProjectsClient added in v1.8.0

func (s *Source) ProjectsClient() *resourcemanager.ProjectsClient

func (*Source) SearchAspectTypes

func (s *Source) SearchAspectTypes(ctx context.Context, query string, pageSize int, orderBy string) ([]*dataplexpb.AspectType, error)

func (*Source) SearchDataQualityScans added in v1.2.0

func (s *Source) SearchDataQualityScans(ctx context.Context, filter string, pageSize int, orderBy string) ([]*dataplexpb.DataScan, error)

func (*Source) SearchEntries

func (s *Source) SearchEntries(ctx context.Context, query string, pageSize int, orderBy string, scope string) ([]*dataplexpb.SearchEntriesResult, error)

func (*Source) SourceType

func (s *Source) SourceType() string

func (*Source) ToConfig

func (s *Source) ToConfig() sources.SourceConfig

func (*Source) UpdateDataAsset added in v1.7.0

func (s *Source) UpdateDataAsset(
	ctx context.Context,
	locationID string,
	dataProductID string,
	dataAssetID string,
	labels map[string]string,
	accessGroupConfigs map[string][]string,
	updateMask []string,
) (map[string]string, error)

func (*Source) UpdateDataProduct added in v1.7.0

func (s *Source) UpdateDataProduct(
	ctx context.Context,
	locationID string,
	dataProductID string,
	description string,
	displayName string,
	ownerEmails []string,
	accessGroups []AccessGroup,
	updateMask []string,
) (map[string]string, error)

func (*Source) UpdateEntry added in v1.8.0

func (s *Source) UpdateEntry(ctx context.Context, entry *dataplexpb.Entry, updateMask *fieldmaskpb.FieldMask) (*dataplexpb.Entry, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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