datamart

package
v0.1.0-beta.5 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientFactory

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

ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.

func NewClientFactory

func NewClientFactory(credential azcore.TokenCredential, endpoint *string, options *azcore.ClientOptions) (*ClientFactory, error)

NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • endpoint - pass nil to accept the default values.
  • options - pass nil to accept the default values.

func NewClientFactoryWithClient

func NewClientFactoryWithClient(client fabric.Client) *ClientFactory

NewClientFactoryWithClient creates a new instance of ClientFactory with sharable Client. The Client will be propagated to any client created from this factory.

  • client - Client created in the containing module: github.com/microsoft/fabric-sdk-go/fabric

func (*ClientFactory) NewItemsClient

func (c *ClientFactory) NewItemsClient() *ItemsClient

NewItemsClient creates a new instance of ItemsClient.

type Datamart

type Datamart struct {
	// REQUIRED; The item type.
	Type *ItemType

	// The item description.
	Description *string

	// The item display name.
	DisplayName *string

	// READ-ONLY; The item ID.
	ID *string

	// READ-ONLY; The workspace ID.
	WorkspaceID *string
}

Datamart - A datamart object.

func (Datamart) MarshalJSON

func (d Datamart) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Datamart.

func (*Datamart) UnmarshalJSON

func (d *Datamart) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Datamart.

type Datamarts

type Datamarts struct {
	// REQUIRED; A list of datamarts.
	Value []Datamart

	// The token for the next result set batch. If there are no more records, it's removed from the response.
	ContinuationToken *string

	// The URI of the next result set batch. If there are no more records, it's removed from the response.
	ContinuationURI *string
}

Datamarts - A list of datamarts.

func (Datamarts) MarshalJSON

func (d Datamarts) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Datamarts.

func (*Datamarts) UnmarshalJSON

func (d *Datamarts) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Datamarts.

type ItemType

type ItemType string

ItemType - The type of the item. Additional item types may be added over time.

const (
	// ItemTypeDashboard - PowerBI dashboard.
	ItemTypeDashboard ItemType = "Dashboard"
	// ItemTypeDataPipeline - A data pipeline.
	ItemTypeDataPipeline ItemType = "DataPipeline"
	// ItemTypeDatamart - PowerBI datamart.
	ItemTypeDatamart ItemType = "Datamart"
	// ItemTypeEnvironment - An environment.
	ItemTypeEnvironment ItemType = "Environment"
	// ItemTypeEventhouse - An eventhouse.
	ItemTypeEventhouse ItemType = "Eventhouse"
	// ItemTypeEventstream - An eventstream.
	ItemTypeEventstream ItemType = "Eventstream"
	// ItemTypeKQLDashboard - A KQL dashboard.
	ItemTypeKQLDashboard ItemType = "KQLDashboard"
	// ItemTypeKQLDatabase - A KQL database.
	ItemTypeKQLDatabase ItemType = "KQLDatabase"
	// ItemTypeKQLQueryset - A KQL queryset.
	ItemTypeKQLQueryset ItemType = "KQLQueryset"
	// ItemTypeLakehouse - A lakehouse.
	ItemTypeLakehouse ItemType = "Lakehouse"
	// ItemTypeMLExperiment - A machine learning experiment.
	ItemTypeMLExperiment ItemType = "MLExperiment"
	// ItemTypeMLModel - A machine learning model.
	ItemTypeMLModel ItemType = "MLModel"
	// ItemTypeMirroredDatabase - A mirrored database.
	ItemTypeMirroredDatabase ItemType = "MirroredDatabase"
	// ItemTypeMirroredWarehouse - A mirrored warehouse.
	ItemTypeMirroredWarehouse ItemType = "MirroredWarehouse"
	// ItemTypeNotebook - A notebook.
	ItemTypeNotebook ItemType = "Notebook"
	// ItemTypePaginatedReport - PowerBI paginated report.
	ItemTypePaginatedReport ItemType = "PaginatedReport"
	// ItemTypeReport - PowerBI report.
	ItemTypeReport ItemType = "Report"
	// ItemTypeSQLEndpoint - An SQL endpoint.
	ItemTypeSQLEndpoint ItemType = "SQLEndpoint"
	// ItemTypeSemanticModel - PowerBI semantic model.
	ItemTypeSemanticModel ItemType = "SemanticModel"
	// ItemTypeSparkJobDefinition - A spark job definition.
	ItemTypeSparkJobDefinition ItemType = "SparkJobDefinition"
	// ItemTypeWarehouse - A warehouse.
	ItemTypeWarehouse ItemType = "Warehouse"
)

