or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

connection-configuration.mdfile-management.mdindex.mdmigration-task-types.mdproject-management.mdresource-information.mdservice-management.mdservice-tasks.mdtask-execution.md

migration-task-types.mddocs/

0

# Migration Task Types

1

2

Specialized task property classes for different migration scenarios, validation operations, and database-specific migration workflows. These classes define the specific inputs, outputs, and behaviors for various migration operations.

3

4

## Capabilities

5

6

### SQL Server Migration Tasks

7

8

Task types for migrating SQL Server databases to Azure SQL Database and Azure SQL Managed Instance.

9

10

```python { .api }

11

class ConnectToSourceSqlServerTaskProperties(ProjectTaskProperties):

12

"""Test connection to SQL Server source."""

13

14

def __init__(self, input: ConnectToSourceSqlServerTaskInput, **kwargs): ...

15

16

class ConnectToTargetSqlDbTaskProperties(ProjectTaskProperties):

17

"""Test connection to Azure SQL Database target."""

18

19

def __init__(self, input: ConnectToTargetSqlDbTaskInput, **kwargs): ...

20

21

class ConnectToTargetSqlMITaskProperties(ProjectTaskProperties):

22

"""Test connection to SQL Managed Instance target."""

23

24

def __init__(self, input: ConnectToTargetSqlMITaskInput, **kwargs): ...

25

26

class GetUserTablesSqlTaskProperties(ProjectTaskProperties):

27

"""Get user tables from SQL Server source."""

28

29

def __init__(self, input: GetUserTablesSqlTaskInput, **kwargs): ...

30

31

class MigrateSqlServerSqlDbTaskProperties(ProjectTaskProperties):

32

"""Migrate SQL Server to Azure SQL Database."""

33

34

def __init__(self, input: MigrateSqlServerSqlDbTaskInput, **kwargs): ...

35

36

class MigrateSqlServerSqlMITaskProperties(ProjectTaskProperties):

37

"""Migrate SQL Server to SQL Managed Instance."""

38

39

def __init__(self, input: MigrateSqlServerSqlMITaskInput, **kwargs): ...

40

41

class MigrateSchemaSqlServerSqlDbTaskProperties(ProjectTaskProperties):

42

"""Migrate schema from SQL Server to Azure SQL Database."""

43

44

def __init__(self, input: MigrateSchemaSqlServerSqlDbTaskInput, **kwargs): ...

45

```

46

47

### MySQL Migration Tasks

48

49

Task types for migrating MySQL databases to Azure Database for MySQL.

50

51

```python { .api }

52

class ConnectToSourceMySqlTaskProperties(ProjectTaskProperties):

53

"""Test connection to MySQL source."""

54

55

def __init__(self, input: ConnectToSourceMySqlTaskInput, **kwargs): ...

56

57

class ConnectToTargetAzureDbForMySqlTaskProperties(ProjectTaskProperties):

58

"""Test connection to Azure Database for MySQL target."""

59

60

def __init__(self, input: ConnectToTargetAzureDbForMySqlTaskInput, **kwargs): ...

61

62

class GetUserTablesMySqlTaskProperties(ProjectTaskProperties):

63

"""Get user tables from MySQL source."""

64

65

def __init__(self, input: GetUserTablesMySqlTaskInput, **kwargs): ...

66

67

class MigrateMySqlAzureDbForMySqlOfflineTaskProperties(ProjectTaskProperties):

68

"""Offline migration from MySQL to Azure Database for MySQL."""

69

70

def __init__(self, input: MigrateMySqlAzureDbForMySqlOfflineTaskInput, **kwargs): ...

71

72

class MigrateMySqlAzureDbForMySqlSyncTaskProperties(ProjectTaskProperties):

73

"""Online sync migration from MySQL to Azure Database for MySQL."""

74

75

def __init__(self, input: MigrateMySqlAzureDbForMySqlSyncTaskInput, **kwargs): ...

76

```

77

78

### Oracle Migration Tasks

79

80

Task types for migrating Oracle databases to Azure Database for PostgreSQL.

81

82

