Lakehouse API v1 - Package cloud.google.com/go/biglake/apiv1 (v1.4.0)

Package biglake is an auto-generated package for the Lakehouse API.

The Lakehouse API (formerly BigLake API) provides access to a serverless, fully managed, and highly available metastore that provides a single source of truth for your data lakehouse. It lets multiple engines—including Apache Spark, Google Managed Spark, Apache Flink, Trino and BigQuery—share tables and metadata for key open formats (Apache Iceberg, Apache Hive), and query the same copy of data. Plus, through the Lakehouse runtime catalog federation seamlessly unite your lakehouse ecosystem, letting Iceberg compatible engines on Google Cloud (BigQuery, Google Managed Spark) discover and analyze enterprise data across Snowflake, Databricks, and AWS Glue.

General documentation

For information that is relevant for all client libraries please reference https://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on this page includes:

Example usage

To get started with this package, create a client.

// go get cloud.google.com/go/biglake/apiv1@latest
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := biglake.NewIcebergCatalogClient(ctx)
if err != nil {
    // TODO: Handle error.
}
defer c.Close()

The client will use your default application credentials. Clients should be reused instead of created as needed. The methods of Client are safe for concurrent use by multiple goroutines. The returned client must be Closed when it is done being used.

Using the Client

The following is an example of making an API call with the newly created client, mentioned above.

req := &biglakepb.GetIcebergNamespaceRequest{
    // TODO: Fill request struct fields.
    // See https://pkg.go.dev/cloud.google.com/go/biglake/apiv1/biglakepb#GetIcebergNamespaceRequest.
}
err = c.CheckIcebergNamespaceExists(ctx, req)
if err != nil {
    // TODO: Handle error.
}

Use of Context

The ctx passed to NewIcebergCatalogClient is used for authentication requests and for creating the underlying connection, but is not used for subsequent calls. Individual methods on the client use the ctx given to them.

To close the open connection, use the Close() method.

Functions

func DefaultAuthScopes

func DefaultAuthScopes() []string

DefaultAuthScopes reports the default set of authentication scopes to use with this package.

IcebergCatalogCallOptions

type IcebergCatalogCallOptions struct {
	GetIcebergCatalogConfig     []gax.CallOption
	ListIcebergNamespaces       []gax.CallOption
	CheckIcebergNamespaceExists []gax.CallOption
	GetIcebergNamespace         []gax.CallOption
	CreateIcebergNamespace      []gax.CallOption
	DeleteIcebergNamespace      []gax.CallOption
	UpdateIcebergNamespace      []gax.CallOption
	ListIcebergTableIdentifiers []gax.CallOption
	CreateIcebergTable          []gax.CallOption
	CheckIcebergTableExists     []gax.CallOption
	DeleteIcebergTable          []gax.CallOption
	GetIcebergTable             []gax.CallOption
	LoadIcebergTableCredentials []gax.CallOption
	UpdateIcebergTable          []gax.CallOption
	RegisterIcebergTable        []gax.CallOption
	ReportIcebergTableMetrics   []gax.CallOption
	GetIcebergCatalog           []gax.CallOption
	ListIcebergCatalogs         []gax.CallOption
	DeleteIcebergCatalog        []gax.CallOption
	UpdateIcebergCatalog        []gax.CallOption
	CreateIcebergCatalog        []gax.CallOption
	FailoverIcebergCatalog      []gax.CallOption
}

IcebergCatalogCallOptions contains the retry settings for each method of IcebergCatalogClient.

IcebergCatalogClient

type IcebergCatalogClient struct {

	// The call options for this service.
	CallOptions *IcebergCatalogCallOptions
	// contains filtered or unexported fields
}

IcebergCatalogClient is a client for interacting with Lakehouse API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

Lakehouse runtime catalog supports the following catalog management methods:

GetIcebergCatalog

ListIcebergCatalogs

DeleteIcebergCatalog

UpdateIcebergCatalog

CreateIcebergCatalog

FailoverIcebergCatalog

func NewIcebergCatalogClient

func NewIcebergCatalogClient(ctx context.Context, opts ...option.ClientOption) (*IcebergCatalogClient, error)

NewIcebergCatalogClient creates a new iceberg catalog service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.

Lakehouse runtime catalog supports the following catalog management methods:

GetIcebergCatalog

ListIcebergCatalogs

DeleteIcebergCatalog

UpdateIcebergCatalog

CreateIcebergCatalog

FailoverIcebergCatalog

Example

package main

