Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Break cloud migration into two pipelines #1512

Merged
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,18 @@ public function execute()

$dbh = DB::factory('datawarehouse');
$mysql_helper = \CCR\DB\MySQLHelper::factory($dbh);

if ($mysql_helper->tableExists('modw_cloud.event')) {

Utilities::runEtlPipeline(
['cloud-migration-9_0_0-9_5_0'],
$this->logger,
[
'last-modified-start-date' => '2017-01-01 00:00:00'
]
);
}

if ($mysql_helper->tableExists('modw_cloud.cloud_resource_specs')) {

$staging_resource_sql = "SELECT
Expand All @@ -47,7 +59,7 @@ public function execute()
}

Utilities::runEtlPipeline(
['cloud-migration-9_0_0-9_5_0'],
['cloud-resource-specs-migration-9_0_0-9_5_0'],
$this->logger,
[
'last-modified-start-date' => '2017-01-01 00:00:00'
Expand Down
52 changes: 32 additions & 20 deletions configuration/etl/etl.d/xdmod-migration-9_0_0-9_5_0.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,26 @@
"schema": "modw_cloud"
}
}
}
},
"cloud-resource-specs-migration-9_0_0-9_5_0": {
"namespace": "ETL\\Ingestor",
"options_class": "IngestorOptions",
"endpoints": {
"source": {
"type": "mysql",
"name": "Cloud DB",
"config": "datawarehouse",
"schema": "modw_cloud"
},
"destination": {
"type": "mysql",
"name": "Cloud DB",
"config": "datawarehouse",
"schema": "modw_cloud",
"truncate_destination": true
}
}
}
},
"migration-9_0_0-9_5_0": [
{
Expand Down Expand Up @@ -165,21 +184,14 @@
"explode_column": {
"session_id_list": "session_id"
}
},
}
],
"cloud-resource-specs-migration-9_0_0-9_5_0": [
{
"name": "CloudResourceSpecsReconstructor",
"class": "CloudResourceSpecsStateTransformIngestor",
"definition_file": "cloud_common/resource_specifications_transformer.json",
"description": "Sets a start and end time for memory and vcpu paring for a compute node on a cloud resource",
"endpoints": {
"destination": {
"type": "mysql",
"name": "Cloud DB",
"config": "datawarehouse",
"schema": "modw_cloud",
"truncate_destination": true
}
}
"description": "Sets a start and end time for memory and vcpu paring for a compute node on a cloud resource"
},
{
"#": "Asset data must be aggregated post ingestion",
Expand All @@ -194,14 +206,14 @@
"day", "month", "quarter", "year"
],
"endpoints": {
"destination": {
"type": "mysql",
"name": "Aggregate DB",
"config": "datawarehouse",
"schema": "modw_aggregates",
"create_schema_if_not_exists": true,
"truncate_destination": true
}
"destination": {
"type": "mysql",
"name": "Aggregate DB",
"config": "datawarehouse",
"schema": "modw_aggregates",
"create_schema_if_not_exists": true,
"truncate_destination": true
}
}
}
]
Expand Down