```python { .api }

83

class ConnectToSourceOracleSyncTaskProperties(ProjectTaskProperties):

84

"""Test connection to Oracle source for sync migration."""

85

86

def __init__(self, input: ConnectToSourceOracleSyncTaskInput, **kwargs): ...

87

88

class GetUserTablesOracleTaskProperties(ProjectTaskProperties):

89

"""Get user tables from Oracle source."""

90

91

def __init__(self, input: GetUserTablesOracleTaskInput, **kwargs): ...

92

93

class CheckOCIDriverTaskProperties(ProjectTaskProperties):

94

"""Check Oracle OCI driver installation."""

95

96

def __init__(self, input: CheckOCIDriverTaskInput, **kwargs): ...

97

98

class InstallOCIDriverTaskProperties(ProjectTaskProperties):

99

"""Install Oracle OCI driver."""

100

101

def __init__(self, input: InstallOCIDriverTaskInput, **kwargs): ...

102

103

class UploadOCIDriverTaskProperties(ProjectTaskProperties):

104

"""Upload Oracle OCI driver."""

105

106

def __init__(self, input: UploadOCIDriverTaskInput, **kwargs): ...

107

108

class MigrateOracleAzureDbForPostgreSqlSyncTaskProperties(ProjectTaskProperties):

109

"""Sync migration from Oracle to Azure Database for PostgreSQL."""

110

111

def __init__(self, input: MigrateOracleAzureDbPostgreSqlSyncTaskInput, **kwargs): ...

112

```

113

114

### PostgreSQL Migration Tasks

115

116

Task types for migrating PostgreSQL databases to Azure Database for PostgreSQL.

117

118

```python { .api }

119

class ConnectToSourcePostgreSqlSyncTaskProperties(ProjectTaskProperties):

120

"""Test connection to PostgreSQL source for sync migration."""

121

122

def __init__(self, input: ConnectToSourcePostgreSqlSyncTaskInput, **kwargs): ...

123

124

class ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties(ProjectTaskProperties):

125

"""Test connection to Azure Database for PostgreSQL target."""

126

127

def __init__(self, input: ConnectToTargetAzureDbForPostgreSqlSyncTaskInput, **kwargs): ...

128

129

class GetUserTablesPostgreSqlTaskProperties(ProjectTaskProperties):

130

"""Get user tables from PostgreSQL source."""

131

132

def __init__(self, input: GetUserTablesPostgreSqlTaskInput, **kwargs): ...

133

134

class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties(ProjectTaskProperties):

135

"""Sync migration from PostgreSQL to Azure Database for PostgreSQL."""

136

137

def __init__(self, input: MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput, **kwargs): ...

138

```

139

140

### MongoDB Migration Tasks

141

142

Task types for migrating MongoDB databases to Azure Cosmos DB.

143

144

```python { .api }

145

class ConnectToMongoDbTaskProperties(ProjectTaskProperties):

146

"""Test connection to MongoDB source."""

147

148

def __init__(self, input: MongoDbCommandInput, **kwargs): ...

149

150

class ValidateMongoDbTaskProperties(ProjectTaskProperties):

151

"""Validate MongoDB migration readiness."""

152

153

def __init__(self, input: MongoDbCommandInput, **kwargs): ...

154

155

class MigrateMongoDbTaskProperties(ProjectTaskProperties):

156

"""Migrate MongoDB to Azure Cosmos DB."""

157

158

def __init__(self, input: MongoDbMigrationSettings, **kwargs): ...

159

```

160

161

## Task Input Types

162

163

### Common Input Patterns

164

165

Most migration tasks follow these input patterns:

166

167

```python { .api }

168

class ConnectToSourceSqlServerTaskInput:

169

"""Input for SQL Server source connection test."""

170

171

def __init__(

172

self,

173

source_connection_info: SqlConnectionInfo,

174

check_permissions_group: str = "Default",

175

**kwargs

176

): ...

177

178

# Properties

179

source_connection_info: SqlConnectionInfo

180

check_permissions_group: str # Default, MigrationFromSqlServerToAzureDB, etc.

181

182

class MigrateSqlServerSqlDbTaskInput:

183

"""Input for SQL Server to Azure SQL Database migration."""

184

185

def __init__(

186

self,

187

source_connection_info: SqlConnectionInfo,

188

target_connection_info: SqlConnectionInfo,

189

selected_databases: List[MigrateSqlServerSqlDbDatabaseInput],

190

**kwargs

191

): ...

192

193

# Properties

194

source_connection_info: SqlConnectionInfo

195

target_connection_info: SqlConnectionInfo

196

selected_databases: List[MigrateSqlServerSqlDbDatabaseInput]

197

validation_options: MigrationValidationOptions

198

started_on: datetime

199

```

200

201

### Database Selection Inputs

202

203

```python { .api }

204

class MigrateSqlServerSqlDbDatabaseInput:

205

"""Database selection for SQL Server to Azure SQL DB migration."""

206

207

def __init__(

208

self,

209

name: str,

210

target_database_name: str = None,

211

**kwargs

212

): ...

213

214

# Properties

215

name: str # Source database name

216

target_database_name: str # Target database name

217

make_source_db_read_only: bool

218

table_map: Dict[str, str] # Source to target table mapping

219

220

class MigrateMySqlAzureDbForMySqlOfflineDatabaseInput:

221

"""Database selection for MySQL offline migration."""

222

223

def __init__(

224

self,

225

name: str,

226

target_database_name: str = None,

227

**kwargs

228

): ...

229

230

# Properties

231

name: str

232

target_database_name: str

233

table_map: Dict[str, str]

234

```

