translation

package
v0.0.0-...-6b3ec00 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TranslationTaskDetails_FileEncoding_name = map[int32]string{
		0: "FILE_ENCODING_UNSPECIFIED",
		1: "UTF_8",
		2: "ISO_8859_1",
		3: "US_ASCII",
		4: "UTF_16",
		5: "UTF_16LE",
		6: "UTF_16BE",
	}
	TranslationTaskDetails_FileEncoding_value = map[string]int32{
		"FILE_ENCODING_UNSPECIFIED": 0,
		"UTF_8":                     1,
		"ISO_8859_1":                2,
		"US_ASCII":                  3,
		"UTF_16":                    4,
		"UTF_16LE":                  5,
		"UTF_16BE":                  6,
	}
)

Enum value maps for TranslationTaskDetails_FileEncoding.

View Source
var (
	TranslationTaskDetails_TokenType_name = map[int32]string{
		0: "TOKEN_TYPE_UNSPECIFIED",
		1: "STRING",
		2: "INT64",
		3: "NUMERIC",
		4: "BOOL",
		5: "FLOAT64",
		6: "DATE",
		7: "TIMESTAMP",
	}
	TranslationTaskDetails_TokenType_value = map[string]int32{
		"TOKEN_TYPE_UNSPECIFIED": 0,
		"STRING":                 1,
		"INT64":                  2,
		"NUMERIC":                3,
		"BOOL":                   4,
		"FLOAT64":                5,
		"DATE":                   6,
		"TIMESTAMP":              7,
	}
)

Enum value maps for TranslationTaskDetails_TokenType.

View Source
var (
	IdentifierSettings_IdentifierCase_name = map[int32]string{
		0: "IDENTIFIER_CASE_UNSPECIFIED",
		1: "ORIGINAL",
		2: "UPPER",
		3: "LOWER",
	}
	IdentifierSettings_IdentifierCase_value = map[string]int32{
		"IDENTIFIER_CASE_UNSPECIFIED": 0,
		"ORIGINAL":                    1,
		"UPPER":                       2,
		"LOWER":                       3,
	}
)

Enum value maps for IdentifierSettings_IdentifierCase.

View Source
var (
	IdentifierSettings_IdentifierRewriteMode_name = map[int32]string{
		0: "IDENTIFIER_REWRITE_MODE_UNSPECIFIED",
		1: "NONE",
		2: "REWRITE_ALL",
	}
	IdentifierSettings_IdentifierRewriteMode_value = map[string]int32{
		"IDENTIFIER_REWRITE_MODE_UNSPECIFIED": 0,
		"NONE":                                1,
		"REWRITE_ALL":                         2,
	}
)

Enum value maps for IdentifierSettings_IdentifierRewriteMode.

View Source
var File_google_cloud_bigquery_migration_tasks_translation_v2alpha_dataset_reference_proto protoreflect.FileDescriptor
View Source
var File_google_cloud_bigquery_migration_tasks_translation_v2alpha_translation_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type BteqOptions

type BteqOptions struct {

	// Specifies the project and dataset in BigQuery that will be used for
	// external table creation during the translation.
	ProjectDataset *DatasetReference `protobuf:"bytes,1,opt,name=project_dataset,json=projectDataset,proto3" json:"project_dataset,omitempty"`
	// The Cloud Storage location to be used as the default path for files that
	// are not otherwise specified in the file replacement map.
	DefaultPathUri string `protobuf:"bytes,2,opt,name=default_path_uri,json=defaultPathUri,proto3" json:"default_path_uri,omitempty"`
	// Maps the local paths that are used in BTEQ scripts (the keys) to the paths
	// in Cloud Storage that should be used in their stead in the translation (the
	// value).
	FileReplacementMap map[string]string `` /* 205-byte string literal not displayed */
	// contains filtered or unexported fields
}

BTEQ translation task related settings.

func (*BteqOptions) Descriptor deprecated

func (*BteqOptions) Descriptor() ([]byte, []int)

Deprecated: Use BteqOptions.ProtoReflect.Descriptor instead.

func (*BteqOptions) GetDefaultPathUri

func (x *BteqOptions) GetDefaultPathUri() string

func (*BteqOptions) GetFileReplacementMap

func (x *BteqOptions) GetFileReplacementMap() map[string]string

