🚧 [Experimental] Create data transfer
Creates a transfer and returns an asynchronous operation. Use getLakehouseOperation to track completion.
Request
POST
https://api.datalens.tech/rpc/createDataTransfer
Headers
|
Name |
Description |
|
x-dl-api-version |
Type: string API version header. Const: Example: |
Body
application/json
{
"collectionId": "example",
"name": "example",
"description": "example",
"labels": {},
"config": {
"source": {
"postgresConnection": {
"connectionId": "example",
"database": "example"
}
},
"destination": {
"icebergNamespace": {
"namespaceId": "example"
}
},
"type": {
"regular": {
"cronExpression": "example",
"tables": [
null
]
}
},
"tables": [
"example"
]
}
}
|
Name |
Description |
||||||||||||
|
collectionId |
Type: string ID of the DataLens collection in which to create the transfer. Min length: Example: |
||||||||||||
|
config |
Type: object
Transfer configuration. Example
|
||||||||||||
|
name |
Type: string Name of the transfer. Min length: Max length: Pattern: Example: |
||||||||||||
|
description |
Type: string Description of the transfer. Max length: Example: |
||||||||||||
|
labels |
Type: object
Transfer labels. Example
|
DataTransferSourceArgs
Exactly one source connection.
Any of 3 types
-
Type: object
postgresConnection
Type: object
connectionId
Type: string
ID of the source DataLens connection.
Min length:
1Example:
exampledatabase
Type: string
Source database name.
Min length:
1Max length:
50Example:
examplePostgreSQL source connection settings.
Example
{ "connectionId": "example", "database": "example" }Example
{ "postgresConnection": { "connectionId": "example", "database": "example" } } -
Type: object
clickhouseConnection
Type: object
connectionId
Type: string
ID of the source DataLens connection.
Min length:
1Example:
exampledatabase
Type: string
Source database name.
Min length:
1Max length:
50Example:
exampleClickHouse source connection settings.
Example
{ "connectionId": "example", "database": "example" }Example
{ "clickhouseConnection": { "connectionId": "example", "database": "example" } } -
Type: object
mysqlConnection
Type: object
connectionId
Type: string
ID of the source DataLens connection.
Min length:
1Example:
exampledatabase
Type: string
Source database name.
Min length:
1Max length:
50Example:
exampleMySQL source connection settings.
Example
{ "connectionId": "example", "database": "example" }Example
{ "mysqlConnection": { "connectionId": "example", "database": "example" } }
Example
{
"postgresConnection": {
"connectionId": "example",
"database": "example"
}
}
DataTransferIncrementalTableArgs
|
Name |
Description |
|
tableName |
Type: string Name of the source table. Min length: Example: |
|
tableNamespace |
Type: string Namespace or schema of the source table. Min length: Example: |
|
cursorColumn |
Type: string Column used to detect new and changed rows. Example: |
|
initialState |
Type: string Initial cursor value for the first transfer run. Example: |
Example
{
"tableNamespace": "example",
"tableName": "example",
"cursorColumn": "example",
"initialState": "example"
}
RegularDataTransferTypeArgs
|
Name |
Description |
||||
|
regular |
Type: object
Regular transfer settings. Example
|
Example
{
"regular": {
"cronExpression": "example",
"tables": [
{
"tableNamespace": "example",
"tableName": "example",
"cursorColumn": "example",
"initialState": "example"
}
]
}
}
OneTimeDataTransferTypeArgs
|
Name |
Description |
|
oneTime |
Type: objectOne-time transfer settings. Example
|
Example
{
"oneTime": {}
}
DataTransferTypeArgs
Exactly one transfer mode: regular or one-time.
Any of 2 types
-
Type: RegularDataTransferTypeArgs
Example
{ "regular": { "cronExpression": "example", "tables": [ { "tableNamespace": "example", "tableName": "example", "cursorColumn": "example", "initialState": "example" } ] } } -
Type: OneTimeDataTransferTypeArgs
Example
{ "oneTime": {} }
Example
{
"regular": {
"cronExpression": "example",
"tables": [
{
"tableNamespace": "example",
"tableName": "example",
"cursorColumn": "example",
"initialState": "example"
}
]
}
}
Responses
200 OK
Response
Body
application/json
{
"id": "example",
"description": "example",
"createdAt": {
"seconds": "example",
"nanos": 0.5
},
"createdBy": "example",
"modifiedAt": {
"seconds": "example",
"nanos": 0.5
},
"done": true,
"metadata": {},
"error": {
"code": 0.5,
"message": "example",
"details": [
null
]
},
"response": {}
}
|
Name |
Description |
||||||
|
done |
Type: boolean Whether the operation has completed. |
||||||
|
id |
Type: string Unique ID of the operation. Example: |
||||||
|
metadata |
Type: object
Service-specific operation metadata. Example
|
||||||
|
createdAt |
Type: object
Time when the operation was created. Example
|
||||||
|
createdBy |
Type: string ID of the operation creator. Example: |
||||||
|
description |
Type: string Description of the operation. Example: |
||||||
|
error |
Type: object
Operation error, if the operation failed. Example
|
||||||
|
modifiedAt |
Type: object
Time when the operation was last modified. Example
|
||||||
|
response |
Type: object
Service-specific operation response. Example
|