Data Transfer API, gRPC: TransferService.Update
- gRPC request
- UpdateTransferRequest
- Runtime
- YcRuntime
- ShardingUploadParams
- Transformation
- Transformer
- MaskFieldTransformer
- TablesFilter
- MaskFunction
- MaskFunctionHash
- FilterColumnsTransformer
- ColumnsFilter
- RenameTablesTransformer
- RenameTable
- Table
- ReplacePrimaryKeyTransformer
- ToStringTransformer
- SharderTransformer
- TableSplitterTransformer
- FilterRowsTransformer
- operation.Operation
gRPC request
rpc Update (UpdateTransferRequest) returns (operation.Operation)
UpdateTransferRequest
{
"transfer_id": "string",
"description": "string",
"runtime": {
// Includes only one of the fields `yc_runtime`
"yc_runtime": {
"job_count": "int64",
"upload_shard_params": {
"job_count": "int64",
"process_count": "int64"
}
}
// end of the list of possible fields
},
"name": "string",
"update_mask": "google.protobuf.FieldMask",
"labels": "map<string, string>",
"transformation": {
"transformers": [
{
// Includes only one of the fields `mask_field`, `filter_columns`, `rename_tables`, `replace_primary_key`, `convert_to_string`, `sharder_transformer`, `table_splitter_transformer`, `filter_rows`
"mask_field": {
"tables": {
"include_tables": [
"string"
],
"exclude_tables": [
"string"
]
},
"columns": [
"string"
],
"function": {
// Includes only one of the fields `mask_function_hash`
"mask_function_hash": {
"user_defined_salt": "string"
}
// end of the list of possible fields
}
},
"filter_columns": {
"tables": {
"include_tables": [
"string"
],
"exclude_tables": [
"string"
]
},
"columns": {
"include_columns": [
"string"
],
"exclude_columns": [
"string"
]
}
},
"rename_tables": {
"rename_tables": [
{
"original_name": {
"name_space": "string",
"name": "string"
},
"new_name": {
"name_space": "string",
"name": "string"
}
}
]
},
"replace_primary_key": {
"tables": {
"include_tables": [
"string"
],
"exclude_tables": [
"string"
]
},
"keys": [
"string"
]
},
"convert_to_string": {
"tables": {
"include_tables": [
"string"
],
"exclude_tables": [
"string"
]
},
"columns": {
"include_columns": [
"string"
],
"exclude_columns": [
"string"
]
}
},
"sharder_transformer": {
"tables": {
"include_tables": [
"string"
],
"exclude_tables": [
"string"
]
},
"columns": {
"include_columns": [
"string"
],
"exclude_columns": [
"string"
]
},
"shards_count": "int64"
},
"table_splitter_transformer": {
"tables": {
"include_tables": [
"string"
],
"exclude_tables": [
"string"
]
},
"columns": [
"string"
],
"splitter": "string"
},
"filter_rows": {
"tables": {
"include_tables": [
"string"
],
"exclude_tables": [
"string"
]
},
"filter": "string",
"filters": [
"string"
]
}
// end of the list of possible fields
}
]
}
}
Field |
Description |
transfer_id |
string Identifier of the transfer to be updated. |
description |
string The new description for the transfer. |
runtime |
|
name |
string The new transfer name. Must be unique within the folder. |
update_mask |
Field mask specifying transfer fields to be updated. Semantics for this field is |
labels |
object (map<string, string>) |
transformation |
Runtime
Field |
Description |
yc_runtime |
Includes only one of the fields |
YcRuntime
Field |
Description |
job_count |
int64 |
upload_shard_params |
ShardingUploadParams
Field |
Description |
job_count |
int64 |
process_count |
int64 |
Transformation
Transformation is converting data using special transformer functions.
These functions are executed on a data stream, applied to each data change item,
and transform them.
A transformer can be run at both the metadata and data levels.
Data can only be transformed if the source and target are of different types.
Field |
Description |
transformers[] |
Transformers are set as a list. |
Transformer
Some transformers may have limitations and only apply to some source-target
pairs.
Field |
Description |
mask_field |
Includes only one of the fields |
filter_columns |
Includes only one of the fields |
rename_tables |
Includes only one of the fields |
replace_primary_key |
Includes only one of the fields |
convert_to_string |
Includes only one of the fields |
sharder_transformer |
Includes only one of the fields |
table_splitter_transformer |
Includes only one of the fields |
filter_rows |
Includes only one of the fields |
MaskFieldTransformer
Mask field transformer allows you to hash data
Field |
Description |
tables |
List of included and excluded tables |
columns[] |
string Specify the name of the column for data masking (a regular expression). |
function |
Mask function |
TablesFilter
Filter tables using lists of included and excluded tables.
Field |
Description |
include_tables[] |
string List of tables that will be included to transfer |
exclude_tables[] |
string List of tables that will be excluded to transfer |
MaskFunction
Mask function
Field |
Description |
mask_function_hash |
Hash mask function Includes only one of the fields |
MaskFunctionHash
Hash data using HMAC
Field |
Description |
user_defined_salt |
string This string will be used in the HMAC(sha256, salt) function applied to the |
FilterColumnsTransformer
Set up a list of table columns to transfer
Field |
Description |
tables |
List of the tables to filter using lists of included and excluded tables. |
columns |
List of the columns to transfer to the target tables using lists of included and |
ColumnsFilter
Filter columns using lists of included and excluded columns.
Field |
Description |
include_columns[] |
string List of columns that will be included to transfer |
exclude_columns[] |
string List of columns that will be excluded to transfer |
RenameTablesTransformer
Set rules for renaming tables by specifying the current names of the tables in
the source and new names for these tables in the target.
Field |
Description |
rename_tables[] |
List of renaming rules |
RenameTable
Specify rule for renaming table
Field |
Description |
original_name |
Specify the current names of the table in the source |
new_name |
Specify the new names for this table in the target |
Table
Field |
Description |
name_space |
string |
name |
string |
ReplacePrimaryKeyTransformer
Override primary keys
Field |
Description |
tables |
List of included and excluded tables |
keys[] |
string List of columns to be used as primary keys |
ToStringTransformer
Convert column values to strings
The values will be converted depending on the source type
Conversion rules are described here:
https://cloud.yandex.com/en/docs/data-transfer/concepts/data-transformation#convert-to-string
Field |
Description |
tables |
List of included and excluded tables |
columns |
List of included and excluded columns |
SharderTransformer
Set the number of shards for particular tables and a list of columns whose
values will be used for calculating a hash to determine a shard.
Field |
Description |
tables |
List of included and excluded tables |
columns |
List of included and excluded columns |
shards_count |
int64 Number of shards |
TableSplitterTransformer
A transfer splits the X table into multiple tables (X_1, X_2, ..., X_n) based on
data.
If a row was located in the X table before it was split, it is now in the X_i
table,
where i is determined by the column list and split string parameters.
Example:
If the column list has two columns, month of birth and gender, specified and the
split string states @,
information about an employee whose name is John and who was born on February
11, 1984,
from the Employees table will get to a new table named Employees@February@male.
Field |
Description |
tables |
List of included and excluded tables |
columns[] |
string Specify the columns in the tables to be partitioned. |
splitter |
string Specify the split string to be used for merging components in a new table name. |
FilterRowsTransformer
This filter only applies to transfers with queues (Logbroker or Apache Kafka®)
as a data source.
When running a transfer, only the strings meeting the specified criteria remain
in a changefeed.
Field |
Description |
tables |
List of included and excluded tables. |
filter |
string Filtering criterion. This can be comparison operators for numeric, string, and |
filters[] |
string Data is transported if it satisfies at least one of filters. Consider that there |
operation.Operation
{
"id": "string",
"description": "string",
"created_at": "google.protobuf.Timestamp",
"created_by": "string",
"modified_at": "google.protobuf.Timestamp",
"done": "bool",
"metadata": "google.protobuf.Any",
// Includes only one of the fields `error`, `response`
"error": "google.rpc.Status",
"response": "google.protobuf.Any"
// end of the list of possible fields
}
An Operation resource. For more information, see Operation.
Field |
Description |
id |
string ID of the operation. |
description |
string Description of the operation. 0-256 characters long. |
created_at |
Creation timestamp. |
created_by |
string ID of the user or service account who initiated the operation. |
modified_at |
The time when the Operation resource was last modified. |
done |
bool If the value is |
metadata |
Service-specific metadata associated with the operation. |
error |
The error result of the operation in case of failure or cancellation. Includes only one of the fields The operation result. |
response |
The normal response of the operation in case of success. Includes only one of the fields The operation result. |