import (
	"context"

	biglake "cloud.google.com/go/biglake/apiv1"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := biglake.NewIcebergCatalogClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func NewIcebergCatalogRESTClient

func NewIcebergCatalogRESTClient(ctx context.Context, opts ...option.ClientOption) (*IcebergCatalogClient, error)

NewIcebergCatalogRESTClient creates a new iceberg catalog service rest client.

Lakehouse runtime catalog supports the following catalog management methods:

GetIcebergCatalog

ListIcebergCatalogs

DeleteIcebergCatalog

UpdateIcebergCatalog

CreateIcebergCatalog

FailoverIcebergCatalog

Example

package main

import (
	"context"

	biglake "cloud.google.com/go/biglake/apiv1"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := biglake.NewIcebergCatalogRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*IcebergCatalogClient) CheckIcebergNamespaceExists

func (c *IcebergCatalogClient) CheckIcebergNamespaceExists(ctx context.Context, req *biglakepb.GetIcebergNamespaceRequest, opts ...gax.CallOption) error

CheckIcebergNamespaceExists returns 204 if the namespace exists, 404 otherwise.

Example

package main

import (
	"context"

	biglake "cloud.google.com/go/biglake/apiv1"
	biglakepb "cloud.google.com/go/biglake/apiv1/biglakepb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := biglake.NewIcebergCatalogClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &biglakepb.GetIcebergNamespaceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/biglake/apiv1/biglakepb#GetIcebergNamespaceRequest.
	}
	err = c.CheckIcebergNamespaceExists(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*IcebergCatalogClient) CheckIcebergTableExists

func (c *IcebergCatalogClient) CheckIcebergTableExists(ctx context.Context, req *biglakepb.GetIcebergTableRequest, opts ...gax.CallOption) error

CheckIcebergTableExists returns 204 if the table exists, 404 otherwise. This is a HEAD HTTP method.

Example

package main

import (
	"context"

	biglake "cloud.google.com/go/biglake/apiv1"
	biglakepb "cloud.google.com/go/biglake/apiv1/biglakepb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := biglake.NewIcebergCatalogClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &biglakepb.GetIcebergTableRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/biglake/apiv1/biglakepb#GetIcebergTableRequest.
	}
	err = c.CheckIcebergTableExists(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*IcebergCatalogClient) Close

func (c *IcebergCatalogClient) Close() error

Close closes the connection to the API service. Always call Close() when the client is no longer required.

func (*IcebergCatalogClient) Connection (deprecated)

func (c *IcebergCatalogClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated: Connections are now pooled so this method does not always return the same resource.

func (*IcebergCatalogClient) CreateIcebergCatalog

CreateIcebergCatalog creates the Iceberg REST Catalog. Google Cloud Storage Bucket catalog id is the bucket for which the catalog is created (e.g. my-catalog for gs://my-catalog).

If the bucket does not exist, of the caller does not have bucket metadata permissions, the catalog will not be created.

Example

package main

import (
	"context"

	biglake "cloud.google.com/go/biglake/apiv1"
	biglakepb "cloud.google.com/go/biglake/apiv1/biglakepb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := biglake.NewIcebergCatalogClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &biglakepb.CreateIcebergCatalogRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/biglake/apiv1/biglakepb#CreateIcebergCatalogRequest.
	}
	resp, err := c.CreateIcebergCatalog(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*IcebergCatalogClient) CreateIcebergNamespace

CreateIcebergNamespace creates a namespace in the catalog.

Example

package main

import (
	"context"

	biglake "cloud.google.com/go/biglake/apiv1"
	biglakepb "cloud.google.com/go/biglake/apiv1/biglakepb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := biglake.NewIcebergCatalogClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &biglakepb.CreateIcebergNamespaceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/biglake/apiv1/biglakepb#CreateIcebergNamespaceRequest.
	}
	resp, err := c.CreateIcebergNamespace(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*IcebergCatalogClient) CreateIcebergTable

CreateIcebergTable creates a table in the namespace.

Example

package main

import (
	"context"

	biglake "cloud.google.com/go/biglake/apiv1"
	biglakepb "cloud.google.com/go/biglake/apiv1/biglakepb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := biglake.NewIcebergCatalogClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &biglakepb.CreateIcebergTableRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/biglake/apiv1/biglakepb#CreateIcebergTableRequest.
	}
	resp, err := c.CreateIcebergTable(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*IcebergCatalogClient) DeleteIcebergCatalog

func (c *IcebergCatalogClient) DeleteIcebergCatalog(ctx context.Context, req *biglakepb.DeleteIcebergCatalogRequest, opts ...gax.CallOption) error

DeleteIcebergCatalog deletes the Iceberg REST Catalog. Delete does not delete a catalog that has contents – at least one namespace.

Delete is not supported for all catalog types.

Example

package main

import (
	"context"

	biglake "cloud.google.com/go/biglake/apiv1"
	biglakepb "cloud.google.com/go/biglake/apiv1/biglakepb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := biglake.NewIcebergCatalogClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &biglakepb.DeleteIcebergCatalogRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/biglake/apiv1/biglakepb#DeleteIcebergCatalogRequest.
	}
	err = c.DeleteIcebergCatalog(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*IcebergCatalogClient) DeleteIcebergNamespace

func (c *IcebergCatalogClient) DeleteIcebergNamespace(ctx context.Context, req *biglakepb.DeleteIcebergNamespaceRequest, opts ...gax.CallOption) error

DeleteIcebergNamespace returns 204, not 200 on success.

Example

package main

import (
	"context"

	biglake "cloud.google.com/go/biglake/apiv1"
	biglakepb "cloud.google.com/go/biglake/apiv1/biglakepb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := biglake.NewIcebergCatalogClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &biglakepb.DeleteIcebergNamespaceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/biglake/apiv1/biglakepb#DeleteIcebergNamespaceRequest.
	}
	err = c.DeleteIcebergNamespace(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*IcebergCatalogClient) DeleteIcebergTable

func (c *IcebergCatalogClient) DeleteIcebergTable(ctx context.Context, req *biglakepb.DeleteIcebergTableRequest, opts ...gax.CallOption) error

DeleteIcebergTable deletes a table in the namespace.

Example

package main

import (
	"context"

	biglake "cloud.google.com/go/biglake/apiv1"
	biglakepb "cloud.google.com/go/biglake/apiv1/biglakepb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := biglake.NewIcebergCatalogClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &biglakepb.DeleteIcebergTableRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/biglake/apiv1/biglakepb#DeleteIcebergTableRequest.
	}
	err = c.DeleteIcebergTable(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*IcebergCatalogClient) FailoverIcebergCatalog

FailoverIcebergCatalog failover the catalog to a new primary replica region.

Example

package main

import (
	"context"

	biglake "cloud.google.com/go/biglake/apiv1"
	biglakepb "cloud.google.com/go/biglake/apiv1/biglakepb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := biglake.NewIcebergCatalogClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &biglakepb.FailoverIcebergCatalogRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/biglake/apiv1/biglakepb#FailoverIcebergCatalogRequest.
	}
	resp, err := c.FailoverIcebergCatalog(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*IcebergCatalogClient) GetIcebergCatalog

GetIcebergCatalog returns the Iceberg REST Catalog configuration options.

Example

package main

import (
	"context"

	biglake "cloud.google.com/go/biglake/apiv1"
	biglakepb "cloud.google.com/go/biglake/apiv1/biglakepb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := biglake.NewIcebergCatalogClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &biglakepb.GetIcebergCatalogRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/biglake/apiv1/biglakepb#GetIcebergCatalogRequest.
	}
	resp, err := c.GetIcebergCatalog(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*IcebergCatalogClient) GetIcebergCatalogConfig

GetIcebergCatalogConfig getIcebergCatalogConfig lists all catalog configuration settings. Most importantly it contains the optional endpoints field which lists what methods this catalog supports, since we are not supporting all the methods right now. It returns all the methods defined in this service (subject to project config allowlisting).

This is not a GCP resource.

Example

package main

import (
	"context"

	biglake "cloud.google.com/go/biglake/apiv1"
	biglakepb "cloud.google.com/go/biglake/apiv1/biglakepb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := biglake.NewIcebergCatalogClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &biglakepb.GetIcebergCatalogConfigRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/biglake/apiv1/biglakepb#GetIcebergCatalogConfigRequest.
	}
	resp, err := c.GetIcebergCatalogConfig(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*IcebergCatalogClient) GetIcebergNamespace

GetIcebergNamespace gets an Iceberg namespace in the catalog (or checks if it exists, if the method is HEAD).

Example

package main

import (
	"context"

	biglake "cloud.google.com/go/biglake/apiv1"
	biglakepb "cloud.google.com/go/biglake/apiv1/biglakepb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := biglake.NewIcebergCatalogClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &biglakepb.GetIcebergNamespaceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/biglake/apiv1/biglakepb#GetIcebergNamespaceRequest.
	}
	resp, err := c.GetIcebergNamespace(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*IcebergCatalogClient) GetIcebergTable

GetIcebergTable gets a table in the namespace.

Example

package main

import (
	"context"

	biglake "cloud.google.com/go/biglake/apiv1"
	biglakepb "cloud.google.com/go/biglake/apiv1/biglakepb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := biglake.NewIcebergCatalogClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &biglakepb.GetIcebergTableRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/biglake/apiv1/biglakepb#GetIcebergTableRequest.
	}
	resp, err := c.GetIcebergTable(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*IcebergCatalogClient) ListIcebergCatalogs

ListIcebergCatalogs lists the Iceberg REST Catalogs.

Examples

package main

import (
	"context"

	biglake "cloud.google.com/go/biglake/apiv1"
	biglakepb "cloud.google.com/go/biglake/apiv1/biglakepb"
	"google.golang.org/api/iterator"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := biglake.NewIcebergCatalogClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &biglakepb.ListIcebergCatalogsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/biglake/apiv1/biglakepb#ListIcebergCatalogsRequest.
	}
	it := c.ListIcebergCatalogs(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*biglakepb.ListIcebergCatalogsResponse)
	}
}
all
package main

import (
	"context"

	biglake "cloud.google.com/go/biglake/apiv1"
	biglakepb "cloud.google.com/go/biglake/apiv1/biglakepb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := biglake.NewIcebergCatalogClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &biglakepb.ListIcebergCatalogsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/biglake/apiv1/biglakepb#ListIcebergCatalogsRequest.
	}
	for resp, err := range c.ListIcebergCatalogs(ctx, req).All() {
		if err != nil {
			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*IcebergCatalogClient) ListIcebergNamespaces

ListIcebergNamespaces lists Iceberg namespaces in the catalog. We only support one level of nesting for namespaces.

Examples

package main

import (
	"context"

	biglake "cloud.google.com/go/biglake/apiv1"
	biglakepb "cloud.google.com/go/biglake/apiv1/biglakepb"
	"google.golang.org/api/iterator"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := biglake.NewIcebergCatalogClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &biglakepb.ListIcebergNamespacesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/biglake/apiv1/biglakepb#ListIcebergNamespacesRequest.
	}
	it := c.ListIcebergNamespaces(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*biglakepb.ListIcebergNamespacesResponse)
	}
}
all
package main

