Documentation ¶
Index ¶
- func IsIcebergErrorType(err error, typ IcebergErrorType) bool
- type CatalogConfig
- type CatalogREST
- func (c *CatalogREST) CreateNamespace(ctx context.Context, namespace iceberg.Namespace, ...) (iceberg.Namespace, iceberg.Properties, error)
- func (c *CatalogREST) CreateTable(ctx context.Context, tableId iceberg.TableIdentifier, location *string, ...) (table iceberg.Table, metadataLocation string, tableConfig iceberg.Properties, ...)
- func (c *CatalogREST) DropNamespace(ctx context.Context, namespace iceberg.Namespace) error
- func (c *CatalogREST) DropTable(ctx context.Context, tableId iceberg.TableIdentifier, ...) error
- func (c *CatalogREST) ListNamespaces(ctx context.Context, parent iceberg.Namespace) ([]iceberg.Namespace, error)
- func (c *CatalogREST) ListTables(ctx context.Context, namespace iceberg.Namespace) ([]iceberg.TableIdentifier, error)
- func (c *CatalogREST) LoadNamespaceMetadata(ctx context.Context, namespace iceberg.Namespace) (iceberg.Namespace, iceberg.Properties, error)
- func (c *CatalogREST) LoadTable(ctx context.Context, tableId iceberg.TableIdentifier, ...) (table iceberg.Table, metadataLocation string, tableConfig iceberg.Properties, ...)
- func (c *CatalogREST) Properties() map[string]string
- func (c *CatalogREST) RenameTable(ctx context.Context, source, destination iceberg.TableIdentifier) error
- func (c *CatalogREST) ReportMetrics() error
- func (c *CatalogREST) TableExists(ctx context.Context, tableId iceberg.TableIdentifier) (bool, error)
- func (c *CatalogREST) UpdateNamespaceProperties(ctx context.Context, namespace iceberg.Namespace, ...) (updated []string, removed []string, missing []string, err error)
- type CreateNamespaceRequest
- type CreateNamespaceResponse
- type CreateTableRequest
- type GetNamespaceResponse
- type IcebergError
- type IcebergErrorType
- type ListNamespacesResponse
- type ListTablesResponse
- type LoadTableResult
- type RenameTableRequest
- type UpdateNamespacePropertiesRequest
- type UpdateNamespacePropertiesResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsIcebergErrorType ¶
func IsIcebergErrorType(err error, typ IcebergErrorType) bool
Types ¶
type CatalogConfig ¶
type CatalogConfig struct { Overrides iceberg.Properties `json:"overrides"` Defaults iceberg.Properties `json:"defaults"` }
type CatalogREST ¶
type CatalogREST struct {
// contains filtered or unexported fields
}
func NewCatalogREST ¶
func NewCatalogREST(ctx context.Context, baseURL, authToken, warehouse string, clientCatalogProperties map[string]string, logger *zap.Logger) (*CatalogREST, error)
NewCatalogREST connects to a REST Catalog service and returns a Catalog client. The authToken string is either a client secret or a client ID and secret separated by a colon. The properties map contains properties described: https://iceberg.apache.org/docs/1.3.0/configuration/#catalog-properties The returned client is not valid beyond the lifetime of the provided context.
func (*CatalogREST) CreateNamespace ¶
func (c *CatalogREST) CreateNamespace(ctx context.Context, namespace iceberg.Namespace, properties iceberg.Properties) (iceberg.Namespace, iceberg.Properties, error)
func (*CatalogREST) CreateTable ¶
func (c *CatalogREST) CreateTable( ctx context.Context, tableId iceberg.TableIdentifier, location *string, schema iceberg.SchemaV2, partitionSpec *iceberg.PartitionSpecV2, writeOrder *iceberg.SortOrder, stageCreate *bool, properties *iceberg.Properties, ) ( table iceberg.Table, metadataLocation string, tableConfig iceberg.Properties, err error, )
func (*CatalogREST) DropNamespace ¶
func (*CatalogREST) DropTable ¶
func (c *CatalogREST) DropTable(ctx context.Context, tableId iceberg.TableIdentifier, purgeDataAndMetadata bool) error
func (*CatalogREST) ListNamespaces ¶
func (*CatalogREST) ListTables ¶
func (c *CatalogREST) ListTables(ctx context.Context, namespace iceberg.Namespace) ([]iceberg.TableIdentifier, error)
func (*CatalogREST) LoadNamespaceMetadata ¶
func (c *CatalogREST) LoadNamespaceMetadata(ctx context.Context, namespace iceberg.Namespace) (iceberg.Namespace, iceberg.Properties, error)
func (*CatalogREST) LoadTable ¶
func (c *CatalogREST) LoadTable(ctx context.Context, tableId iceberg.TableIdentifier, onlyReferencedSnapshots *bool) ( table iceberg.Table, metadataLocation string, tableConfig iceberg.Properties, err error, )
func (*CatalogREST) Properties ¶
func (c *CatalogREST) Properties() map[string]string
func (*CatalogREST) RenameTable ¶
func (c *CatalogREST) RenameTable(ctx context.Context, source, destination iceberg.TableIdentifier) error
func (*CatalogREST) ReportMetrics ¶
func (c *CatalogREST) ReportMetrics() error
func (*CatalogREST) TableExists ¶
func (c *CatalogREST) TableExists(ctx context.Context, tableId iceberg.TableIdentifier) (bool, error)
func (*CatalogREST) UpdateNamespaceProperties ¶
type CreateNamespaceRequest ¶
type CreateNamespaceRequest struct { Namespace iceberg.Namespace `json:"namespace"` Properties iceberg.Properties `json:"properties"` }
type CreateNamespaceResponse ¶
type CreateNamespaceResponse CreateNamespaceRequest
type CreateTableRequest ¶
type CreateTableRequest struct { Name string `json:"name"` Location *string `json:"location,omitempty"` Schema *iceberg.SchemaV2 `json:"schema"` // pointer for json.Marshaller PartitionSpec *iceberg.PartitionSpecV2 `json:"partition-spec,omitempty"` WriteOrder *iceberg.SortOrder `json:"write-order,omitempty"` StageCreate *bool `json:"stage-create,omitempty"` Properties *iceberg.Properties `json:"properties,omitempty"` }
type GetNamespaceResponse ¶
type GetNamespaceResponse CreateNamespaceRequest
type IcebergError ¶
type IcebergError struct { ModelError struct { Message string `json:"message"` Type IcebergErrorType `json:"type"` Code int `json:"code"` Stack []string `json:"stack"` } `json:"error"` }
func (*IcebergError) Error ¶
func (e *IcebergError) Error() string
type IcebergErrorType ¶
type IcebergErrorType string
const ( ErrorBadRequest IcebergErrorType = "BadRequestException" ErrorNotAuthorized IcebergErrorType = "NotAuthorizedException" ErrorForbidden IcebergErrorType = "ForbiddenException" ErrorNoSuchX IcebergErrorType = "NotFoundException" ErrorUnsupportedOperation IcebergErrorType = "UnsupportedOperationException" ErrorAlreadyExists IcebergErrorType = "AlreadyExistsException" ErrorAuthenticationTimeout IcebergErrorType = "AuthenticationTimeoutException" ErrorRESTException IcebergErrorType = "RESTException" ErrorInternalServerError IcebergErrorType = "InternalServerError" ErrorSlowDown IcebergErrorType = "SlowDownException" )
type ListNamespacesResponse ¶
type ListTablesResponse ¶
type ListTablesResponse struct {
Identifiers []iceberg.TableIdentifier `json:"identifiers"`
}
type LoadTableResult ¶
type LoadTableResult struct { MetadataLocation *string `json:"metadata-location,omitempty"` Metadata iceberg.TableMetadata `json:"metadata"` Config iceberg.Properties `json:"config"` }
type RenameTableRequest ¶
type RenameTableRequest struct { Source iceberg.TableIdentifier `json:"source"` Destination iceberg.TableIdentifier `json:"destination"` }
type UpdateNamespacePropertiesRequest ¶
type UpdateNamespacePropertiesRequest struct { Removals []string `json:"removals"` Updates iceberg.Properties `json:"updates"` }
Click to show internal directories.
Click to hide internal directories.