func PossibleItemTypeValues

func PossibleItemTypeValues() []ItemType

PossibleItemTypeValues returns the possible values for the ItemType const type.

type ItemsClient

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

ItemsClient contains the methods for the Items group. Don't use this type directly, use a constructor function instead.

func (*ItemsClient) ListDatamarts

func (client *ItemsClient) ListDatamarts(ctx context.Context, workspaceID string, options *ItemsClientListDatamartsOptions) ([]Datamart, error)

ListDatamarts - returns array of Datamart from all pages. This API supports pagination [/rest/api/fabric/articles/pagination].

PERMISSIONS The caller must have viewer or higher workspace role.

REQUIRED DELEGATED SCOPES Workspace.Read.All or Workspace.ReadWrite.All

MICROSOFT ENTRA SUPPORTED IDENTITIES This API supports the Microsoft identities [/rest/api/fabric/articles/identity-support] listed in this section.

| Identity | Support | |-|-| | User | Yes | | Service principal [/entra/identity-platform/app-objects-and-service-principals#service-principal-object] | No | | Managed identities [/entra/identity/managed-identities-azure-resources/overview] | No |

INTERFACE Generated from API version v1

  • workspaceID - The workspace ID.
  • options - ItemsClientListDatamartsOptions contains the optional parameters for the ItemsClient.NewListDatamartsPager method.

func (*ItemsClient) NewListDatamartsPager

func (client *ItemsClient) NewListDatamartsPager(workspaceID string, options *ItemsClientListDatamartsOptions) *runtime.Pager[ItemsClientListDatamartsResponse]

NewListDatamartsPager - This API supports pagination [/rest/api/fabric/articles/pagination]. PERMISSIONS The caller must have viewer or higher workspace role. REQUIRED DELEGATED SCOPES Workspace.Read.All or Workspace.ReadWrite.All MICROSOFT ENTRA SUPPORTED IDENTITIES This API supports the Microsoft identities [/rest/api/fabric/articles/identity-support] listed in this section. | Identity | Support | |-|-| | User | Yes | | Service principal [/entra/identity-platform/app-objects-and-service-principals#service-principal-object] | No | | Managed identities [/entra/identity/managed-identities-azure-resources/overview] | No | INTERFACE

Generated from API version v1

  • workspaceID - The workspace ID.
  • options - ItemsClientListDatamartsOptions contains the optional parameters for the ItemsClient.NewListDatamartsPager method.
Example

Generated from example definition

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"

	"github.com/microsoft/fabric-sdk-go/fabric/datamart"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := datamart.NewClientFactory(cred, nil, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewItemsClient().NewListDatamartsPager("cfafbeb1-8037-4d0c-896e-a46fb27ff229", &datamart.ItemsClientListDatamartsOptions{ContinuationToken: nil})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.Datamarts = datamart.Datamarts{
		// 	Value: []datamart.Datamart{
		// 		{
		// 			Type: to.Ptr(datamart.ItemTypeDatamart),
		// 			Description: to.Ptr("A datamart description."),
		// 			DisplayName: to.Ptr("Datamart Name 1"),
		// 			ID: to.Ptr("3546052c-ae64-4526-b1a8-52af7761426f"),
		// 			WorkspaceID: to.Ptr("cfafbeb1-8037-4d0c-896e-a46fb27ff229"),
		// 	}},
		// }
	}
}
Output:

type ItemsClientListDatamartsOptions

type ItemsClientListDatamartsOptions struct {
	// A token for retrieving the next page of results.
	ContinuationToken *string
}

ItemsClientListDatamartsOptions contains the optional parameters for the ItemsClient.NewListDatamartsPager method.

type ItemsClientListDatamartsResponse

type ItemsClientListDatamartsResponse struct {
	// A list of datamarts.
	Datamarts
}

ItemsClientListDatamartsResponse contains the response from method ItemsClient.NewListDatamartsPager.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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