func (*BteqOptions) GetProjectDataset

func (x *BteqOptions) GetProjectDataset() *DatasetReference

func (*BteqOptions) ProtoMessage

func (*BteqOptions) ProtoMessage()

func (*BteqOptions) ProtoReflect

func (x *BteqOptions) ProtoReflect() protoreflect.Message

func (*BteqOptions) Reset

func (x *BteqOptions) Reset()

func (*BteqOptions) String

func (x *BteqOptions) String() string

type DatasetReference

type DatasetReference struct {

	// Required. A unique ID for this dataset, without the project name. The ID
	// must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_).
	// The maximum length is 1,024 characters.
	DatasetId string `protobuf:"bytes,1,opt,name=dataset_id,json=datasetId,proto3" json:"dataset_id,omitempty"`
	// Optional. The ID of the project containing this dataset.
	ProjectId string `protobuf:"bytes,2,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
	// contains filtered or unexported fields
}

func (*DatasetReference) Descriptor deprecated

func (*DatasetReference) Descriptor() ([]byte, []int)

Deprecated: Use DatasetReference.ProtoReflect.Descriptor instead.

func (*DatasetReference) GetDatasetId

func (x *DatasetReference) GetDatasetId() string

func (*DatasetReference) GetProjectId

func (x *DatasetReference) GetProjectId() string

func (*DatasetReference) ProtoMessage

func (*DatasetReference) ProtoMessage()

func (*DatasetReference) ProtoReflect

func (x *DatasetReference) ProtoReflect() protoreflect.Message

func (*DatasetReference) Reset

func (x *DatasetReference) Reset()

func (*DatasetReference) String

func (x *DatasetReference) String() string

type Filter

type Filter struct {

	// The list of prefixes used to exclude processing for input files.
	InputFileExclusionPrefixes []string `` /* 143-byte string literal not displayed */
	// contains filtered or unexported fields
}

The filter applied to fields of translation details.

func (*Filter) Descriptor deprecated

func (*Filter) Descriptor() ([]byte, []int)

Deprecated: Use Filter.ProtoReflect.Descriptor instead.

func (*Filter) GetInputFileExclusionPrefixes

func (x *Filter) GetInputFileExclusionPrefixes() []string

func (*Filter) ProtoMessage

func (*Filter) ProtoMessage()

func (*Filter) ProtoReflect

func (x *Filter) ProtoReflect() protoreflect.Message

func (*Filter) Reset

func (x *Filter) Reset()

func (*Filter) String

func (x *Filter) String() string

type IdentifierSettings

type IdentifierSettings struct {

	// The setting to control output queries' identifier case.
	OutputIdentifierCase IdentifierSettings_IdentifierCase `` /* 221-byte string literal not displayed */
	// Specifies the rewrite mode for SQL identifiers.
	IdentifierRewriteMode IdentifierSettings_IdentifierRewriteMode `` /* 231-byte string literal not displayed */
	// contains filtered or unexported fields
}

Settings related to SQL identifiers.

func (*IdentifierSettings) Descriptor deprecated

func (*IdentifierSettings) Descriptor() ([]byte, []int)

Deprecated: Use IdentifierSettings.ProtoReflect.Descriptor instead.

func (*IdentifierSettings) GetIdentifierRewriteMode

func (x *IdentifierSettings) GetIdentifierRewriteMode() IdentifierSettings_IdentifierRewriteMode

func (*IdentifierSettings) GetOutputIdentifierCase

func (x *IdentifierSettings) GetOutputIdentifierCase() IdentifierSettings_IdentifierCase

func (*IdentifierSettings) ProtoMessage

func (*IdentifierSettings) ProtoMessage()

func (*IdentifierSettings) ProtoReflect

func (x *IdentifierSettings) ProtoReflect() protoreflect.Message

func (*IdentifierSettings) Reset

func (x *IdentifierSettings) Reset()

func (*IdentifierSettings) String

func (x *IdentifierSettings) String() string

type IdentifierSettings_IdentifierCase

type IdentifierSettings_IdentifierCase int32

The identifier case type.

const (
	// The identifier case is not specified.
	IdentifierSettings_IDENTIFIER_CASE_UNSPECIFIED IdentifierSettings_IdentifierCase = 0
	// Identifiers' cases will be kept as the original cases.
	IdentifierSettings_ORIGINAL IdentifierSettings_IdentifierCase = 1
	// Identifiers will be in upper cases.
	IdentifierSettings_UPPER IdentifierSettings_IdentifierCase = 2
	// Identifiers will be in lower cases.
	IdentifierSettings_LOWER IdentifierSettings_IdentifierCase = 3
)

func (IdentifierSettings_IdentifierCase) Descriptor

func (IdentifierSettings_IdentifierCase) Enum

func (IdentifierSettings_IdentifierCase) EnumDescriptor deprecated

func (IdentifierSettings_IdentifierCase) EnumDescriptor() ([]byte, []int)

Deprecated: Use IdentifierSettings_IdentifierCase.Descriptor instead.

func (IdentifierSettings_IdentifierCase) Number

func (IdentifierSettings_IdentifierCase) String

func (IdentifierSettings_IdentifierCase) Type

type IdentifierSettings_IdentifierRewriteMode

type IdentifierSettings_IdentifierRewriteMode int32

The SQL identifier rewrite mode.

const (
	// SQL Identifier rewrite mode is unspecified.
	IdentifierSettings_IDENTIFIER_REWRITE_MODE_UNSPECIFIED IdentifierSettings_IdentifierRewriteMode = 0
	// SQL identifiers won't be rewrite.
	IdentifierSettings_NONE IdentifierSettings_IdentifierRewriteMode = 1
	// All SQL identifiers will be rewrite.
	IdentifierSettings_REWRITE_ALL IdentifierSettings_IdentifierRewriteMode = 2
)

func (IdentifierSettings_IdentifierRewriteMode) Descriptor

func (IdentifierSettings_IdentifierRewriteMode) Enum

func (IdentifierSettings_IdentifierRewriteMode) EnumDescriptor deprecated

func (IdentifierSettings_IdentifierRewriteMode) EnumDescriptor() ([]byte, []int)

Deprecated: Use IdentifierSettings_IdentifierRewriteMode.Descriptor instead.

func (IdentifierSettings_IdentifierRewriteMode) Number

func (IdentifierSettings_IdentifierRewriteMode) String

func (IdentifierSettings_IdentifierRewriteMode) Type

type TeradataOptions

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

Teradata SQL specific translation task related settings.

func (*TeradataOptions) Descriptor deprecated

func (*TeradataOptions) Descriptor() ([]byte, []int)

Deprecated: Use TeradataOptions.ProtoReflect.Descriptor instead.

func (*TeradataOptions) ProtoMessage

func (*TeradataOptions) ProtoMessage()

func (*TeradataOptions) ProtoReflect

func (x *TeradataOptions) ProtoReflect() protoreflect.Message

func (*TeradataOptions) Reset

func (x *TeradataOptions) Reset()

func (*TeradataOptions) String

func (x *TeradataOptions) String() string

type TranslationFileMapping

type TranslationFileMapping struct {

	// The Cloud Storage path for a file to translation in a subtask.
	InputPath string `protobuf:"bytes,1,opt,name=input_path,json=inputPath,proto3" json:"input_path,omitempty"`
	// The Cloud Storage path to write back the corresponding input file to.
	OutputPath string `protobuf:"bytes,2,opt,name=output_path,json=outputPath,proto3" json:"output_path,omitempty"`
	// contains filtered or unexported fields
}

Mapping between an input and output file to be translated in a subtask.

func (*TranslationFileMapping) Descriptor deprecated

func (*TranslationFileMapping) Descriptor() ([]byte, []int)

Deprecated: Use TranslationFileMapping.ProtoReflect.Descriptor instead.

func (*TranslationFileMapping) GetInputPath

func (x *TranslationFileMapping) GetInputPath() string

func (*TranslationFileMapping) GetOutputPath

func (x *TranslationFileMapping) GetOutputPath() string

func (*TranslationFileMapping) ProtoMessage

func (*TranslationFileMapping) ProtoMessage()

func (*TranslationFileMapping) ProtoReflect

func (x *TranslationFileMapping) ProtoReflect() protoreflect.Message

func (*TranslationFileMapping) Reset

func (x *TranslationFileMapping) Reset()

func (*TranslationFileMapping) String

func (x *TranslationFileMapping) String() string

type TranslationTaskDetails

type TranslationTaskDetails struct {

	// The Cloud Storage path for translation input files.
	InputPath string `protobuf:"bytes,1,opt,name=input_path,json=inputPath,proto3" json:"input_path,omitempty"`
	// The Cloud Storage path for translation output files.
	OutputPath string `protobuf:"bytes,2,opt,name=output_path,json=outputPath,proto3" json:"output_path,omitempty"`
	// Cloud Storage files to be processed for translation.
	FilePaths []*TranslationFileMapping `protobuf:"bytes,12,rep,name=file_paths,json=filePaths,proto3" json:"file_paths,omitempty"`
	// The Cloud Storage path to DDL files as table schema to assist semantic
	// translation.
	SchemaPath string `protobuf:"bytes,3,opt,name=schema_path,json=schemaPath,proto3" json:"schema_path,omitempty"`
	// The file encoding type.
	FileEncoding TranslationTaskDetails_FileEncoding `` /* 197-byte string literal not displayed */
	// The settings for SQL identifiers.
	IdentifierSettings *IdentifierSettings `protobuf:"bytes,5,opt,name=identifier_settings,json=identifierSettings,proto3" json:"identifier_settings,omitempty"`
	// The map capturing special tokens to be replaced during translation. The key
	// is special token in string. The value is the token data type. This is used
	// to translate SQL query template which contains special token as place
	// holder. The special token makes a query invalid to parse. This map will be
	// applied to annotate those special token with types to let parser understand
	// how to parse them into proper structure with type information.
	SpecialTokenMap map[string]TranslationTaskDetails_TokenType `` /* 293-byte string literal not displayed */
	// The filter applied to translation details.
	Filter *Filter `protobuf:"bytes,7,opt,name=filter,proto3" json:"filter,omitempty"`
	// The language specific settings for the translation task.
	//
	// Types that are assignable to LanguageOptions:
	//	*TranslationTaskDetails_TeradataOptions
	//	*TranslationTaskDetails_BteqOptions
	LanguageOptions isTranslationTaskDetails_LanguageOptions `protobuf_oneof:"language_options"`
	// Specifies the exact name of the bigquery table ("dataset.table") to be used
	// for surfacing raw translation errors. If the table does not exist, we will
	// create it. If it already exists and the schema is the same, we will re-use.
	// If the table exists and the schema is different, we will throw an error.
	TranslationExceptionTable string `` /* 139-byte string literal not displayed */
	// contains filtered or unexported fields
}

The translation task details to capture necessary settings for a translation task and subtask.

func (*TranslationTaskDetails) Descriptor deprecated

func (*TranslationTaskDetails) Descriptor() ([]byte, []int)

Deprecated: Use TranslationTaskDetails.ProtoReflect.Descriptor instead.

func (*TranslationTaskDetails) GetBteqOptions

func (x *TranslationTaskDetails) GetBteqOptions() *BteqOptions

func (*TranslationTaskDetails) GetFileEncoding

func (*TranslationTaskDetails) GetFilePaths

func (x *TranslationTaskDetails) GetFilePaths() []*TranslationFileMapping

func (*TranslationTaskDetails) GetFilter

func (x *TranslationTaskDetails) GetFilter() *Filter

func (*TranslationTaskDetails) GetIdentifierSettings

func (x *TranslationTaskDetails) GetIdentifierSettings() *IdentifierSettings

func (*TranslationTaskDetails) GetInputPath

func (x *TranslationTaskDetails) GetInputPath() string

func (*TranslationTaskDetails) GetLanguageOptions

func (m *TranslationTaskDetails) GetLanguageOptions() isTranslationTaskDetails_LanguageOptions

func (*TranslationTaskDetails) GetOutputPath

func (x *TranslationTaskDetails) GetOutputPath() string

func (*TranslationTaskDetails) GetSchemaPath

func (x *TranslationTaskDetails) GetSchemaPath() string

func (*TranslationTaskDetails) GetSpecialTokenMap

func (*TranslationTaskDetails) GetTeradataOptions

func (x *TranslationTaskDetails) GetTeradataOptions() *TeradataOptions

func (*TranslationTaskDetails) GetTranslationExceptionTable

func (x *TranslationTaskDetails) GetTranslationExceptionTable() string

func (*TranslationTaskDetails) ProtoMessage

func (*TranslationTaskDetails) ProtoMessage()

func (*TranslationTaskDetails) ProtoReflect

func (x *TranslationTaskDetails) ProtoReflect() protoreflect.Message

func (*TranslationTaskDetails) Reset

func (x *TranslationTaskDetails) Reset()

func (*TranslationTaskDetails) String

func (x *TranslationTaskDetails) String() string

type TranslationTaskDetails_BteqOptions

type TranslationTaskDetails_BteqOptions struct {
	// The BTEQ specific settings for the translation task.
	BteqOptions *BteqOptions `protobuf:"bytes,11,opt,name=bteq_options,json=bteqOptions,proto3,oneof"`
}

type TranslationTaskDetails_FileEncoding

type TranslationTaskDetails_FileEncoding int32

The file encoding types.

const (
	// File encoding setting is not specified.
	TranslationTaskDetails_FILE_ENCODING_UNSPECIFIED TranslationTaskDetails_FileEncoding = 0
	// File encoding is UTF_8.
	TranslationTaskDetails_UTF_8 TranslationTaskDetails_FileEncoding = 1
	// File encoding is ISO_8859_1.
	TranslationTaskDetails_ISO_8859_1 TranslationTaskDetails_FileEncoding = 2
	// File encoding is US_ASCII.
	TranslationTaskDetails_US_ASCII TranslationTaskDetails_FileEncoding = 3
	// File encoding is UTF_16.
	TranslationTaskDetails_UTF_16 TranslationTaskDetails_FileEncoding = 4
	// File encoding is UTF_16LE.
	TranslationTaskDetails_UTF_16LE TranslationTaskDetails_FileEncoding = 5
	// File encoding is UTF_16BE.
	TranslationTaskDetails_UTF_16BE TranslationTaskDetails_FileEncoding = 6
)

func (TranslationTaskDetails_FileEncoding) Descriptor

func (TranslationTaskDetails_FileEncoding) Enum

func (TranslationTaskDetails_FileEncoding) EnumDescriptor deprecated

func (TranslationTaskDetails_FileEncoding) EnumDescriptor() ([]byte, []int)

Deprecated: Use TranslationTaskDetails_FileEncoding.Descriptor instead.

func (TranslationTaskDetails_FileEncoding) Number

func (TranslationTaskDetails_FileEncoding) String

func (TranslationTaskDetails_FileEncoding) Type

type TranslationTaskDetails_TeradataOptions

type TranslationTaskDetails_TeradataOptions struct {
	// The Teradata SQL specific settings for the translation task.
	TeradataOptions *TeradataOptions `protobuf:"bytes,10,opt,name=teradata_options,json=teradataOptions,proto3,oneof"`
}

type TranslationTaskDetails_TokenType

type TranslationTaskDetails_TokenType int32

The special token data type.

const (
	// Token type is not specified.
	TranslationTaskDetails_TOKEN_TYPE_UNSPECIFIED TranslationTaskDetails_TokenType = 0
	// Token type as string.
	TranslationTaskDetails_STRING TranslationTaskDetails_TokenType = 1
	// Token type as integer.
	TranslationTaskDetails_INT64 TranslationTaskDetails_TokenType = 2
	// Token type as numeric.
	TranslationTaskDetails_NUMERIC TranslationTaskDetails_TokenType = 3
	// Token type as boolean.
	TranslationTaskDetails_BOOL TranslationTaskDetails_TokenType = 4
	// Token type as float.
	TranslationTaskDetails_FLOAT64 TranslationTaskDetails_TokenType = 5
	// Token type as date.
	TranslationTaskDetails_DATE TranslationTaskDetails_TokenType = 6
	// Token type as timestamp.
	TranslationTaskDetails_TIMESTAMP TranslationTaskDetails_TokenType = 7
)

func (TranslationTaskDetails_TokenType) Descriptor

func (TranslationTaskDetails_TokenType) Enum

func (TranslationTaskDetails_TokenType) EnumDescriptor deprecated

func (TranslationTaskDetails_TokenType) EnumDescriptor() ([]byte, []int)

Deprecated: Use TranslationTaskDetails_TokenType.Descriptor instead.

func (TranslationTaskDetails_TokenType) Number

func (TranslationTaskDetails_TokenType) String

func (TranslationTaskDetails_TokenType) Type

Jump to

Keyboard shortcuts

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