235

236

## Task Output Types

237

238

### Connection Test Outputs

239

240

```python { .api }

241

class ConnectToSourceSqlServerTaskOutput:

242

"""Output from SQL Server source connection test."""

243

244

# Properties

245

id: str

246

databases: List[str] # Available databases

247

source_server_version: str

248

source_server_brand_version: str

249

validation_errors: List[ReportableException]

250

agent_jobs: List[AgentJobInfo] # SQL Agent jobs

251

logins: List[LoginInfo] # Server logins

252

253

class ConnectToTargetSqlDbTaskOutput:

254

"""Output from Azure SQL Database target connection test."""

255

256

# Properties

257

id: str

258

databases: List[str]

259

target_server_version: str

260

target_server_brand_version: str

261

```

262

263

### Migration Task Outputs

264

265

```python { .api }

266

class MigrateSqlServerSqlDbTaskOutput:

267

"""Base output for SQL Server to Azure SQL DB migration."""

268

269

# Properties

270

id: str

271

result_type: str # MigrationLevelOutput, DatabaseLevelOutput, TableLevelOutput, etc.

272

273

class MigrateSqlServerSqlDbTaskOutputMigrationLevel(MigrateSqlServerSqlDbTaskOutput):

274

"""Migration-level output."""

275

276

# Properties

277

started_on: datetime

278

ended_on: datetime

279

duration_in_seconds: int

280

status: str

281

status_message: str

282

message: str

283

databases: Dict[str, str] # Database migration results

284

database_summary: List[DatabaseSummaryResult]

285

migration_report_result: MigrationReportResult

286

source_server_version: str

287

source_server_brand_version: str

288

target_server_version: str

289

target_server_brand_version: str

290

```

291

292

## Validation Options

293

294

```python { .api }

295

class MigrationValidationOptions:

296

"""Migration validation configuration."""

297

298

def __init__(self, **kwargs): ...

299

300

# Properties

301

enable_schema_validation: bool

302

enable_data_integrity_validation: bool

303

enable_query_analysis_validation: bool

304

```

305

306

## Task Usage Examples

307

308

### Complete SQL Server Migration Workflow

309

310

```python

311

# 1. Test source connection

312

source_test_task = ProjectTask(

313

properties=ConnectToSourceSqlServerTaskProperties(

314

input=ConnectToSourceSqlServerTaskInput(

315

source_connection_info=source_connection,

316

check_permissions_group="MigrationFromSqlServerToAzureDB"

317

)

318

)

319

)

320

321

# 2. Test target connection

322

target_test_task = ProjectTask(

323

properties=ConnectToTargetSqlDbTaskProperties(

324

input=ConnectToTargetSqlDbTaskInput(

325

source_connection_info=source_connection,

326

target_connection_info=target_connection

327

)

328

)

329

)

330

331

# 3. Get source tables

332

get_tables_task = ProjectTask(

333

properties=GetUserTablesSqlTaskProperties(

334

input=GetUserTablesSqlTaskInput(

335

connection_info=source_connection,

336

selected_databases=["MyDatabase"]

337

)

338

)

339

)

340

341

# 4. Migrate schema

342

schema_migration_task = ProjectTask(

343

properties=MigrateSchemaSqlServerSqlDbTaskProperties(

344

input=MigrateSchemaSqlServerSqlDbTaskInput(

345

source_connection_info=source_connection,

346

target_connection_info=target_connection,

347

selected_databases=[

348

MigrateSchemaSqlServerSqlDbDatabaseInput(

349

name="MyDatabase",

350

target_database_name="MyDatabase"

351

)

352

]

353

)

354

)

355

)

356

357

# 5. Migrate data

358

data_migration_task = ProjectTask(

359

properties=MigrateSqlServerSqlDbTaskProperties(

360

input=MigrateSqlServerSqlDbTaskInput(

361

source_connection_info=source_connection,

362

target_connection_info=target_connection,

363

selected_databases=[

364

MigrateSqlServerSqlDbDatabaseInput(

365

name="MyDatabase",

366

target_database_name="MyDatabase"

367

)

368

],

369

validation_options=MigrationValidationOptions(

370

enable_schema_validation=True,

371

enable_data_integrity_validation=True

372

)

373

)

374

)

375

)

376

```

377

378

Each task type provides specialized functionality for specific migration scenarios, with appropriate input/output models and validation logic tailored to the source and target database platforms.