Azure Data Migration Client Library for programmatically managing database migration services and operations.
—
Quality
Pending
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
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.
Task types for migrating SQL Server databases to Azure SQL Database and Azure SQL Managed Instance.
class ConnectToSourceSqlServerTaskProperties(ProjectTaskProperties):
"""Test connection to SQL Server source."""
def __init__(self, input: ConnectToSourceSqlServerTaskInput, **kwargs): ...
class ConnectToTargetSqlDbTaskProperties(ProjectTaskProperties):
"""Test connection to Azure SQL Database target."""
def __init__(self, input: ConnectToTargetSqlDbTaskInput, **kwargs): ...
class ConnectToTargetSqlMITaskProperties(ProjectTaskProperties):
"""Test connection to SQL Managed Instance target."""
def __init__(self, input: ConnectToTargetSqlMITaskInput, **kwargs): ...
class GetUserTablesSqlTaskProperties(ProjectTaskProperties):
"""Get user tables from SQL Server source."""
def __init__(self, input: GetUserTablesSqlTaskInput, **kwargs): ...
class MigrateSqlServerSqlDbTaskProperties(ProjectTaskProperties):
"""Migrate SQL Server to Azure SQL Database."""
def __init__(self, input: MigrateSqlServerSqlDbTaskInput, **kwargs): ...
class MigrateSqlServerSqlMITaskProperties(ProjectTaskProperties):
"""Migrate SQL Server to SQL Managed Instance."""
def __init__(self, input: MigrateSqlServerSqlMITaskInput, **kwargs): ...
class MigrateSchemaSqlServerSqlDbTaskProperties(ProjectTaskProperties):
"""Migrate schema from SQL Server to Azure SQL Database."""
def __init__(self, input: MigrateSchemaSqlServerSqlDbTaskInput, **kwargs): ...Task types for migrating MySQL databases to Azure Database for MySQL.
class ConnectToSourceMySqlTaskProperties(ProjectTaskProperties):
"""Test connection to MySQL source."""
def __init__(self, input: ConnectToSourceMySqlTaskInput, **kwargs): ...
class ConnectToTargetAzureDbForMySqlTaskProperties(ProjectTaskProperties):
"""Test connection to Azure Database for MySQL target."""
def __init__(self, input: ConnectToTargetAzureDbForMySqlTaskInput, **kwargs): ...
class GetUserTablesMySqlTaskProperties(ProjectTaskProperties):
"""Get user tables from MySQL source."""
def __init__(self, input: GetUserTablesMySqlTaskInput, **kwargs): ...
class MigrateMySqlAzureDbForMySqlOfflineTaskProperties(ProjectTaskProperties):
"""Offline migration from MySQL to Azure Database for MySQL."""
def __init__(self, input: MigrateMySqlAzureDbForMySqlOfflineTaskInput, **kwargs): ...
class MigrateMySqlAzureDbForMySqlSyncTaskProperties(ProjectTaskProperties):
"""Online sync migration from MySQL to Azure Database for MySQL."""
def __init__(self, input: MigrateMySqlAzureDbForMySqlSyncTaskInput, **kwargs): ...Task types for migrating Oracle databases to Azure Database for PostgreSQL.
class ConnectToSourceOracleSyncTaskProperties(ProjectTaskProperties):
"""Test connection to Oracle source for sync migration."""
def __init__(self, input: ConnectToSourceOracleSyncTaskInput, **kwargs): ...
class GetUserTablesOracleTaskProperties(ProjectTaskProperties):
"""Get user tables from Oracle source."""
def __init__(self, input: GetUserTablesOracleTaskInput, **kwargs): ...
class CheckOCIDriverTaskProperties(ProjectTaskProperties):
"""Check Oracle OCI driver installation."""
def __init__(self, input: CheckOCIDriverTaskInput, **kwargs): ...
class InstallOCIDriverTaskProperties(ProjectTaskProperties):
"""Install Oracle OCI driver."""
def __init__(self, input: InstallOCIDriverTaskInput, **kwargs): ...
class UploadOCIDriverTaskProperties(ProjectTaskProperties):
"""Upload Oracle OCI driver."""
def __init__(self, input: UploadOCIDriverTaskInput, **kwargs): ...
class MigrateOracleAzureDbForPostgreSqlSyncTaskProperties(ProjectTaskProperties):
"""Sync migration from Oracle to Azure Database for PostgreSQL."""
def __init__(self, input: MigrateOracleAzureDbPostgreSqlSyncTaskInput, **kwargs): ...Task types for migrating PostgreSQL databases to Azure Database for PostgreSQL.
class ConnectToSourcePostgreSqlSyncTaskProperties(ProjectTaskProperties):
"""Test connection to PostgreSQL source for sync migration."""
def __init__(self, input: ConnectToSourcePostgreSqlSyncTaskInput, **kwargs): ...
class ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties(ProjectTaskProperties):
"""Test connection to Azure Database for PostgreSQL target."""
def __init__(self, input: ConnectToTargetAzureDbForPostgreSqlSyncTaskInput, **kwargs): ...
class GetUserTablesPostgreSqlTaskProperties(ProjectTaskProperties):
"""Get user tables from PostgreSQL source."""
def __init__(self, input: GetUserTablesPostgreSqlTaskInput, **kwargs): ...
class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties(ProjectTaskProperties):
"""Sync migration from PostgreSQL to Azure Database for PostgreSQL."""
def __init__(self, input: MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput, **kwargs): ...Task types for migrating MongoDB databases to Azure Cosmos DB.
class ConnectToMongoDbTaskProperties(ProjectTaskProperties):
"""Test connection to MongoDB source."""
def __init__(self, input: MongoDbCommandInput, **kwargs): ...
class ValidateMongoDbTaskProperties(ProjectTaskProperties):
"""Validate MongoDB migration readiness."""
def __init__(self, input: MongoDbCommandInput, **kwargs): ...
class MigrateMongoDbTaskProperties(ProjectTaskProperties):
"""Migrate MongoDB to Azure Cosmos DB."""
def __init__(self, input: MongoDbMigrationSettings, **kwargs): ...Most migration tasks follow these input patterns:
class ConnectToSourceSqlServerTaskInput:
"""Input for SQL Server source connection test."""
def __init__(
self,
source_connection_info: SqlConnectionInfo,
check_permissions_group: str = "Default",
**kwargs
): ...
# Properties
source_connection_info: SqlConnectionInfo
check_permissions_group: str # Default, MigrationFromSqlServerToAzureDB, etc.
class MigrateSqlServerSqlDbTaskInput:
"""Input for SQL Server to Azure SQL Database migration."""
def __init__(
self,
source_connection_info: SqlConnectionInfo,
target_connection_info: SqlConnectionInfo,
selected_databases: List[MigrateSqlServerSqlDbDatabaseInput],
**kwargs
): ...
# Properties
source_connection_info: SqlConnectionInfo
target_connection_info: SqlConnectionInfo
selected_databases: List[MigrateSqlServerSqlDbDatabaseInput]
validation_options: MigrationValidationOptions
started_on: datetimeclass MigrateSqlServerSqlDbDatabaseInput:
"""Database selection for SQL Server to Azure SQL DB migration."""
def __init__(
self,
name: str,
target_database_name: str = None,
**kwargs
): ...
# Properties
name: str # Source database name
target_database_name: str # Target database name
make_source_db_read_only: bool
table_map: Dict[str, str] # Source to target table mapping
class MigrateMySqlAzureDbForMySqlOfflineDatabaseInput:
"""Database selection for MySQL offline migration."""
def __init__(
self,
name: str,
target_database_name: str = None,
**kwargs
): ...
# Properties
name: str
target_database_name: str
table_map: Dict[str, str]class ConnectToSourceSqlServerTaskOutput:
"""Output from SQL Server source connection test."""
# Properties
id: str
databases: List[str] # Available databases
source_server_version: str
source_server_brand_version: str
validation_errors: List[ReportableException]
agent_jobs: List[AgentJobInfo] # SQL Agent jobs
logins: List[LoginInfo] # Server logins
class ConnectToTargetSqlDbTaskOutput:
"""Output from Azure SQL Database target connection test."""
# Properties
id: str
databases: List[str]
target_server_version: str
target_server_brand_version: strclass MigrateSqlServerSqlDbTaskOutput:
"""Base output for SQL Server to Azure SQL DB migration."""
# Properties
id: str
result_type: str # MigrationLevelOutput, DatabaseLevelOutput, TableLevelOutput, etc.
class MigrateSqlServerSqlDbTaskOutputMigrationLevel(MigrateSqlServerSqlDbTaskOutput):
"""Migration-level output."""
# Properties
started_on: datetime
ended_on: datetime
duration_in_seconds: int
status: str
status_message: str
message: str
databases: Dict[str, str] # Database migration results
database_summary: List[DatabaseSummaryResult]
migration_report_result: MigrationReportResult
source_server_version: str
source_server_brand_version: str
target_server_version: str
target_server_brand_version: strclass MigrationValidationOptions:
"""Migration validation configuration."""
def __init__(self, **kwargs): ...
# Properties
enable_schema_validation: bool
enable_data_integrity_validation: bool
enable_query_analysis_validation: bool# 1. Test source connection
source_test_task = ProjectTask(
properties=ConnectToSourceSqlServerTaskProperties(
input=ConnectToSourceSqlServerTaskInput(
source_connection_info=source_connection,
check_permissions_group="MigrationFromSqlServerToAzureDB"
)
)
)
# 2. Test target connection
target_test_task = ProjectTask(
properties=ConnectToTargetSqlDbTaskProperties(
input=ConnectToTargetSqlDbTaskInput(
source_connection_info=source_connection,
target_connection_info=target_connection
)
)
)
# 3. Get source tables
get_tables_task = ProjectTask(
properties=GetUserTablesSqlTaskProperties(
input=GetUserTablesSqlTaskInput(
connection_info=source_connection,
selected_databases=["MyDatabase"]
)
)
)
# 4. Migrate schema
schema_migration_task = ProjectTask(
properties=MigrateSchemaSqlServerSqlDbTaskProperties(
input=MigrateSchemaSqlServerSqlDbTaskInput(
source_connection_info=source_connection,
target_connection_info=target_connection,
selected_databases=[
MigrateSchemaSqlServerSqlDbDatabaseInput(
name="MyDatabase",
target_database_name="MyDatabase"
)
]
)
)
)
# 5. Migrate data
data_migration_task = ProjectTask(
properties=MigrateSqlServerSqlDbTaskProperties(
input=MigrateSqlServerSqlDbTaskInput(
source_connection_info=source_connection,
target_connection_info=target_connection,
selected_databases=[
MigrateSqlServerSqlDbDatabaseInput(
name="MyDatabase",
target_database_name="MyDatabase"
)
],
validation_options=MigrationValidationOptions(
enable_schema_validation=True,
enable_data_integrity_validation=True
)
)
)
)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.
Install with Tessl CLI
npx tessl i tessl/pypi-azure-mgmt-datamigration