import (
	"context"

	biglake "cloud.google.com/go/biglake/apiv1"
	biglakepb "cloud.google.com/go/biglake/apiv1/biglakepb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := biglake.NewIcebergCatalogClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &biglakepb.ListIcebergNamespacesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/biglake/apiv1/biglakepb#ListIcebergNamespacesRequest.
	}
	for resp, err := range c.ListIcebergNamespaces(ctx, req).All() {
		if err != nil {
			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*IcebergCatalogClient) ListIcebergTableIdentifiers

ListIcebergTableIdentifiers lists table identifiers (not tables) in the namespace.

Examples

package main

import (
	"context"

	biglake "cloud.google.com/go/biglake/apiv1"
	biglakepb "cloud.google.com/go/biglake/apiv1/biglakepb"
	"google.golang.org/api/iterator"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := biglake.NewIcebergCatalogClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &biglakepb.ListIcebergTableIdentifiersRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/biglake/apiv1/biglakepb#ListIcebergTableIdentifiersRequest.
	}
	it := c.ListIcebergTableIdentifiers(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*biglakepb.ListIcebergTableIdentifiersResponse)
	}
}
all
package main

import (
	"context"

	biglake "cloud.google.com/go/biglake/apiv1"
	biglakepb "cloud.google.com/go/biglake/apiv1/biglakepb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := biglake.NewIcebergCatalogClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &biglakepb.ListIcebergTableIdentifiersRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/biglake/apiv1/biglakepb#ListIcebergTableIdentifiersRequest.
	}
	for resp, err := range c.ListIcebergTableIdentifiers(ctx, req).All() {
		if err != nil {
			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*IcebergCatalogClient) LoadIcebergTableCredentials

LoadIcebergTableCredentials loads credentials for a table in the namespace.

Example

package main

import (
	"context"

	biglake "cloud.google.com/go/biglake/apiv1"
	biglakepb "cloud.google.com/go/biglake/apiv1/biglakepb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := biglake.NewIcebergCatalogClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &biglakepb.GetIcebergTableRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/biglake/apiv1/biglakepb#GetIcebergTableRequest.
	}
	resp, err := c.LoadIcebergTableCredentials(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*IcebergCatalogClient) RegisterIcebergTable

RegisterIcebergTable register a table using given metadata file location.

Example

package main

import (
	"context"

	biglake "cloud.google.com/go/biglake/apiv1"
	biglakepb "cloud.google.com/go/biglake/apiv1/biglakepb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := biglake.NewIcebergCatalogClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &biglakepb.RegisterIcebergTableRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/biglake/apiv1/biglakepb#RegisterIcebergTableRequest.
	}
	resp, err := c.RegisterIcebergTable(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*IcebergCatalogClient) ReportIcebergTableMetrics

func (c *IcebergCatalogClient) ReportIcebergTableMetrics(ctx context.Context, req *biglakepb.ReportIcebergTableMetricsRequest, opts ...gax.CallOption) error

ReportIcebergTableMetrics reports a metrics report for a table.

Example

package main

import (
	"context"

	biglake "cloud.google.com/go/biglake/apiv1"
	biglakepb "cloud.google.com/go/biglake/apiv1/biglakepb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := biglake.NewIcebergCatalogClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &biglakepb.ReportIcebergTableMetricsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/biglake/apiv1/biglakepb#ReportIcebergTableMetricsRequest.
	}
	err = c.ReportIcebergTableMetrics(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*IcebergCatalogClient) UpdateIcebergCatalog

UpdateIcebergCatalog update the Iceberg REST Catalog configuration options.

Example

package main

import (
	"context"

	biglake "cloud.google.com/go/biglake/apiv1"
	biglakepb "cloud.google.com/go/biglake/apiv1/biglakepb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := biglake.NewIcebergCatalogClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &biglakepb.UpdateIcebergCatalogRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/biglake/apiv1/biglakepb#UpdateIcebergCatalogRequest.
	}
	resp, err := c.UpdateIcebergCatalog(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*IcebergCatalogClient) UpdateIcebergNamespace

UpdateIcebergNamespace updates namespace properties.

Example

package main

import (
	"context"

	biglake "cloud.google.com/go/biglake/apiv1"
	biglakepb "cloud.google.com/go/biglake/apiv1/biglakepb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := biglake.NewIcebergCatalogClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &biglakepb.UpdateIcebergNamespaceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/biglake/apiv1/biglakepb#UpdateIcebergNamespaceRequest.
	}
	resp, err := c.UpdateIcebergNamespace(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*IcebergCatalogClient) UpdateIcebergTable

UpdateIcebergTable this is CommitTable Iceberg API, which maps to UpdateIcebergTable in the Google API nomenclature.

Example

package main

import (
	"context"

	biglake "cloud.google.com/go/biglake/apiv1"
	biglakepb "cloud.google.com/go/biglake/apiv1/biglakepb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := biglake.NewIcebergCatalogClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &biglakepb.UpdateIcebergTableRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/biglake/apiv1/biglakepb#UpdateIcebergTableRequest.
	}
	resp, err := c.UpdateIcebergTable(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

IcebergCatalogIterator

type IcebergCatalogIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*biglakepb.IcebergCatalog, nextPageToken string, err error)
	// contains filtered or unexported fields
}

IcebergCatalogIterator manages a stream of *biglakepb.IcebergCatalog.

func (*IcebergCatalogIterator) All

func (it *IcebergCatalogIterator) All() iter.Seq2[*biglakepb.IcebergCatalog, error]

All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.

func (*IcebergCatalogIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*IcebergCatalogIterator) PageInfo

func (it *IcebergCatalogIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.

ListValueIterator

type ListValueIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*structpb.ListValue, nextPageToken string, err error)
	// contains filtered or unexported fields
}

ListValueIterator manages a stream of *structpb.ListValue.

func (*ListValueIterator) All

func (it *ListValueIterator) All() iter.Seq2[*structpb.ListValue, error]

All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.

func (*ListValueIterator) Next

func (it *ListValueIterator) Next() (*structpb.ListValue, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*ListValueIterator) PageInfo

func (it *ListValueIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.

TableIdentifierIterator

type TableIdentifierIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*biglakepb.TableIdentifier, nextPageToken string, err error)
	// contains filtered or unexported fields
}

TableIdentifierIterator manages a stream of *biglakepb.TableIdentifier.

func (*TableIdentifierIterator) All

func (it *TableIdentifierIterator) All() iter.Seq2[*biglakepb.TableIdentifier, error]

All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.

func (*TableIdentifierIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*TableIdentifierIterator) PageInfo

func (it *TableIdentifierIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.