From f425508477b6431c6f93c60ca0b2956d6c4d86d2 Mon Sep 17 00:00:00 2001 From: Lawrence Lau Date: Thu, 15 Feb 2024 10:45:57 -0800 Subject: [PATCH 01/11] adjusting evaluation keys and disabling agency seeding --- .../src/typeorm/Migrations/1707763864014-SeedData.ts | 4 ---- express-api/src/typeorm/Migrations/Seeds/EvaluationKeys.sql | 6 +++--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/express-api/src/typeorm/Migrations/1707763864014-SeedData.ts b/express-api/src/typeorm/Migrations/1707763864014-SeedData.ts index 360469caf8..25622abb3c 100644 --- a/express-api/src/typeorm/Migrations/1707763864014-SeedData.ts +++ b/express-api/src/typeorm/Migrations/1707763864014-SeedData.ts @@ -9,9 +9,6 @@ export class SeedData1707763864014 implements MigrationInterface { const Users = SqlReader.readSqlFile(path.join(sqlFilePath, 'Users.sql')); await queryRunner.query(Users.toString()); - const Agencies = SqlReader.readSqlFile(path.join(sqlFilePath, 'Agencies.sql')); - await queryRunner.query(Agencies.toString()); - const Provinces = SqlReader.readSqlFile(path.join(sqlFilePath, 'Provinces.sql')); await queryRunner.query(Provinces.toString()); @@ -114,7 +111,6 @@ export class SeedData1707763864014 implements MigrationInterface { await queryRunner.query('TRUNCATE TABLE property_classification cascade'); await queryRunner.query('TRUNCATE TABLE property_type cascade'); await queryRunner.query('TRUNCATE TABLE tier_level cascade'); - await queryRunner.query('TRUNCATE TABLE agency cascade'); await queryRunner.query('TRUNCATE TABLE role cascade'); await queryRunner.query('TRUNCATE TABLE province cascade'); await queryRunner.query('TRUNCATE TABLE project_risk cascade'); diff --git a/express-api/src/typeorm/Migrations/Seeds/EvaluationKeys.sql b/express-api/src/typeorm/Migrations/Seeds/EvaluationKeys.sql index f1f6f2d677..0dabd504c1 100644 --- a/express-api/src/typeorm/Migrations/Seeds/EvaluationKeys.sql +++ b/express-api/src/typeorm/Migrations/Seeds/EvaluationKeys.sql @@ -1,4 +1,4 @@ INSERT INTO "evaluation_key" ("Id","CreatedById","CreatedOn","UpdatedById","UpdatedOn","Name","Description") VALUES - (1, '00000000-0000-0000-0000-000000000000', '2023-01-17 17:58:34.7500000',NULL, NULL, N'Assessed', NULL), - (2, '00000000-0000-0000-0000-000000000000', '2023-01-17 17:58:34.7500000',NULL, NULL, N'Appraised', NULL), - (3, '00000000-0000-0000-0000-000000000000', '2023-01-17 17:58:34.7500000',NULL, NULL, N'Improvements', NULL); + (0, '00000000-0000-0000-0000-000000000000', '2023-01-17 17:58:34.7500000',NULL, NULL, N'Assessed', NULL), + (1, '00000000-0000-0000-0000-000000000000', '2023-01-17 17:58:34.7500000',NULL, NULL, N'Appraised', NULL), + (2, '00000000-0000-0000-0000-000000000000', '2023-01-17 17:58:34.7500000',NULL, NULL, N'Improvements', NULL); From f4baed0b6c69dd48a96949b5914b6901ed3ce434 Mon Sep 17 00:00:00 2001 From: Lawrence Lau Date: Thu, 15 Feb 2024 11:42:47 -0800 Subject: [PATCH 02/11] adjusting fiscal key seed --- express-api/src/typeorm/Migrations/Seeds/FiscalKeys.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/express-api/src/typeorm/Migrations/Seeds/FiscalKeys.sql b/express-api/src/typeorm/Migrations/Seeds/FiscalKeys.sql index 9a5950729f..57ad729ee3 100644 --- a/express-api/src/typeorm/Migrations/Seeds/FiscalKeys.sql +++ b/express-api/src/typeorm/Migrations/Seeds/FiscalKeys.sql @@ -1,3 +1,3 @@ INSERT INTO "fiscal_key" ("Id","CreatedById","CreatedOn","UpdatedById","UpdatedOn","Name", "Description") VALUES - (1,'00000000-0000-0000-0000-000000000000','2023-01-06 16:58:34.7500000',NULL,NULL,N'NetBook',NULL), - (2,'00000000-0000-0000-0000-000000000000','2023-01-06 16:58:34.7500000',NULL,NULL,N'Market',NULL); + (0,'00000000-0000-0000-0000-000000000000','2023-01-06 16:58:34.7500000',NULL,NULL,N'NetBook',NULL), + (1,'00000000-0000-0000-0000-000000000000','2023-01-06 16:58:34.7500000',NULL,NULL,N'Market',NULL); From 28afb1f01a3b260d514db9f6d5caf505fde75296 Mon Sep 17 00:00:00 2001 From: Lawrence Lau Date: Thu, 15 Feb 2024 13:28:42 -0800 Subject: [PATCH 03/11] adding latest tasks.json ETL task for DBeaver --- tools/dbeaver/tasks.json | 4968 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 4968 insertions(+) create mode 100644 tools/dbeaver/tasks.json diff --git a/tools/dbeaver/tasks.json b/tools/dbeaver/tasks.json new file mode 100644 index 0000000000..0a4be3790f --- /dev/null +++ b/tools/dbeaver/tasks.json @@ -0,0 +1,4968 @@ +{ + "##tasksFolders": { + "PIMS ETL": {}, + "Testing": {} + }, + "17bfe16e-c625-419f-9bf0-5757084320d2": { + "task": "dataExport", + "label": "UsersExport2", + "description": "testing", + "taskFolder": "Testing", + "createTime": "202401081615", + "updateTime": "202401081615", + "state": { + "producers": [ + { + "type": "databaseTransferProducer", + "location": { + "type": "query", + "project": "General", + "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", + "query": "SELECT \r\n u.[Id],\r\n\t CASE \r\n\t\tWHEN u.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE u.[CreatedById]\r\n\t END AS [CreatedById],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n \r\n\t CASE \r\n\t\tWHEN urd.[CreatedOn] IS NULL THEN GETDATE()\r\n\t\tELSE urd.[CreatedOn]\r\n\t END AS [CreatedOn],\r\n urd.UserId,\r\n ua.AgencyId, \r\n STRING_AGG(urd.RoleName, \u0027, \u0027) AS Roles,\r\n CASE \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%System Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial Reporter%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial%\u0027 THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Agency Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Analyst%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Manager%\u0027 THEN \u002700000000-0000-0000-0000-000000000001\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister Assistant%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Executive Director%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%View Only Properties%\u0027 THEN \u002700000000-0000-0000-0000-000000000002\u0027\r\n\t \r\n END AS UserType\r\nFROM Users u\r\nLEFT JOIN (\r\n SELECT \r\n ur.UserId,\r\n MAX(ur.CreatedOn) AS CreatedOn,\r\n STRING_AGG(r.Name, \u0027, \u0027) AS RoleName\r\n FROM [pims].[dbo].[UserRoles] ur\r\n INNER JOIN Roles r ON ur.RoleId \u003d r.Id\r\n GROUP BY ur.UserId\r\n) AS urd ON u.Id \u003d urd.UserId\r\n\r\nLEFT OUTER JOIN (\r\n SELECT UserId, MIN(AgencyId) AS AgencyId\r\n FROM UserAgencies\r\n GROUP BY UserId\r\n) ua_min ON u.Id \u003d ua_min.UserId\r\nLEFT OUTER JOIN UserAgencies ua ON u.Id \u003d ua.UserId AND ua.AgencyId \u003d ua_min.AgencyId\r\n\r\nWHERE u.Id \u003c\u003e \u002700000000-0000-0000-0000-000000000000\u0027\r\nGROUP BY u.[Id],\r\n u.[CreatedById],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n urd.CreatedOn, \r\n urd.UserId, \r\n ua.AgencyId\r\nORDER BY urd.CreatedOn ASC;" + } + } + ], + "consumers": [ + { + "type": "databaseTransferConsumer" + } + ], + "configuration": { + "maxJobCount": 1, + "showFinalMessage": true, + "DatabaseTransferProducer": { + "extractType": "SEGMENTS", + "segmentSize": 100, + "fetchSize": 10000, + "openNewConnections": false, + "queryRowCount": false, + "selectedColumnsOnly": false, + "selectedRowsOnly": false + }, + "DatabaseTransferConsumer": { + "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", + "openNewConnections": true, + "useTransactions": true, + "commitAfterRows": 1000, + "useMultiRowInsert": false, + "multiRowInsertBatch": 500, + "skipBindValues": false, + "disableUsingBatches": false, + "ignoreDuplicateRows": false, + "transferAutoGeneratedColumns": true, + "disableReferentialIntegrity": false, + "useBulkLoad": true, + "truncateBeforeLoad": false, + "openTableOnFinish": true, + "mappings": { + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT \r\n u.[Id],\r\n\t CASE \r\n\t\tWHEN u.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE u.[CreatedById]\r\n\t END AS [CreatedById],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n \r\n\t CASE \r\n\t\tWHEN urd.[CreatedOn] IS NULL THEN GETDATE()\r\n\t\tELSE urd.[CreatedOn]\r\n\t END AS [CreatedOn],\r\n urd.UserId,\r\n ua.AgencyId, \r\n STRING_AGG(urd.RoleName, \u0027, \u0027) AS Roles,\r\n CASE \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%System Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial Reporter%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial%\u0027 THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Agency Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Analyst%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Manager%\u0027 THEN \u002700000000-0000-0000-0000-000000000001\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister Assistant%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Executive Director%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%View Only Properties%\u0027 THEN \u002700000000-0000-0000-0000-000000000002\u0027\r\n\t \r\n END AS UserType\r\nFROM Users u\r\nLEFT JOIN (\r\n SELECT \r\n ur.UserId,\r\n MAX(ur.CreatedOn) AS CreatedOn,\r\n STRING_AGG(r.Name, \u0027, \u0027) AS RoleName\r\n FROM [pims].[dbo].[UserRoles] ur\r\n INNER JOIN Roles r ON ur.RoleId \u003d r.Id\r\n GROUP BY ur.UserId\r\n) AS urd ON u.Id \u003d urd.UserId\r\n\r\nLEFT OUTER JOIN (\r\n SELECT UserId, MIN(AgencyId) AS AgencyId\r\n FROM UserAgencies\r\n GROUP BY UserId\r\n) ua_min ON u.Id \u003d ua_min.UserId\r\nLEFT OUTER JOIN UserAgencies ua ON u.Id \u003d ua.UserId AND ua.AgencyId \u003d ua_min.AgencyId\r\n\r\nWHERE u.Id \u003c\u003e \u002700000000-0000-0000-0000-000000000000\u0027\r\nGROUP BY u.[Id],\r\n u.[CreatedById],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n urd.CreatedOn, \r\n urd.UserId, \r\n ua.AgencyId\r\nORDER BY urd.CreatedOn ASC;": { + "targetName": "user", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "id", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "createdbyid", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "updatedbyid", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "updatedon", + "mappingType": "existing" + }, + "username": { + "targetName": "username", + "mappingType": "existing" + }, + "displayname": { + "targetName": "displayname", + "mappingType": "existing" + }, + "firstname": { + "targetName": "firstname", + "mappingType": "existing" + }, + "middlename": { + "targetName": "middlename", + "mappingType": "existing" + }, + "lastname": { + "targetName": "lastname", + "mappingType": "existing" + }, + "email": { + "targetName": "email", + "mappingType": "existing" + }, + "Position": { + "targetName": "Position", + "mappingType": "existing" + }, + "isdisabled": { + "targetName": "isdisabled", + "mappingType": "existing" + }, + "emailverified": { + "targetName": "emailverified", + "mappingType": "existing" + }, + "note": { + "targetName": "note", + "mappingType": "existing" + }, + "issystem": { + "targetName": "issystem", + "mappingType": "existing" + }, + "lastlogin": { + "targetName": "lastlogin", + "mappingType": "existing" + }, + "approvedbyid": { + "targetName": "approvedbyid", + "mappingType": "existing" + }, + "approvedon": { + "targetName": "approvedon", + "mappingType": "existing" + }, + "keycloakuserid": { + "targetName": "keycloakuserid", + "mappingType": "existing" + }, + "createdon": { + "targetName": "createdon", + "mappingType": "existing" + }, + "userid": { + "targetName": "userid", + "mappingType": "skip" + }, + "agencyid": { + "targetName": "agencyid", + "mappingType": "existing" + }, + "roles": { + "targetName": "roles", + "mappingType": "skip" + }, + "usertype": { + "targetName": "\"RoleId\"", + "mappingType": "existing" + } + } + } + } + }, + "producer": "database_producer", + "consumer": "database_consumer" + } + } + }, + "ceb4321d-91ce-47f2-a9e3-4fab069d876e": { + "task": "dataExport", + "label": "ClaimsExport", + "description": "just the roles and claims export", + "taskFolder": "Testing", + "createTime": "202401081619", + "updateTime": "202401081619", + "state": { + "producers": [ + { + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Users" + } + }, + { + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Roles" + } + }, + { + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Claims" + } + }, + { + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/RoleClaims" + } + }, + { + "type": "databaseTransferProducer", + "location": { + "type": "query", + "project": "General", + "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", + "defaultCatalog": "pims", + "defaultSchema": "dbo", + "query": "SELECT [Id]\r\n ,[CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Name]\r\n ,[IsDisabled]\r\n ,[SortOrder]\r\n ,[Abbreviation]\r\n ,[BoundaryType]\r\n FROM [pims].[dbo].[AdministrativeAreas]\r\n WHERE Name LIKE \u0027%Regional District%\u0027" + } + } + ], + "consumers": [ + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + } + ], + "configuration": { + "maxJobCount": 1.0, + "showFinalMessage": true, + "DatabaseTransferProducer": { + "extractType": "SEGMENTS", + "segmentSize": 100.0, + "fetchSize": 10000.0, + "openNewConnections": false, + "queryRowCount": false, + "selectedColumnsOnly": false, + "selectedRowsOnly": false + }, + "DatabaseTransferConsumer": { + "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", + "openNewConnections": true, + "useTransactions": true, + "commitAfterRows": 1000.0, + "useMultiRowInsert": false, + "multiRowInsertBatch": 500.0, + "skipBindValues": false, + "disableUsingBatches": false, + "ignoreDuplicateRows": false, + "transferAutoGeneratedColumns": true, + "disableReferentialIntegrity": false, + "useBulkLoad": true, + "truncateBeforeLoad": false, + "openTableOnFinish": true, + "mappings": { + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Users": { + "targetName": "users", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "username": { + "targetName": "\"Username\"", + "mappingType": "existing" + }, + "displayname": { + "targetName": "\"DisplayName\"", + "mappingType": "existing" + }, + "firstname": { + "targetName": "\"FirstName\"", + "mappingType": "existing" + }, + "middlename": { + "targetName": "\"MiddleName\"", + "mappingType": "existing" + }, + "lastname": { + "targetName": "\"LastName\"", + "mappingType": "existing" + }, + "email": { + "targetName": "\"Email\"", + "mappingType": "existing" + }, + "Position": { + "targetName": "\"Position\"", + "mappingType": "existing" + }, + "isdisabled": { + "targetName": "\"IsDisabled\"", + "mappingType": "existing" + }, + "emailverified": { + "targetName": "\"EmailVerified\"", + "mappingType": "existing" + }, + "note": { + "targetName": "\"Note\"", + "mappingType": "existing" + }, + "issystem": { + "targetName": "\"IsSystem\"", + "mappingType": "existing" + }, + "lastlogin": { + "targetName": "\"LastLogin\"", + "mappingType": "existing" + }, + "approvedbyid": { + "targetName": "\"ApprovedById\"", + "mappingType": "existing" + }, + "approvedon": { + "targetName": "\"ApprovedOn\"", + "mappingType": "existing" + }, + "keycloakuserid": { + "targetName": "\"KeycloakUserId\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Roles": { + "targetName": "roles", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "Name": { + "targetName": "\"Name\"", + "mappingType": "existing" + }, + "isdisabled": { + "targetName": "\"IsDisabled\"", + "mappingType": "existing" + }, + "sortorder": { + "targetName": "\"SortOrder\"", + "mappingType": "existing" + }, + "keycloakgroupid": { + "targetName": "\"KeycloakGroupId\"", + "mappingType": "existing" + }, + "description": { + "targetName": "\"Description\"", + "mappingType": "existing" + }, + "ispublic": { + "targetName": "\"IsPublic\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Claims": { + "targetName": "claims", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "Name": { + "targetName": "\"Name\"", + "mappingType": "existing" + }, + "keycloakroleid": { + "targetName": "\"KeycloakRoleId\"", + "mappingType": "existing" + }, + "description": { + "targetName": "\"Description\"", + "mappingType": "existing" + }, + "isdisabled": { + "targetName": "\"IsDisabled\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/RoleClaims": { + "targetName": "role_claims", + "mappingType": "existing", + "attributes": { + "roleid": { + "targetName": "\"RoleId\"", + "mappingType": "existing" + }, + "claimid": { + "targetName": "\"ClaimId\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [Id]\r\n ,[CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Name]\r\n ,[IsDisabled]\r\n ,[SortOrder]\r\n ,[Abbreviation]\r\n ,[BoundaryType]\r\n FROM [pims].[dbo].[AdministrativeAreas]\r\n WHERE Name LIKE \u0027%Regional District%\u0027": { + "targetName": "regional_districts", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing", + "transformer": "constant", + "transformerProperties": { + "constant": "00000000-0000-0000-0000-000000000000" + }, + "transformerPropertiesNames": "constant" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "Name": { + "targetName": "\"Name\"", + "mappingType": "existing" + }, + "isdisabled": { + "targetName": "\"IsDisabled\"", + "mappingType": "skip" + }, + "sortorder": { + "targetName": "\"SortOrder\"", + "mappingType": "skip" + }, + "abbreviation": { + "targetName": "\"Abbreviation\"", + "mappingType": "skip" + }, + "boundarytype": { + "targetName": "\"BoundaryType\"", + "mappingType": "skip" + } + } + } + } + }, + "producer": "database_producer", + "consumer": "database_consumer" + } + } + }, + "7c8adf62-1021-47ab-a564-64f1967d6a65": { + "task": "dataExport", + "label": "PIMSExport", + "description": "Will be all the tables for PIMS", + "taskFolder": "PIMS ETL", + "createTime": "202401091557", + "updateTime": "202401091557", + "state": { + "producers": [ + { + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Roles" + } + }, + { + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Claims" + } + }, + { + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/RoleClaims" + } + }, + { + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Agencies" + } + }, + { + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/BuildingConstructionTypes" + } + }, + { + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/BuildingOccupantTypes" + } + }, + { + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/BuildingPredominateUses" + } + }, + { + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/NotificationTemplates" + } + }, + { + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectNumbers" + } + }, + { + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectRisks" + } + }, + { + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectStatus" + } + }, + { + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/PropertyClassifications" + } + }, + { + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/PropertyTypes" + } + }, + { + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Provinces" + } + }, + { + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Tasks" + } + }, + { + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/TierLevels" + } + }, + { + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Workflows" + } + }, + { + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/WorkflowProjectStatus" + } + }, + { + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Projects" + } + }, + { + "type": "databaseTransferProducer", + "location": { + "type": "query", + "project": "General", + "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", + "defaultCatalog": "pims", + "defaultSchema": "dbo", + "query": "SELECT [Id]\r\n ,[CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Name]\r\n FROM [pims].[dbo].[AdministrativeAreas]\r\n WHERE Name LIKE \u0027%District%\u0027 OR Name LIKE \u0027%Stikine Region%\u0027" + } + }, + { + "type": "databaseTransferProducer", + "location": { + "type": "query", + "project": "General", + "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", + "defaultCatalog": "pims", + "defaultSchema": "dbo", + "query": "SELECT TOP (1000) [Id]\r\n ,u.[CreatedById]\r\n ,u.[CreatedOn]\r\n ,u.[UpdatedById]\r\n ,u.[UpdatedOn]\r\n ,[Username]\r\n ,[DisplayName]\r\n ,[FirstName]\r\n ,[MiddleName]\r\n ,[LastName]\r\n ,[Email]\r\n ,[Position]\r\n ,[IsDisabled]\r\n ,[EmailVerified]\r\n ,[Note]\r\n ,[IsSystem]\r\n ,[LastLogin]\r\n ,[ApprovedById]\r\n ,[ApprovedOn]\r\n ,[KeycloakUserId]\r\n\t , ua.AgencyId\r\n FROM [pims].[dbo].[Users] u\r\n INNER JOIN UserAgencies ua\r\n ON u.Id \u003d ua.UserId" + } + } + ], + "consumers": [ + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + } + ], + "configuration": { + "maxJobCount": 1.0, + "showFinalMessage": true, + "DatabaseTransferProducer": { + "extractType": "SEGMENTS", + "segmentSize": 100.0, + "fetchSize": 10000.0, + "openNewConnections": false, + "queryRowCount": false, + "selectedColumnsOnly": false, + "selectedRowsOnly": false + }, + "DatabaseTransferConsumer": { + "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", + "openNewConnections": true, + "useTransactions": true, + "commitAfterRows": 1000.0, + "useMultiRowInsert": false, + "multiRowInsertBatch": 500.0, + "skipBindValues": false, + "disableUsingBatches": false, + "ignoreDuplicateRows": false, + "transferAutoGeneratedColumns": true, + "disableReferentialIntegrity": false, + "useBulkLoad": true, + "truncateBeforeLoad": false, + "openTableOnFinish": true, + "mappings": { + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Roles": { + "targetName": "roles", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "Name": { + "targetName": "\"Name\"", + "mappingType": "existing" + }, + "isdisabled": { + "targetName": "\"IsDisabled\"", + "mappingType": "existing" + }, + "sortorder": { + "targetName": "\"SortOrder\"", + "mappingType": "existing" + }, + "keycloakgroupid": { + "targetName": "\"KeycloakGroupId\"", + "mappingType": "existing" + }, + "description": { + "targetName": "\"Description\"", + "mappingType": "existing" + }, + "ispublic": { + "targetName": "\"IsPublic\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Claims": { + "targetName": "claims", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "Name": { + "targetName": "\"Name\"", + "mappingType": "existing" + }, + "keycloakroleid": { + "targetName": "\"KeycloakRoleId\"", + "mappingType": "existing" + }, + "description": { + "targetName": "\"Description\"", + "mappingType": "existing" + }, + "isdisabled": { + "targetName": "\"IsDisabled\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/RoleClaims": { + "targetName": "role_claims", + "mappingType": "existing", + "attributes": { + "roleid": { + "targetName": "\"RoleId\"", + "mappingType": "existing" + }, + "claimid": { + "targetName": "\"ClaimId\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Agencies": { + "targetName": "agencies", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "Name": { + "targetName": "\"Name\"", + "mappingType": "existing" + }, + "isdisabled": { + "targetName": "\"IsDisabled\"", + "mappingType": "existing" + }, + "sortorder": { + "targetName": "\"SortOrder\"", + "mappingType": "existing" + }, + "code": { + "targetName": "\"Code\"", + "mappingType": "existing" + }, + "description": { + "targetName": "\"Description\"", + "mappingType": "existing" + }, + "parentid": { + "targetName": "\"ParentId\"", + "mappingType": "existing" + }, + "email": { + "targetName": "\"Email\"", + "mappingType": "existing" + }, + "sendemail": { + "targetName": "\"SendEmail\"", + "mappingType": "existing" + }, + "addressto": { + "targetName": "\"AddressTo\"", + "mappingType": "existing" + }, + "ccemail": { + "targetName": "\"CCEmail\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/BuildingConstructionTypes": { + "targetName": "building_construction_types", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "Name": { + "targetName": "\"Name\"", + "mappingType": "existing" + }, + "isdisabled": { + "targetName": "\"IsDisabled\"", + "mappingType": "existing" + }, + "sortorder": { + "targetName": "\"SortOrder\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/BuildingOccupantTypes": { + "targetName": "building_occupant_types", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "Name": { + "targetName": "\"Name\"", + "mappingType": "existing" + }, + "isdisabled": { + "targetName": "\"IsDisabled\"", + "mappingType": "existing" + }, + "sortorder": { + "targetName": "\"SortOrder\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/BuildingPredominateUses": { + "targetName": "building_predominate_uses", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "Name": { + "targetName": "\"Name\"", + "mappingType": "existing" + }, + "isdisabled": { + "targetName": "\"IsDisabled\"", + "mappingType": "existing" + }, + "sortorder": { + "targetName": "\"SortOrder\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/NotificationTemplates": { + "targetName": "notification_templates", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "Name": { + "targetName": "\"Name\"", + "mappingType": "existing" + }, + "description": { + "targetName": "\"Description\"", + "mappingType": "existing" + }, + "To": { + "targetName": "\"To\"", + "mappingType": "existing" + }, + "cc": { + "targetName": "\"Cc\"", + "mappingType": "existing" + }, + "bcc": { + "targetName": "\"Bcc\"", + "mappingType": "existing" + }, + "audience": { + "targetName": "\"Audience\"", + "mappingType": "existing" + }, + "Encoding": { + "targetName": "\"Encoding\"", + "mappingType": "existing" + }, + "bodytype": { + "targetName": "\"BodyType\"", + "mappingType": "existing" + }, + "priority": { + "targetName": "\"Priority\"", + "mappingType": "existing" + }, + "subject": { + "targetName": "\"Subject\"", + "mappingType": "existing" + }, + "body": { + "targetName": "\"Body\"", + "mappingType": "existing" + }, + "isdisabled": { + "targetName": "\"IsDisabled\"", + "mappingType": "existing" + }, + "tag": { + "targetName": "\"Tag\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectNumbers": { + "targetName": "project_numbers", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectRisks": { + "targetName": "project_risks", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "Name": { + "targetName": "\"Name\"", + "mappingType": "existing" + }, + "isdisabled": { + "targetName": "\"IsDisabled\"", + "mappingType": "existing" + }, + "sortorder": { + "targetName": "\"SortOrder\"", + "mappingType": "existing" + }, + "code": { + "targetName": "\"Code\"", + "mappingType": "existing" + }, + "description": { + "targetName": "\"Description\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectStatus": { + "targetName": "project_status", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "Name": { + "targetName": "\"Name\"", + "mappingType": "existing" + }, + "isdisabled": { + "targetName": "\"IsDisabled\"", + "mappingType": "existing" + }, + "sortorder": { + "targetName": "\"SortOrder\"", + "mappingType": "existing" + }, + "code": { + "targetName": "\"Code\"", + "mappingType": "existing" + }, + "groupname": { + "targetName": "\"GroupName\"", + "mappingType": "existing" + }, + "description": { + "targetName": "\"Description\"", + "mappingType": "existing" + }, + "ismilestone": { + "targetName": "\"IsMilestone\"", + "mappingType": "existing" + }, + "isterminal": { + "targetName": "\"IsTerminal\"", + "mappingType": "existing" + }, + "route": { + "targetName": "\"Route\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/PropertyClassifications": { + "targetName": "property_classifications", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "Name": { + "targetName": "\"Name\"", + "mappingType": "existing" + }, + "isdisabled": { + "targetName": "\"IsDisabled\"", + "mappingType": "existing" + }, + "sortorder": { + "targetName": "\"SortOrder\"", + "mappingType": "existing" + }, + "isvisible": { + "targetName": "\"IsVisible\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/PropertyTypes": { + "targetName": "property_types", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "Name": { + "targetName": "\"Name\"", + "mappingType": "existing" + }, + "isdisabled": { + "targetName": "\"IsDisabled\"", + "mappingType": "existing" + }, + "sortorder": { + "targetName": "\"SortOrder\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Provinces": { + "targetName": "provinces", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "Name": { + "targetName": "\"Name\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Tasks": { + "targetName": "tasks", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "Name": { + "targetName": "\"Name\"", + "mappingType": "existing" + }, + "isdisabled": { + "targetName": "\"IsDisabled\"", + "mappingType": "existing" + }, + "sortorder": { + "targetName": "\"SortOrder\"", + "mappingType": "existing" + }, + "description": { + "targetName": "\"Description\"", + "mappingType": "existing" + }, + "isoptional": { + "targetName": "\"IsOptional\"", + "mappingType": "existing" + }, + "statusid": { + "targetName": "\"StatusId\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/TierLevels": { + "targetName": "tier_levels", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "Name": { + "targetName": "\"Name\"", + "mappingType": "existing" + }, + "isdisabled": { + "targetName": "\"IsDisabled\"", + "mappingType": "existing" + }, + "sortorder": { + "targetName": "\"SortOrder\"", + "mappingType": "existing" + }, + "description": { + "targetName": "\"Description\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Workflows": { + "targetName": "workflows", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "Name": { + "targetName": "\"Name\"", + "mappingType": "existing" + }, + "isdisabled": { + "targetName": "\"IsDisabled\"", + "mappingType": "existing" + }, + "sortorder": { + "targetName": "\"SortOrder\"", + "mappingType": "existing" + }, + "code": { + "targetName": "\"Code\"", + "mappingType": "existing" + }, + "description": { + "targetName": "\"Description\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/WorkflowProjectStatus": { + "targetName": "workflow_project_status", + "mappingType": "existing", + "attributes": { + "workflowid": { + "targetName": "\"WorkflowId\"", + "mappingType": "existing" + }, + "statusid": { + "targetName": "\"StatusId\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "sortorder": { + "targetName": "\"SortOrder\"", + "mappingType": "existing" + }, + "isoptional": { + "targetName": "\"IsOptional\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Projects": { + "targetName": "projects", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "projectnumber": { + "targetName": "\"ProjectNumber\"", + "mappingType": "existing" + }, + "Name": { + "targetName": "\"Name\"", + "mappingType": "existing" + }, + "workflowid": { + "targetName": "\"WorkflowId\"", + "mappingType": "existing" + }, + "manager": { + "targetName": "\"Manager\"", + "mappingType": "existing" + }, + "reportedfiscalyear": { + "targetName": "\"ReportedFiscalYear\"", + "mappingType": "existing" + }, + "actualfiscalyear": { + "targetName": "\"ActualFiscalYear\"", + "mappingType": "existing" + }, + "agencyid": { + "targetName": "\"AgencyId\"", + "mappingType": "existing" + }, + "statusid": { + "targetName": "\"StatusId\"", + "mappingType": "existing" + }, + "description": { + "targetName": "\"Description\"", + "mappingType": "existing" + }, + "tierlevelid": { + "targetName": "\"TierLevelId\"", + "mappingType": "existing" + }, + "riskid": { + "targetName": "\"RiskId\"", + "mappingType": "existing" + }, + "metadata": { + "targetName": "\"Metadata\"", + "mappingType": "existing" + }, + "submittedon": { + "targetName": "\"SubmittedOn\"", + "mappingType": "existing" + }, + "approvedon": { + "targetName": "\"ApprovedOn\"", + "mappingType": "existing" + }, + "deniedon": { + "targetName": "\"DeniedOn\"", + "mappingType": "existing" + }, + "cancelledon": { + "targetName": "\"CancelledOn\"", + "mappingType": "existing" + }, + "completedon": { + "targetName": "\"CompletedOn\"", + "mappingType": "existing" + }, + "netbook": { + "targetName": "\"NetBook\"", + "mappingType": "existing" + }, + "market": { + "targetName": "\"Market\"", + "mappingType": "existing" + }, + "assessed": { + "targetName": "\"Assessed\"", + "mappingType": "existing" + }, + "appraised": { + "targetName": "\"Appraised\"", + "mappingType": "existing" + }, + "projecttype": { + "targetName": "\"ProjectType\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [Id]\r\n ,[CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Name]\r\n FROM [pims].[dbo].[AdministrativeAreas]\r\n WHERE Name LIKE \u0027%District%\u0027 OR Name LIKE \u0027%Stikine Region%\u0027": { + "targetName": "regional_districts", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing", + "transformer": "constant", + "transformerProperties": { + "constant": "00000000-0000-0000-0000-000000000000" + }, + "transformerPropertiesNames": "constant" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "Name": { + "targetName": "\"Name\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT TOP (1000) [Id]\r\n ,u.[CreatedById]\r\n ,u.[CreatedOn]\r\n ,u.[UpdatedById]\r\n ,u.[UpdatedOn]\r\n ,[Username]\r\n ,[DisplayName]\r\n ,[FirstName]\r\n ,[MiddleName]\r\n ,[LastName]\r\n ,[Email]\r\n ,[Position]\r\n ,[IsDisabled]\r\n ,[EmailVerified]\r\n ,[Note]\r\n ,[IsSystem]\r\n ,[LastLogin]\r\n ,[ApprovedById]\r\n ,[ApprovedOn]\r\n ,[KeycloakUserId]\r\n\t , ua.AgencyId\r\n FROM [pims].[dbo].[Users] u\r\n INNER JOIN UserAgencies ua\r\n ON u.Id \u003d ua.UserId": { + "targetName": "users", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "username": { + "targetName": "\"Username\"", + "mappingType": "existing" + }, + "displayname": { + "targetName": "\"DisplayName\"", + "mappingType": "existing" + }, + "firstname": { + "targetName": "\"FirstName\"", + "mappingType": "existing" + }, + "middlename": { + "targetName": "\"MiddleName\"", + "mappingType": "existing" + }, + "lastname": { + "targetName": "\"LastName\"", + "mappingType": "existing" + }, + "email": { + "targetName": "\"Email\"", + "mappingType": "existing" + }, + "Position": { + "targetName": "\"Position\"", + "mappingType": "existing" + }, + "isdisabled": { + "targetName": "\"IsDisabled\"", + "mappingType": "existing" + }, + "emailverified": { + "targetName": "\"EmailVerified\"", + "mappingType": "existing" + }, + "note": { + "targetName": "\"Note\"", + "mappingType": "existing" + }, + "issystem": { + "targetName": "\"IsSystem\"", + "mappingType": "existing" + }, + "lastlogin": { + "targetName": "\"LastLogin\"", + "mappingType": "existing" + }, + "approvedbyid": { + "targetName": "\"ApprovedById\"", + "mappingType": "existing" + }, + "approvedon": { + "targetName": "\"ApprovedOn\"", + "mappingType": "existing" + }, + "keycloakuserid": { + "targetName": "\"KeycloakUserId\"", + "mappingType": "existing" + }, + "agencyid": { + "targetName": "\"AgencyId\"", + "mappingType": "existing" + } + } + } + } + }, + "producer": "database_producer", + "consumer": "database_consumer" + } + } + }, + "4ae69b40-4031-423a-a3f9-293ffdae2c07": { + "task": "dataExport", + "label": "Export Parcel#2", + "description": "testing", + "taskFolder": "Testing", + "createTime": "202401101407", + "updateTime": "202401101407", + "state": { + "producers": [ + { + "type": "databaseTransferProducer", + "location": { + "type": "query", + "project": "General", + "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", + "defaultCatalog": "pims", + "defaultSchema": "dbo", + "query": "SELECT p.[Id],\r\n p.[CreatedById],\r\n p.[CreatedOn],\r\n p.[UpdatedById],\r\n p.[UpdatedOn],\r\n p.[Name],\r\n p.[Description],\r\n p.[ClassificationId],\r\n p.[AgencyId],\r\n p.[IsSensitive],\r\n p.[IsVisibleToOtherAgencies],\r\n p.[PID],\r\n p.[PIN],\r\n p.[LandArea],\r\n p.[LandLegalDescription],\r\n p.[Zoning],\r\n p.[ZoningPotential],\r\n p.[NotOwned],\r\n\tCONVERT(VARCHAR(40), CAST(Location.Long AS DECIMAL(18, 14))) + \u0027, \u0027 + CONVERT(VARCHAR(40), CAST(Location.Lat AS DECIMAL(18, 14))) AS Location,\r\n\taa.Id as AdministrativeAreaId,\r\n\ta.Address1, \r\n\ta.Postal\r\nFROM \r\n [pims].[dbo].[Parcels] p\r\n\tINNER JOIN Addresses a\r\n\tON p.AddressId \u003d a.Id\r\n\tINNER JOIN AdministrativeAreas aa\r\n\tON aa.Name \u003d a.AdministrativeArea\r\nWHERE aa.Id NOT IN (\r\n\r\nSELECT Id\r\nFROM AdministrativeAreas a\r\nWHERE a.Name NOT IN (\r\nSELECT [Name]\r\n FROM [pims].[dbo].[AdminAreaswithRegionalDistricts]\r\n )\r\n and a.Name NOT LIKE \u0027%District%\u0027 and a.Name NOT LIKE \u0027%Test%\u0027\r\n) AND aa.Id NOT IN (94, 78, 288, 2478, 2479)\r\nAND aa.Id \u003c\u003d 500 -- limit it so we\u0027re not importing parcels whose admin area is a regional district" + } + } + ], + "consumers": [ + { + "type": "databaseTransferConsumer" + } + ], + "configuration": { + "maxJobCount": 1.0, + "showFinalMessage": true, + "DatabaseTransferProducer": { + "extractType": "SEGMENTS", + "segmentSize": 100.0, + "fetchSize": 10000.0, + "openNewConnections": false, + "queryRowCount": false, + "selectedColumnsOnly": false, + "selectedRowsOnly": false + }, + "DatabaseTransferConsumer": { + "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", + "openNewConnections": true, + "useTransactions": true, + "commitAfterRows": 1000.0, + "useMultiRowInsert": false, + "multiRowInsertBatch": 500.0, + "skipBindValues": false, + "disableUsingBatches": true, + "ignoreDuplicateRows": false, + "transferAutoGeneratedColumns": true, + "disableReferentialIntegrity": false, + "useBulkLoad": false, + "truncateBeforeLoad": false, + "openTableOnFinish": true, + "mappings": { + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT p.[Id],\r\n p.[CreatedById],\r\n p.[CreatedOn],\r\n p.[UpdatedById],\r\n p.[UpdatedOn],\r\n p.[Name],\r\n p.[Description],\r\n p.[ClassificationId],\r\n p.[AgencyId],\r\n p.[IsSensitive],\r\n p.[IsVisibleToOtherAgencies],\r\n p.[PID],\r\n p.[PIN],\r\n p.[LandArea],\r\n p.[LandLegalDescription],\r\n p.[Zoning],\r\n p.[ZoningPotential],\r\n p.[NotOwned],\r\n\tCONVERT(VARCHAR(40), CAST(Location.Long AS DECIMAL(18, 14))) + \u0027, \u0027 + CONVERT(VARCHAR(40), CAST(Location.Lat AS DECIMAL(18, 14))) AS Location,\r\n\taa.Id as AdministrativeAreaId,\r\n\ta.Address1, \r\n\ta.Postal\r\nFROM \r\n [pims].[dbo].[Parcels] p\r\n\tINNER JOIN Addresses a\r\n\tON p.AddressId \u003d a.Id\r\n\tINNER JOIN AdministrativeAreas aa\r\n\tON aa.Name \u003d a.AdministrativeArea\r\nWHERE aa.Id NOT IN (\r\n\r\nSELECT Id\r\nFROM AdministrativeAreas a\r\nWHERE a.Name NOT IN (\r\nSELECT [Name]\r\n FROM [pims].[dbo].[AdminAreaswithRegionalDistricts]\r\n )\r\n and a.Name NOT LIKE \u0027%District%\u0027 and a.Name NOT LIKE \u0027%Test%\u0027\r\n) AND aa.Id NOT IN (94, 78, 288, 2478, 2479)\r\nAND aa.Id \u003c\u003d 500 -- limit it so we\u0027re not importing parcels whose admin area is a regional district": { + "targetName": "parcels", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "id", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "createdbyid", + "mappingType": "existing" + }, + "createdon": { + "targetName": "createdon", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "updatedbyid", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "updatedon", + "mappingType": "existing" + }, + "Name": { + "targetName": "Name", + "mappingType": "existing" + }, + "description": { + "targetName": "description", + "mappingType": "existing" + }, + "classificationid": { + "targetName": "classificationid", + "mappingType": "existing" + }, + "agencyid": { + "targetName": "agencyid", + "mappingType": "existing" + }, + "issensitive": { + "targetName": "issensitive", + "mappingType": "existing" + }, + "isvisibletootheragencies": { + "targetName": "isvisibletootheragencies", + "mappingType": "existing" + }, + "pid": { + "targetName": "pid", + "mappingType": "existing" + }, + "pin": { + "targetName": "pin", + "mappingType": "existing" + }, + "landarea": { + "targetName": "landarea", + "mappingType": "existing" + }, + "landlegaldescription": { + "targetName": "landlegaldescription", + "mappingType": "existing" + }, + "zoning": { + "targetName": "zoning", + "mappingType": "existing" + }, + "zoningpotential": { + "targetName": "zoningpotential", + "mappingType": "existing" + }, + "notowned": { + "targetName": "notowned", + "mappingType": "existing" + }, + "Location": { + "targetName": "Location", + "mappingType": "existing" + }, + "administrativeareaid": { + "targetName": "administrativeareaid", + "mappingType": "existing" + }, + "address1": { + "targetName": "address1", + "mappingType": "existing" + }, + "postal": { + "targetName": "postal", + "mappingType": "existing" + } + } + } + } + }, + "producer": "database_producer", + "consumer": "database_consumer" + } + } + }, + "ed9a5934-5e7d-49ee-8542-f94a23eacbe3": { + "task": "dataExport", + "label": "AdminAreasExport", + "description": "AdminAreasExport", + "taskFolder": "Testing", + "createTime": "202401151014", + "updateTime": "202401151014", + "state": { + "producers": [ + { + "type": "databaseTransferProducer", + "location": { + "type": "query", + "project": "General", + "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", + "defaultCatalog": "pims", + "defaultSchema": "dbo", + "query": "\r\n SELECT b.Id, CAST(\u00272023-01-17 17:58:40.246\u0027 AS datetime)\r\n as CreatedOn, null as UpdatedOn, ar.Name, 0 as IsDisabled, 0 as SortOrder, null as Abbreviation, null as BoundaryType, \u002700000000-0000-0000-0000-000000000000\u0027 as CreatedById, null as UpdatedById, a.Id AS RD_Id\r\n FROM [pims].[dbo].[AdminAreaswithRegionalDistricts] ar\r\n LEFT OUTER JOIN AdministrativeAreas a\r\n ON ar.RD_NAME \u003d a.Name\r\n LEFT OUTER JOIN AdministrativeAreas b\r\n ON b.Name \u003d ar.Name\r\n WHERE ar.RD_NAME \u003c\u003e \u00270\u0027 and b.Id \u003e\u003d 1\r\n ORDER BY ar.Name\r\n" + } + } + ], + "consumers": [ + { + "type": "databaseTransferConsumer" + } + ], + "configuration": { + "maxJobCount": 1.0, + "showFinalMessage": true, + "DatabaseTransferProducer": { + "extractType": "SEGMENTS", + "segmentSize": 1000.0, + "fetchSize": 10000.0, + "openNewConnections": false, + "queryRowCount": false, + "selectedColumnsOnly": false, + "selectedRowsOnly": false + }, + "DatabaseTransferConsumer": { + "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", + "openNewConnections": true, + "useTransactions": true, + "commitAfterRows": 1000.0, + "useMultiRowInsert": false, + "multiRowInsertBatch": 500.0, + "skipBindValues": false, + "disableUsingBatches": false, + "ignoreDuplicateRows": false, + "transferAutoGeneratedColumns": true, + "disableReferentialIntegrity": false, + "useBulkLoad": true, + "truncateBeforeLoad": false, + "openTableOnFinish": true, + "mappings": { + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\n SELECT b.Id, CAST(\u00272023-01-17 17:58:40.246\u0027 AS datetime)\r\n as CreatedOn, null as UpdatedOn, ar.Name, 0 as IsDisabled, 0 as SortOrder, null as Abbreviation, null as BoundaryType, \u002700000000-0000-0000-0000-000000000000\u0027 as CreatedById, null as UpdatedById, a.Id AS RD_Id\r\n FROM [pims].[dbo].[AdminAreaswithRegionalDistricts] ar\r\n LEFT OUTER JOIN AdministrativeAreas a\r\n ON ar.RD_NAME \u003d a.Name\r\n LEFT OUTER JOIN AdministrativeAreas b\r\n ON b.Name \u003d ar.Name\r\n WHERE ar.RD_NAME \u003c\u003e \u00270\u0027 and b.Id \u003e\u003d 1\r\n ORDER BY ar.Name\r\n": { + "targetName": "administrative_areas", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "id", + "mappingType": "existing" + }, + "createdon": { + "targetName": "createdon", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "updatedon", + "mappingType": "existing" + }, + "Name": { + "targetName": "Name", + "mappingType": "existing" + }, + "isdisabled": { + "targetName": "isdisabled", + "mappingType": "existing" + }, + "sortorder": { + "targetName": "sortorder", + "mappingType": "existing" + }, + "abbreviation": { + "targetName": "abbreviation", + "mappingType": "existing" + }, + "boundarytype": { + "targetName": "boundarytype", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "createdbyid", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "updatedbyid", + "mappingType": "existing" + }, + "rd_id": { + "targetName": "\"RegionalDistrictId\"", + "mappingType": "existing" + } + } + } + } + }, + "producer": "database_producer", + "consumer": "database_consumer" + } + } + }, + "72b2e3cf-c2c3-4b56-b94d-42f5f012dde0": { + "task": "dataExport", + "label": "New Admin Areas", + "description": "", + "taskFolder": "Testing", + "createTime": "202401171130", + "updateTime": "202401171130", + "state": { + "producers": [ + { + "type": "databaseTransferProducer", + "location": { + "type": "query", + "project": "General", + "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", + "query": " SELECT a.Id, CAST(\u00272023-01-17 17:58:40.246\u0027 AS datetime)\r\n as CreatedOn, null as UpdatedOn, ar.Name, 0 as IsDisabled, 0 as SortOrder, null as Abbreviation, null as BoundaryType, \u002700000000-0000-0000-0000-000000000000\u0027 as CreatedById, null as UpdatedById, ar.Regional_District, b.Id AS RD_Id\r\n FROM [pims].[dbo].[AdminAreasCurrentlyInPIMS_RDsImported] ar\r\n INNER JOIN AdministrativeAreas a\r\n ON ar.Id \u003d a.Id\r\n LEFT OUTER JOIN AdministrativeAreas b\r\n ON b.Name \u003d ar.Regional_District\r\nORDER By a.Name" + } + } + ], + "consumers": [ + { + "type": "databaseTransferConsumer" + } + ], + "configuration": { + "maxJobCount": 1, + "showFinalMessage": true, + "DatabaseTransferProducer": { + "extractType": "SEGMENTS", + "segmentSize": 1000, + "fetchSize": 10000, + "openNewConnections": false, + "queryRowCount": false, + "selectedColumnsOnly": false, + "selectedRowsOnly": false + }, + "DatabaseTransferConsumer": { + "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", + "openNewConnections": true, + "useTransactions": true, + "commitAfterRows": 1000, + "useMultiRowInsert": false, + "multiRowInsertBatch": 500, + "skipBindValues": false, + "disableUsingBatches": true, + "ignoreDuplicateRows": false, + "transferAutoGeneratedColumns": true, + "disableReferentialIntegrity": true, + "useBulkLoad": false, + "truncateBeforeLoad": false, + "openTableOnFinish": true, + "mappings": { + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/ SELECT a.Id, CAST(\u00272023-01-17 17:58:40.246\u0027 AS datetime)\r\n as CreatedOn, null as UpdatedOn, ar.Name, 0 as IsDisabled, 0 as SortOrder, null as Abbreviation, null as BoundaryType, \u002700000000-0000-0000-0000-000000000000\u0027 as CreatedById, null as UpdatedById, ar.Regional_District, b.Id AS RD_Id\r\n FROM [pims].[dbo].[AdminAreasCurrentlyInPIMS_RDsImported] ar\r\n INNER JOIN AdministrativeAreas a\r\n ON ar.Id \u003d a.Id\r\n LEFT OUTER JOIN AdministrativeAreas b\r\n ON b.Name \u003d ar.Regional_District\r\nORDER By a.Name": { + "targetName": "administrative_areas", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "id", + "mappingType": "existing" + }, + "createdon": { + "targetName": "createdon", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "updatedon", + "mappingType": "existing" + }, + "name": { + "targetName": "name", + "mappingType": "existing" + }, + "isdisabled": { + "targetName": "isdisabled", + "mappingType": "existing" + }, + "sortorder": { + "targetName": "sortorder", + "mappingType": "existing" + }, + "abbreviation": { + "targetName": "abbreviation", + "mappingType": "existing" + }, + "boundarytype": { + "targetName": "boundarytype", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "createdbyid", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "updatedbyid", + "mappingType": "existing" + }, + "regional_district": { + "targetName": "regional_district", + "mappingType": "skip" + }, + "rd_id": { + "targetName": "\"RegionalDistrictId\"", + "mappingType": "existing" + } + } + } + } + }, + "producer": "database_producer", + "consumer": "database_consumer" + } + } + }, + "49fa42d1-ee3a-4f6c-a1ad-a6ff2f2b0ccf": { + "task": "dataExport", + "label": "Parcels Export", + "description": "testing", + "taskFolder": "Testing", + "createTime": "202401191634", + "updateTime": "202401191634", + "state": { + "producers": [ + { + "type": "databaseTransferProducer", + "location": { + "type": "query", + "project": "General", + "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", + "defaultCatalog": "pims", + "defaultSchema": "dbo", + "query": "\r\nSELECT p.[Id],\r\n\t CASE \r\n\t\tWHEN p.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE p.[CreatedById]\r\n\t END AS [CreatedById],\r\n p.[CreatedOn],\r\n p.[UpdatedById],\r\n p.[UpdatedOn],\r\n p.[Name],\r\n p.[Description],\r\n p.[ClassificationId],\r\n p.[AgencyId],\r\n p.[IsSensitive],\r\n p.[IsVisibleToOtherAgencies],\r\n p.[PID],\r\n p.[PIN],\r\n p.[LandArea],\r\n p.[LandLegalDescription],\r\n p.[Zoning],\r\n p.[ZoningPotential],\r\n p.[NotOwned],\r\n\tCONVERT(VARCHAR(40), CAST(Location.Long AS DECIMAL(18, 14))) + \u0027, \u0027 + CONVERT(VARCHAR(40), CAST(Location.Lat AS DECIMAL(18, 14))) AS Location,\r\n CASE \r\n WHEN a.AdministrativeArea \u003d \u0027The Corporation of the City of Nelson\u0027 THEN 188\r\n WHEN a.AdministrativeArea \u003d \u0027Township of Langley\u0027 THEN 150\r\n WHEN a.AdministrativeArea \u003d \u0027District of North Vancouver\u0027 THEN 196\r\n WHEN a.AdministrativeArea \u003d \u0027Coombs\u0027 THEN 483\r\n WHEN a.AdministrativeArea \u003d \u0027Brookmere\u0027 THEN 481\r\n WHEN a.AdministrativeArea \u003d \u0027Thornhill\u0027 THEN 501\r\n WHEN a.AdministrativeArea \u003d \u0027Two Mile\u0027 THEN 502\r\n WHEN a.AdministrativeArea \u003d \u0027Crofton\u0027 THEN 484\r\n WHEN a.AdministrativeArea \u003d \u0027East Sooke\u0027 THEN 485\r\n WHEN a.AdministrativeArea \u003d \u0027Mudge Island\u0027 THEN 492\r\n WHEN a.AdministrativeArea \u003d \u0027Coal Harbour\u0027 THEN 482\r\n WHEN a.AdministrativeArea \u003d \u0027Miworth\u0027 THEN 490\r\n WHEN a.AdministrativeArea \u003d \u0027Lake Errock\u0027 THEN 489\r\n WHEN a.AdministrativeArea \u003d \u0027Black Creek\u0027 THEN 479\r\n WHEN a.AdministrativeArea \u003d \u0027Whaletown\u0027 THEN 504\r\n WHEN a.AdministrativeArea \u003d \u0027Quathiaski Cove\u0027 THEN 494\r\n WHEN a.AdministrativeArea \u003d \u0027Big Bay in Stuart Island\u0027 THEN 478\r\n WHEN a.AdministrativeArea \u003d \u0027Surge Narrows in Read Island\u0027 THEN 500\r\n WHEN a.AdministrativeArea \u003d \u0027Rock Bay in Sayward\u0027 THEN 497\r\n WHEN a.AdministrativeArea \u003d \u0027Granite Bay in Quadra Island\u0027 THEN 487\r\n WHEN a.AdministrativeArea \u003d \u0027Moberly Lake\u0027 THEN 491\r\n WHEN a.AdministrativeArea \u003d \u0027Quatsino\u0027 THEN 495\r\n WHEN a.AdministrativeArea \u003d \u0027Bouchie Lake\u0027 THEN 480\r\n WHEN a.AdministrativeArea \u003d \u0027West Lake\u0027 THEN 503\r\n WHEN a.AdministrativeArea \u003d \u0027Salmon Valley\u0027 THEN 498\t\t\r\n WHEN a.AdministrativeArea \u003d \u0027Red Rock\u0027 THEN 496\r\n WHEN a.AdministrativeArea \u003d \u0027Stoner\u0027 THEN 499\r\n WHEN a.AdministrativeArea \u003d \u0027Pineview FFG\u0027 THEN 493\r\n WHEN a.AdministrativeArea \u003d \u0027Wonowon\u0027 THEN 506\r\n WHEN a.AdministrativeArea \u003d \u0027Halfway River\u0027 THEN 488\r\n WHEN a.AdministrativeArea \u003d \u0027Giscome\u0027 THEN 486\r\n WHEN a.AdministrativeArea \u003d \u0027Willow River\u0027 THEN 505\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lower Nicola\u0027 THEN 314\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Belcarra\u0027 THEN 425\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Tsawwassen\u0027 THEN 315\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Anmore\u0027 THEN 432\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lake Cowichan\u0027 THEN 442\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027North Cowichan\u0027 THEN 450\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Port Edward\u0027 THEN 347\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Spallumcheen\u0027 THEN 318\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Jumbo Glacier Mountain Resort Municipality\u0027 THEN 438\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Kent\u0027 THEN 439\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Highlands\u0027 THEN 348\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Slocan\u0027 THEN 380\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Warfield\u0027 THEN 448\r\n ELSE aa.Id \r\n END AS AdministrativeAreaId, \r\n\ta.AdministrativeArea,\r\n\ta.Address1, \r\n\ta.Postal,\r\n\tpp.ParcelId as ParentID,\r\n\t0 as PropertyTypeID\r\nFROM \r\n [pims].[dbo].[Parcels] p\r\n\tINNER JOIN Addresses a\r\n\tON p.AddressId \u003d a.Id\r\n\tLEFT OUTER JOIN AdministrativeAreas aa\r\n\tON aa.Name \u003d a.AdministrativeArea\r\n    LEFT OUTER JOIN ParcelParcels pp\r\n    ON pp.SubdivisionId \u003d p.Id" + } + } + ], + "consumers": [ + { + "type": "databaseTransferConsumer" + } + ], + "configuration": { + "maxJobCount": 1, + "showFinalMessage": true, + "DatabaseTransferProducer": { + "extractType": "SEGMENTS", + "segmentSize": 1000, + "fetchSize": 10000, + "openNewConnections": false, + "queryRowCount": false, + "selectedColumnsOnly": false, + "selectedRowsOnly": false + }, + "DatabaseTransferConsumer": { + "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", + "openNewConnections": true, + "useTransactions": true, + "commitAfterRows": 1000, + "useMultiRowInsert": false, + "multiRowInsertBatch": 500, + "skipBindValues": false, + "disableUsingBatches": true, + "ignoreDuplicateRows": false, + "transferAutoGeneratedColumns": true, + "disableReferentialIntegrity": false, + "useBulkLoad": false, + "truncateBeforeLoad": false, + "openTableOnFinish": true, + "mappings": { + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT p.[Id],\r\n\t CASE \r\n\t\tWHEN p.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE p.[CreatedById]\r\n\t END AS [CreatedById],\r\n p.[CreatedOn],\r\n p.[UpdatedById],\r\n p.[UpdatedOn],\r\n p.[Name],\r\n p.[Description],\r\n p.[ClassificationId],\r\n p.[AgencyId],\r\n p.[IsSensitive],\r\n p.[IsVisibleToOtherAgencies],\r\n p.[PID],\r\n p.[PIN],\r\n p.[LandArea],\r\n p.[LandLegalDescription],\r\n p.[Zoning],\r\n p.[ZoningPotential],\r\n p.[NotOwned],\r\n\tCONVERT(VARCHAR(40), CAST(Location.Long AS DECIMAL(18, 14))) + \u0027, \u0027 + CONVERT(VARCHAR(40), CAST(Location.Lat AS DECIMAL(18, 14))) AS Location,\r\n CASE \r\n WHEN a.AdministrativeArea \u003d \u0027The Corporation of the City of Nelson\u0027 THEN 188\r\n WHEN a.AdministrativeArea \u003d \u0027Township of Langley\u0027 THEN 150\r\n WHEN a.AdministrativeArea \u003d \u0027District of North Vancouver\u0027 THEN 196\r\n WHEN a.AdministrativeArea \u003d \u0027Coombs\u0027 THEN 483\r\n WHEN a.AdministrativeArea \u003d \u0027Brookmere\u0027 THEN 481\r\n WHEN a.AdministrativeArea \u003d \u0027Thornhill\u0027 THEN 501\r\n WHEN a.AdministrativeArea \u003d \u0027Two Mile\u0027 THEN 502\r\n WHEN a.AdministrativeArea \u003d \u0027Crofton\u0027 THEN 484\r\n WHEN a.AdministrativeArea \u003d \u0027East Sooke\u0027 THEN 485\r\n WHEN a.AdministrativeArea \u003d \u0027Mudge Island\u0027 THEN 492\r\n WHEN a.AdministrativeArea \u003d \u0027Coal Harbour\u0027 THEN 482\r\n WHEN a.AdministrativeArea \u003d \u0027Miworth\u0027 THEN 490\r\n WHEN a.AdministrativeArea \u003d \u0027Lake Errock\u0027 THEN 489\r\n WHEN a.AdministrativeArea \u003d \u0027Black Creek\u0027 THEN 479\r\n WHEN a.AdministrativeArea \u003d \u0027Whaletown\u0027 THEN 504\r\n WHEN a.AdministrativeArea \u003d \u0027Quathiaski Cove\u0027 THEN 494\r\n WHEN a.AdministrativeArea \u003d \u0027Big Bay in Stuart Island\u0027 THEN 478\r\n WHEN a.AdministrativeArea \u003d \u0027Surge Narrows in Read Island\u0027 THEN 500\r\n WHEN a.AdministrativeArea \u003d \u0027Rock Bay in Sayward\u0027 THEN 497\r\n WHEN a.AdministrativeArea \u003d \u0027Granite Bay in Quadra Island\u0027 THEN 487\r\n WHEN a.AdministrativeArea \u003d \u0027Moberly Lake\u0027 THEN 491\r\n WHEN a.AdministrativeArea \u003d \u0027Quatsino\u0027 THEN 495\r\n WHEN a.AdministrativeArea \u003d \u0027Bouchie Lake\u0027 THEN 480\r\n WHEN a.AdministrativeArea \u003d \u0027West Lake\u0027 THEN 503\r\n WHEN a.AdministrativeArea \u003d \u0027Salmon Valley\u0027 THEN 498\t\t\r\n WHEN a.AdministrativeArea \u003d \u0027Red Rock\u0027 THEN 496\r\n WHEN a.AdministrativeArea \u003d \u0027Stoner\u0027 THEN 499\r\n WHEN a.AdministrativeArea \u003d \u0027Pineview FFG\u0027 THEN 493\r\n WHEN a.AdministrativeArea \u003d \u0027Wonowon\u0027 THEN 506\r\n WHEN a.AdministrativeArea \u003d \u0027Halfway River\u0027 THEN 488\r\n WHEN a.AdministrativeArea \u003d \u0027Giscome\u0027 THEN 486\r\n WHEN a.AdministrativeArea \u003d \u0027Willow River\u0027 THEN 505\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lower Nicola\u0027 THEN 314\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Belcarra\u0027 THEN 425\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Tsawwassen\u0027 THEN 315\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Anmore\u0027 THEN 432\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lake Cowichan\u0027 THEN 442\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027North Cowichan\u0027 THEN 450\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Port Edward\u0027 THEN 347\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Spallumcheen\u0027 THEN 318\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Jumbo Glacier Mountain Resort Municipality\u0027 THEN 438\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Kent\u0027 THEN 439\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Highlands\u0027 THEN 348\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Slocan\u0027 THEN 380\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Warfield\u0027 THEN 448\r\n ELSE aa.Id \r\n END AS AdministrativeAreaId, \r\n\ta.AdministrativeArea,\r\n\ta.Address1, \r\n\ta.Postal,\r\n\tpp.ParcelId as ParentID,\r\n\t0 as PropertyTypeID\r\nFROM \r\n [pims].[dbo].[Parcels] p\r\n\tINNER JOIN Addresses a\r\n\tON p.AddressId \u003d a.Id\r\n\tLEFT OUTER JOIN AdministrativeAreas aa\r\n\tON aa.Name \u003d a.AdministrativeArea\r\n    LEFT OUTER JOIN ParcelParcels pp\r\n    ON pp.SubdivisionId \u003d p.Id": { + "targetName": "parcel", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "id", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "createdbyid", + "mappingType": "existing" + }, + "createdon": { + "targetName": "createdon", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "updatedbyid", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "updatedon", + "mappingType": "existing" + }, + "Name": { + "targetName": "Name", + "mappingType": "existing" + }, + "description": { + "targetName": "description", + "mappingType": "existing" + }, + "classificationid": { + "targetName": "classificationid", + "mappingType": "existing" + }, + "agencyid": { + "targetName": "agencyid", + "mappingType": "existing" + }, + "issensitive": { + "targetName": "issensitive", + "mappingType": "existing" + }, + "isvisibletootheragencies": { + "targetName": "isvisibletootheragencies", + "mappingType": "existing" + }, + "pid": { + "targetName": "pid", + "mappingType": "existing" + }, + "pin": { + "targetName": "pin", + "mappingType": "existing" + }, + "landarea": { + "targetName": "landarea", + "mappingType": "existing" + }, + "landlegaldescription": { + "targetName": "landlegaldescription", + "mappingType": "existing" + }, + "zoning": { + "targetName": "zoning", + "mappingType": "existing" + }, + "zoningpotential": { + "targetName": "zoningpotential", + "mappingType": "existing" + }, + "notowned": { + "targetName": "notowned", + "mappingType": "existing" + }, + "Location": { + "targetName": "Location", + "mappingType": "existing" + }, + "administrativeareaid": { + "targetName": "administrativeareaid", + "mappingType": "existing" + }, + "administrativearea": { + "targetName": "administrativearea", + "mappingType": "existing" + }, + "address1": { + "targetName": "address1", + "mappingType": "existing" + }, + "postal": { + "targetName": "postal", + "mappingType": "existing" + }, + "parentid": { + "targetName": "parentid", + "mappingType": "existing" + }, + "propertytypeid": { + "targetName": "propertytypeid", + "mappingType": "existing" + } + } + } + } + }, + "producer": "database_producer", + "consumer": "database_consumer" + } + } + }, + "c711aced-f90c-449c-85b6-3a09df40c1a2": { + "task": "dataExport", + "label": "BuildingsExport", + "description": "", + "taskFolder": "Testing", + "createTime": "202401191638", + "updateTime": "202401191638", + "state": { + "producers": [ + { + "type": "databaseTransferProducer", + "location": { + "type": "query", + "project": "General", + "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", + "query": "SELECT p.[Id],\r\n\tCASE \r\n\t WHEN p.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t ELSE p.[CreatedById]\r\n\tEND AS [CreatedById],\r\n p.[CreatedOn],\r\n p.[UpdatedById],\r\n p.[UpdatedOn],\r\n p.[Name],\r\n p.[Description],\r\n p.[ClassificationId],\r\n p.BuildingConstructionTypeId,\r\n p.[AgencyId],\r\n p.[IsSensitive],\r\n p.[IsVisibleToOtherAgencies],\r\n\tp.BuildingFloorCount,\r\n\tp.BuildingPredominateUseId,\r\n\tp.BuildingTenancy,\r\n\tp.RentableArea,\r\n\tp.BuildingOccupantTypeId,\r\n\tp.LeaseExpiry,\r\n\tp.OccupantName,\r\n\tp.TransferLeaseOnSale,\r\n\tp.BuildingTenancyUpdatedOn,\r\n\tp.EncumbranceReason,\r\n\tp.LeasedLandMetadata,\r\n\tp.TotalArea,\r\n\tCONVERT(VARCHAR(40), CAST(Location.Long AS DECIMAL(18, 14))) + \u0027, \u0027 + CONVERT(VARCHAR(40), CAST(Location.Lat AS DECIMAL(18, 14))) AS Location,\r\n\tCASE \r\n WHEN a.AdministrativeArea \u003d \u0027The Corporation of the City of Nelson\u0027 THEN 188\r\n WHEN a.AdministrativeArea \u003d \u0027Township of Langley\u0027 THEN 150\r\n WHEN a.AdministrativeArea \u003d \u0027District of North Vancouver\u0027 THEN 196\r\n WHEN a.AdministrativeArea \u003d \u0027Coombs\u0027 THEN 483\r\n WHEN a.AdministrativeArea \u003d \u0027Brookmere\u0027 THEN 481\r\n WHEN a.AdministrativeArea \u003d \u0027Thornhill\u0027 THEN 501\r\n WHEN a.AdministrativeArea \u003d \u0027Two Mile\u0027 THEN 502\r\n WHEN a.AdministrativeArea \u003d \u0027Crofton\u0027 THEN 484\r\n WHEN a.AdministrativeArea \u003d \u0027East Sooke\u0027 THEN 485\r\n WHEN a.AdministrativeArea \u003d \u0027Mudge Island\u0027 THEN 492\r\n WHEN a.AdministrativeArea \u003d \u0027Coal Harbour\u0027 THEN 482\r\n WHEN a.AdministrativeArea \u003d \u0027Miworth\u0027 THEN 490\r\n WHEN a.AdministrativeArea \u003d \u0027Lake Errock\u0027 THEN 489\r\n WHEN a.AdministrativeArea \u003d \u0027Black Creek\u0027 THEN 479\r\n WHEN a.AdministrativeArea \u003d \u0027Whaletown\u0027 THEN 504\r\n WHEN a.AdministrativeArea \u003d \u0027Quathiaski Cove\u0027 THEN 494\r\n WHEN a.AdministrativeArea \u003d \u0027Big Bay in Stuart Island\u0027 THEN 478\r\n WHEN a.AdministrativeArea \u003d \u0027Surge Narrows in Read Island\u0027 THEN 500\r\n WHEN a.AdministrativeArea \u003d \u0027Rock Bay in Sayward\u0027 THEN 497\r\n WHEN a.AdministrativeArea \u003d \u0027Granite Bay in Quadra Island\u0027 THEN 487\r\n WHEN a.AdministrativeArea \u003d \u0027Moberly Lake\u0027 THEN 491\r\n WHEN a.AdministrativeArea \u003d \u0027Quatsino\u0027 THEN 495\r\n WHEN a.AdministrativeArea \u003d \u0027Bouchie Lake\u0027 THEN 480\r\n WHEN a.AdministrativeArea \u003d \u0027West Lake\u0027 THEN 503\r\n WHEN a.AdministrativeArea \u003d \u0027Salmon Valley\u0027 THEN 498\t\t\r\n WHEN a.AdministrativeArea \u003d \u0027Red Rock\u0027 THEN 496\r\n WHEN a.AdministrativeArea \u003d \u0027Stoner\u0027 THEN 499\r\n WHEN a.AdministrativeArea \u003d \u0027Pineview FFG\u0027 THEN 493\r\n WHEN a.AdministrativeArea \u003d \u0027Wonowon\u0027 THEN 506\r\n WHEN a.AdministrativeArea \u003d \u0027Halfway River\u0027 THEN 488\r\n WHEN a.AdministrativeArea \u003d \u0027Giscome\u0027 THEN 486\r\n WHEN a.AdministrativeArea \u003d \u0027Willow River\u0027 THEN 505\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lower Nicola\u0027 THEN 314\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Belcarra\u0027 THEN 425\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Tsawwassen\u0027 THEN 315\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Anmore\u0027 THEN 432\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lake Cowichan\u0027 THEN 442\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027North Cowichan\u0027 THEN 450\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Port Edward\u0027 THEN 347\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Spallumcheen\u0027 THEN 318\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Jumbo Glacier Mountain Resort Municipality\u0027 THEN 438\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Kent\u0027 THEN 439\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Highlands\u0027 THEN 348\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Slocan\u0027 THEN 380\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Warfield\u0027 THEN 448\r\n ELSE aa.Id \r\n END AS AdministrativeAreaId, \r\n\ta.Address1, \r\n\ta.Postal,\r\n\t1 as PropertyTypeID\r\nFROM \r\n [pims].[dbo].Buildings p\r\n\tINNER JOIN Addresses a\r\n\tON p.AddressId \u003d a.Id\r\n\tLEFT OUTER JOIN AdministrativeAreas aa\r\n\tON aa.Name \u003d a.AdministrativeArea\r\nWHERE p.BuildingPredominateUseId \u003c\u003d 54" + } + } + ], + "consumers": [ + { + "type": "databaseTransferConsumer" + } + ], + "configuration": { + "maxJobCount": 1, + "showFinalMessage": true, + "DatabaseTransferProducer": { + "extractType": "SEGMENTS", + "segmentSize": 1000, + "fetchSize": 10000, + "openNewConnections": false, + "queryRowCount": false, + "selectedColumnsOnly": false, + "selectedRowsOnly": false + }, + "DatabaseTransferConsumer": { + "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", + "openNewConnections": true, + "useTransactions": true, + "commitAfterRows": 1000, + "useMultiRowInsert": false, + "multiRowInsertBatch": 500, + "skipBindValues": false, + "disableUsingBatches": true, + "ignoreDuplicateRows": false, + "transferAutoGeneratedColumns": true, + "disableReferentialIntegrity": false, + "useBulkLoad": false, + "truncateBeforeLoad": false, + "openTableOnFinish": true, + "mappings": { + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT p.[Id],\r\n\tCASE \r\n\t WHEN p.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t ELSE p.[CreatedById]\r\n\tEND AS [CreatedById],\r\n p.[CreatedOn],\r\n p.[UpdatedById],\r\n p.[UpdatedOn],\r\n p.[Name],\r\n p.[Description],\r\n p.[ClassificationId],\r\n p.BuildingConstructionTypeId,\r\n p.[AgencyId],\r\n p.[IsSensitive],\r\n p.[IsVisibleToOtherAgencies],\r\n\tp.BuildingFloorCount,\r\n\tp.BuildingPredominateUseId,\r\n\tp.BuildingTenancy,\r\n\tp.RentableArea,\r\n\tp.BuildingOccupantTypeId,\r\n\tp.LeaseExpiry,\r\n\tp.OccupantName,\r\n\tp.TransferLeaseOnSale,\r\n\tp.BuildingTenancyUpdatedOn,\r\n\tp.EncumbranceReason,\r\n\tp.LeasedLandMetadata,\r\n\tp.TotalArea,\r\n\tCONVERT(VARCHAR(40), CAST(Location.Long AS DECIMAL(18, 14))) + \u0027, \u0027 + CONVERT(VARCHAR(40), CAST(Location.Lat AS DECIMAL(18, 14))) AS Location,\r\n\tCASE \r\n WHEN a.AdministrativeArea \u003d \u0027The Corporation of the City of Nelson\u0027 THEN 188\r\n WHEN a.AdministrativeArea \u003d \u0027Township of Langley\u0027 THEN 150\r\n WHEN a.AdministrativeArea \u003d \u0027District of North Vancouver\u0027 THEN 196\r\n WHEN a.AdministrativeArea \u003d \u0027Coombs\u0027 THEN 483\r\n WHEN a.AdministrativeArea \u003d \u0027Brookmere\u0027 THEN 481\r\n WHEN a.AdministrativeArea \u003d \u0027Thornhill\u0027 THEN 501\r\n WHEN a.AdministrativeArea \u003d \u0027Two Mile\u0027 THEN 502\r\n WHEN a.AdministrativeArea \u003d \u0027Crofton\u0027 THEN 484\r\n WHEN a.AdministrativeArea \u003d \u0027East Sooke\u0027 THEN 485\r\n WHEN a.AdministrativeArea \u003d \u0027Mudge Island\u0027 THEN 492\r\n WHEN a.AdministrativeArea \u003d \u0027Coal Harbour\u0027 THEN 482\r\n WHEN a.AdministrativeArea \u003d \u0027Miworth\u0027 THEN 490\r\n WHEN a.AdministrativeArea \u003d \u0027Lake Errock\u0027 THEN 489\r\n WHEN a.AdministrativeArea \u003d \u0027Black Creek\u0027 THEN 479\r\n WHEN a.AdministrativeArea \u003d \u0027Whaletown\u0027 THEN 504\r\n WHEN a.AdministrativeArea \u003d \u0027Quathiaski Cove\u0027 THEN 494\r\n WHEN a.AdministrativeArea \u003d \u0027Big Bay in Stuart Island\u0027 THEN 478\r\n WHEN a.AdministrativeArea \u003d \u0027Surge Narrows in Read Island\u0027 THEN 500\r\n WHEN a.AdministrativeArea \u003d \u0027Rock Bay in Sayward\u0027 THEN 497\r\n WHEN a.AdministrativeArea \u003d \u0027Granite Bay in Quadra Island\u0027 THEN 487\r\n WHEN a.AdministrativeArea \u003d \u0027Moberly Lake\u0027 THEN 491\r\n WHEN a.AdministrativeArea \u003d \u0027Quatsino\u0027 THEN 495\r\n WHEN a.AdministrativeArea \u003d \u0027Bouchie Lake\u0027 THEN 480\r\n WHEN a.AdministrativeArea \u003d \u0027West Lake\u0027 THEN 503\r\n WHEN a.AdministrativeArea \u003d \u0027Salmon Valley\u0027 THEN 498\t\t\r\n WHEN a.AdministrativeArea \u003d \u0027Red Rock\u0027 THEN 496\r\n WHEN a.AdministrativeArea \u003d \u0027Stoner\u0027 THEN 499\r\n WHEN a.AdministrativeArea \u003d \u0027Pineview FFG\u0027 THEN 493\r\n WHEN a.AdministrativeArea \u003d \u0027Wonowon\u0027 THEN 506\r\n WHEN a.AdministrativeArea \u003d \u0027Halfway River\u0027 THEN 488\r\n WHEN a.AdministrativeArea \u003d \u0027Giscome\u0027 THEN 486\r\n WHEN a.AdministrativeArea \u003d \u0027Willow River\u0027 THEN 505\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lower Nicola\u0027 THEN 314\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Belcarra\u0027 THEN 425\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Tsawwassen\u0027 THEN 315\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Anmore\u0027 THEN 432\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lake Cowichan\u0027 THEN 442\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027North Cowichan\u0027 THEN 450\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Port Edward\u0027 THEN 347\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Spallumcheen\u0027 THEN 318\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Jumbo Glacier Mountain Resort Municipality\u0027 THEN 438\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Kent\u0027 THEN 439\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Highlands\u0027 THEN 348\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Slocan\u0027 THEN 380\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Warfield\u0027 THEN 448\r\n ELSE aa.Id \r\n END AS AdministrativeAreaId, \r\n\ta.Address1, \r\n\ta.Postal,\r\n\t1 as PropertyTypeID\r\nFROM \r\n [pims].[dbo].Buildings p\r\n\tINNER JOIN Addresses a\r\n\tON p.AddressId \u003d a.Id\r\n\tLEFT OUTER JOIN AdministrativeAreas aa\r\n\tON aa.Name \u003d a.AdministrativeArea\r\nWHERE p.BuildingPredominateUseId \u003c\u003d 54": { + "targetName": "building", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "id", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "createdbyid", + "mappingType": "existing" + }, + "createdon": { + "targetName": "createdon", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "updatedbyid", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "updatedon", + "mappingType": "existing" + }, + "Name": { + "targetName": "Name", + "mappingType": "existing" + }, + "description": { + "targetName": "description", + "mappingType": "existing" + }, + "classificationid": { + "targetName": "classificationid", + "mappingType": "existing" + }, + "buildingconstructiontypeid": { + "targetName": "buildingconstructiontypeid", + "mappingType": "existing" + }, + "agencyid": { + "targetName": "agencyid", + "mappingType": "existing" + }, + "issensitive": { + "targetName": "issensitive", + "mappingType": "existing" + }, + "isvisibletootheragencies": { + "targetName": "isvisibletootheragencies", + "mappingType": "existing" + }, + "buildingfloorcount": { + "targetName": "buildingfloorcount", + "mappingType": "existing" + }, + "buildingpredominateuseid": { + "targetName": "buildingpredominateuseid", + "mappingType": "existing" + }, + "buildingtenancy": { + "targetName": "buildingtenancy", + "mappingType": "existing" + }, + "rentablearea": { + "targetName": "rentablearea", + "mappingType": "existing" + }, + "buildingoccupanttypeid": { + "targetName": "buildingoccupanttypeid", + "mappingType": "existing" + }, + "leaseexpiry": { + "targetName": "leaseexpiry", + "mappingType": "existing" + }, + "occupantname": { + "targetName": "occupantname", + "mappingType": "existing" + }, + "transferleaseonsale": { + "targetName": "transferleaseonsale", + "mappingType": "existing" + }, + "buildingtenancyupdatedon": { + "targetName": "buildingtenancyupdatedon", + "mappingType": "existing" + }, + "encumbrancereason": { + "targetName": "encumbrancereason", + "mappingType": "existing" + }, + "leasedlandmetadata": { + "targetName": "leasedlandmetadata", + "mappingType": "existing" + }, + "totalarea": { + "targetName": "totalarea", + "mappingType": "existing" + }, + "Location": { + "targetName": "Location", + "mappingType": "existing" + }, + "administrativeareaid": { + "targetName": "administrativeareaid", + "mappingType": "existing" + }, + "address1": { + "targetName": "address1", + "mappingType": "existing" + }, + "postal": { + "targetName": "postal", + "mappingType": "existing" + }, + "propertytypeid": { + "targetName": "propertytypeid", + "mappingType": "existing" + } + } + } + } + }, + "producer": "database_producer", + "consumer": "database_consumer" + } + } + }, + "1181bce6-993f-4a79-b9a6-658b9faa5405": { + "task": "dataExport", + "label": "ParcelBuildingsExport", + "description": "", + "taskFolder": "Testing", + "createTime": "202401191656", + "updateTime": "202401191656", + "state": { + "producers": [ + { + "type": "databaseTransferProducer", + "location": { + "type": "query", + "project": "General", + "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", + "query": "\r\nSELECT pb.*\r\n FROM [pims].[dbo].ParcelBuildings pb\r\n INNER JOIN Buildings b\r\n ON b.Id \u003d pb.BuildingId\r\n WHERE b.BuildingPredominateUseId \u003c\u003d 54" + } + } + ], + "consumers": [ + { + "type": "databaseTransferConsumer" + } + ], + "configuration": { + "maxJobCount": 1, + "showFinalMessage": true, + "DatabaseTransferProducer": { + "extractType": "SEGMENTS", + "segmentSize": 100, + "fetchSize": 10000, + "openNewConnections": false, + "queryRowCount": false, + "selectedColumnsOnly": false, + "selectedRowsOnly": false + }, + "DatabaseTransferConsumer": { + "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", + "openNewConnections": true, + "useTransactions": true, + "commitAfterRows": 1000, + "useMultiRowInsert": false, + "multiRowInsertBatch": 500, + "skipBindValues": false, + "disableUsingBatches": true, + "ignoreDuplicateRows": false, + "transferAutoGeneratedColumns": true, + "disableReferentialIntegrity": false, + "useBulkLoad": false, + "truncateBeforeLoad": false, + "openTableOnFinish": true, + "mappings": { + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ParcelBuildings": { + "targetName": "parcel_buildings", + "mappingType": "create", + "attributes": { + "parcelid": { + "targetName": "\"ParcelId\"", + "mappingType": "create" + }, + "buildingid": { + "targetName": "\"BuildingId\"", + "mappingType": "create" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "create" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "create" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "create" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "create" + }, + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT pb.*\r\n FROM [pims].[dbo].ParcelBuildings pb\r\n INNER JOIN Buildings b\r\n ON b.Id \u003d pb.BuildingId\r\n WHERE b.BuildingPredominateUseId \u003c\u003d 54": { + "targetName": "parcel_building", + "mappingType": "existing", + "attributes": { + "parcelid": { + "targetName": "parcelid", + "mappingType": "existing" + }, + "buildingid": { + "targetName": "buildingid", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "createdbyid", + "mappingType": "existing" + }, + "createdon": { + "targetName": "createdon", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "updatedbyid", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "updatedon", + "mappingType": "existing" + }, + "rowversion": { + "targetName": "rowversion", + "mappingType": "skip" + } + } + } + } + }, + "producer": "database_producer", + "consumer": "database_consumer" + } + } + }, + "22df018a-1bd5-45b6-80f4-6c3882d7f933": { + "task": "dataExport", + "label": "ProjectNotesExport", + "description": "", + "taskFolder": "Testing", + "createTime": "202401241318", + "updateTime": "202401241318", + "state": { + "producers": [ + { + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectNotes" + } + } + ], + "consumers": [ + { + "type": "databaseTransferConsumer" + } + ], + "configuration": { + "maxJobCount": 1.0, + "showFinalMessage": true, + "DatabaseTransferProducer": { + "extractType": "SEGMENTS", + "segmentSize": 100.0, + "fetchSize": 10000.0, + "openNewConnections": false, + "queryRowCount": false, + "selectedColumnsOnly": false, + "selectedRowsOnly": false + }, + "DatabaseTransferConsumer": { + "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", + "openNewConnections": true, + "useTransactions": true, + "commitAfterRows": 1000.0, + "useMultiRowInsert": false, + "multiRowInsertBatch": 500.0, + "skipBindValues": false, + "disableUsingBatches": true, + "ignoreDuplicateRows": false, + "transferAutoGeneratedColumns": true, + "disableReferentialIntegrity": false, + "useBulkLoad": false, + "truncateBeforeLoad": false, + "openTableOnFinish": true, + "mappings": { + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectNotes": { + "targetName": "project_notes", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "projectid": { + "targetName": "\"ProjectId\"", + "mappingType": "existing" + }, + "notetype": { + "targetName": "\"NoteType\"", + "mappingType": "existing" + }, + "note": { + "targetName": "\"Note\"", + "mappingType": "existing" + } + } + } + } + }, + "producer": "database_producer", + "consumer": "database_consumer" + } + } + }, + "ae48a9c7-29e3-4306-a46f-9e39d09bd222": { + "task": "dataExport", + "label": "ProjectPropertiesExport", + "description": "", + "taskFolder": "Testing", + "createTime": "202401241343", + "updateTime": "202401241343", + "state": { + "producers": [ + { + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectProperties" + } + } + ], + "consumers": [ + { + "type": "databaseTransferConsumer" + } + ], + "configuration": { + "maxJobCount": 1.0, + "showFinalMessage": true, + "DatabaseTransferProducer": { + "extractType": "SEGMENTS", + "segmentSize": 100.0, + "fetchSize": 10000.0, + "openNewConnections": false, + "queryRowCount": false, + "selectedColumnsOnly": false, + "selectedRowsOnly": false + }, + "DatabaseTransferConsumer": { + "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", + "openNewConnections": true, + "useTransactions": true, + "commitAfterRows": 1000.0, + "useMultiRowInsert": false, + "multiRowInsertBatch": 500.0, + "skipBindValues": false, + "disableUsingBatches": true, + "ignoreDuplicateRows": false, + "transferAutoGeneratedColumns": true, + "disableReferentialIntegrity": false, + "useBulkLoad": false, + "truncateBeforeLoad": false, + "openTableOnFinish": true, + "mappings": { + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectProperties": { + "targetName": "project_properties", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "projectid": { + "targetName": "\"ProjectId\"", + "mappingType": "existing" + }, + "propertytype": { + "targetName": "\"PropertyType\"", + "mappingType": "existing" + }, + "parcelid": { + "targetName": "\"ParcelId\"", + "mappingType": "existing" + }, + "buildingid": { + "targetName": "\"BuildingId\"", + "mappingType": "existing" + } + } + } + } + }, + "producer": "database_producer", + "consumer": "database_consumer" + } + } + }, + "aa631119-d9f8-42ce-bbd1-12e569881a65": { + "task": "dataExport", + "label": "ProjectReportsExport", + "description": "", + "taskFolder": "Testing", + "createTime": "202401241346", + "updateTime": "202401241346", + "state": { + "producers": [ + { + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectReports" + } + } + ], + "consumers": [ + { + "type": "databaseTransferConsumer" + } + ], + "configuration": { + "maxJobCount": 1.0, + "showFinalMessage": true, + "DatabaseTransferProducer": { + "extractType": "SEGMENTS", + "segmentSize": 100.0, + "fetchSize": 10000.0, + "openNewConnections": false, + "queryRowCount": false, + "selectedColumnsOnly": false, + "selectedRowsOnly": false + }, + "DatabaseTransferConsumer": { + "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", + "openNewConnections": true, + "useTransactions": true, + "commitAfterRows": 1000.0, + "useMultiRowInsert": false, + "multiRowInsertBatch": 500.0, + "skipBindValues": false, + "disableUsingBatches": true, + "ignoreDuplicateRows": false, + "transferAutoGeneratedColumns": true, + "disableReferentialIntegrity": false, + "useBulkLoad": false, + "truncateBeforeLoad": false, + "openTableOnFinish": true, + "mappings": { + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectReports": { + "targetName": "project_reports", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "isfinal": { + "targetName": "\"IsFinal\"", + "mappingType": "existing" + }, + "Name": { + "targetName": "\"Name\"", + "mappingType": "existing" + }, + "From": { + "targetName": "\"From\"", + "mappingType": "existing" + }, + "To": { + "targetName": "\"To\"", + "mappingType": "existing" + }, + "reporttype": { + "targetName": "\"ReportType\"", + "mappingType": "existing" + } + } + } + } + }, + "producer": "database_producer", + "consumer": "database_consumer" + } + } + }, + "b19e87da-a606-480b-849a-8bf791b2ed5b": { + "task": "dataExport", + "label": "ProjectSnapshotsExport", + "description": "", + "taskFolder": "Testing", + "createTime": "202401241422", + "updateTime": "202401241422", + "state": { + "producers": [ + { + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectSnapshots" + } + } + ], + "consumers": [ + { + "type": "databaseTransferConsumer" + } + ], + "configuration": { + "maxJobCount": 1.0, + "showFinalMessage": true, + "DatabaseTransferProducer": { + "extractType": "SEGMENTS", + "segmentSize": 100.0, + "fetchSize": 10000.0, + "openNewConnections": false, + "queryRowCount": false, + "selectedColumnsOnly": false, + "selectedRowsOnly": false + }, + "DatabaseTransferConsumer": { + "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", + "openNewConnections": true, + "useTransactions": true, + "commitAfterRows": 1000.0, + "useMultiRowInsert": false, + "multiRowInsertBatch": 500.0, + "skipBindValues": false, + "disableUsingBatches": true, + "ignoreDuplicateRows": false, + "transferAutoGeneratedColumns": true, + "disableReferentialIntegrity": false, + "useBulkLoad": false, + "truncateBeforeLoad": false, + "openTableOnFinish": true, + "mappings": { + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectSnapshots": { + "targetName": "project_snapshots", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "projectid": { + "targetName": "\"ProjectId\"", + "mappingType": "existing" + }, + "netbook": { + "targetName": "\"NetBook\"", + "mappingType": "existing" + }, + "market": { + "targetName": "\"Market\"", + "mappingType": "existing" + }, + "assessed": { + "targetName": "\"Assessed\"", + "mappingType": "existing" + }, + "appraised": { + "targetName": "\"Appraised\"", + "mappingType": "existing" + }, + "snapshoton": { + "targetName": "\"SnapshotOn\"", + "mappingType": "existing" + }, + "metadata": { + "targetName": "\"Metadata\"", + "mappingType": "existing" + } + } + } + } + }, + "producer": "database_producer", + "consumer": "database_consumer" + } + } + }, + "54f1f570-f0cc-4993-a63f-7b6c8a089f27": { + "task": "dataExport", + "label": "ProjectStatusHistory", + "description": "", + "taskFolder": "Testing", + "createTime": "202401241441", + "updateTime": "202401241441", + "state": { + "producers": [ + { + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectStatusHistory" + } + } + ], + "consumers": [ + { + "type": "databaseTransferConsumer" + } + ], + "configuration": { + "maxJobCount": 1.0, + "showFinalMessage": true, + "DatabaseTransferProducer": { + "extractType": "SEGMENTS", + "segmentSize": 100.0, + "fetchSize": 10000.0, + "openNewConnections": false, + "queryRowCount": false, + "selectedColumnsOnly": false, + "selectedRowsOnly": false + }, + "DatabaseTransferConsumer": { + "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", + "openNewConnections": true, + "useTransactions": true, + "commitAfterRows": 1000.0, + "useMultiRowInsert": false, + "multiRowInsertBatch": 500.0, + "skipBindValues": false, + "disableUsingBatches": true, + "ignoreDuplicateRows": false, + "transferAutoGeneratedColumns": true, + "disableReferentialIntegrity": false, + "useBulkLoad": false, + "truncateBeforeLoad": false, + "openTableOnFinish": true, + "mappings": { + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectStatusHistory": { + "targetName": "project_status_history", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "projectid": { + "targetName": "\"ProjectId\"", + "mappingType": "existing" + }, + "workflowid": { + "targetName": "\"WorkflowId\"", + "mappingType": "existing" + }, + "statusid": { + "targetName": "\"StatusId\"", + "mappingType": "existing" + } + } + } + } + }, + "producer": "database_producer", + "consumer": "database_consumer" + } + } + }, + "0b54fcb6-78e2-4a0a-aa2d-ec86d344927e": { + "task": "dataExport", + "label": "ProjectTasksExport", + "description": "", + "taskFolder": "Testing", + "createTime": "202401241456", + "updateTime": "202401241456", + "state": { + "producers": [ + { + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectTasks" + } + } + ], + "consumers": [ + { + "type": "databaseTransferConsumer" + } + ], + "configuration": { + "maxJobCount": 1.0, + "showFinalMessage": true, + "DatabaseTransferProducer": { + "extractType": "SEGMENTS", + "segmentSize": 100.0, + "fetchSize": 10000.0, + "openNewConnections": false, + "queryRowCount": false, + "selectedColumnsOnly": false, + "selectedRowsOnly": false + }, + "DatabaseTransferConsumer": { + "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", + "openNewConnections": true, + "useTransactions": true, + "commitAfterRows": 1000.0, + "useMultiRowInsert": false, + "multiRowInsertBatch": 500.0, + "skipBindValues": false, + "disableUsingBatches": true, + "ignoreDuplicateRows": false, + "transferAutoGeneratedColumns": true, + "disableReferentialIntegrity": false, + "useBulkLoad": false, + "truncateBeforeLoad": false, + "openTableOnFinish": true, + "mappings": { + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectTasks": { + "targetName": "project_tasks", + "mappingType": "existing", + "attributes": { + "projectid": { + "targetName": "\"ProjectId\"", + "mappingType": "existing" + }, + "taskid": { + "targetName": "\"TaskId\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "iscompleted": { + "targetName": "\"IsCompleted\"", + "mappingType": "existing" + }, + "completedon": { + "targetName": "\"CompletedOn\"", + "mappingType": "existing" + } + } + } + } + }, + "producer": "database_producer", + "consumer": "database_consumer" + } + } + }, + "684797d1-c851-4bf8-8033-882800c980e8": { + "task": "dataExport", + "label": "AgenciesRolesClaimsUsersExport", + "description": "Export of the Agencies, Roles, Claims, Users, and User Roles", + "taskFolder": "PIMS ETL", + "createTime": "202401311411", + "updateTime": "202401311411", + "state": { + "producers": [ + { + "type": "databaseTransferProducer", + "location": { + "type": "query", + "project": "General", + "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", + "defaultCatalog": "pims", + "defaultSchema": "dbo", + "query": "\r\nSELECT \r\n u.[Id],\r\n \r\n\t CASE \r\n\t\tWHEN u.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE u.[CreatedById]\r\n\t END AS [CreatedById],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n urd.CreatedOn,\r\n urd.UserId,\r\n ua.AgencyId, \r\n STRING_AGG(urd.RoleName, \u0027, \u0027) AS Roles,\r\n CASE \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%System Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial Reporter%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial%\u0027 THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Agency Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Analyst%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Manager%\u0027 THEN \u002700000000-0000-0000-0000-000000000001\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister Assistant%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Executive Director%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%View Only Properties%\u0027 THEN \u002700000000-0000-0000-0000-000000000002\u0027\r\n\t \r\n END AS UserType\r\nFROM Users u\r\nLEFT JOIN (\r\n SELECT \r\n ur.UserId,\r\n MAX(ur.CreatedOn) AS CreatedOn,\r\n STRING_AGG(r.Name, \u0027, \u0027) AS RoleName\r\n FROM [pims].[dbo].[UserRoles] ur\r\n INNER JOIN Roles r ON ur.RoleId \u003d r.Id\r\n GROUP BY ur.UserId\r\n) AS urd ON u.Id \u003d urd.UserId\r\n\r\nLEFT OUTER JOIN (\r\n SELECT UserId, MIN(AgencyId) AS AgencyId\r\n FROM UserAgencies\r\n GROUP BY UserId\r\n) ua_min ON u.Id \u003d ua_min.UserId\r\nLEFT OUTER JOIN UserAgencies ua ON u.Id \u003d ua.UserId AND ua.AgencyId \u003d ua_min.AgencyId\r\n\r\nWHERE u.Id \u003c\u003e \u002700000000-0000-0000-0000-000000000000\u0027\r\n\r\nGROUP BY u.[Id],\r\n u.[CreatedById],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n urd.CreatedOn, \r\n urd.UserId, \r\n ua.AgencyId\r\nORDER BY urd.CreatedOn ASC" + } + }, + { + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Agencies" + } + } + ], + "consumers": [ + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + } + ], + "configuration": { + "maxJobCount": 1, + "showFinalMessage": true, + "DatabaseTransferProducer": { + "extractType": "SEGMENTS", + "segmentSize": 100, + "fetchSize": 10000, + "openNewConnections": false, + "queryRowCount": false, + "selectedColumnsOnly": false, + "selectedRowsOnly": false + }, + "DatabaseTransferConsumer": { + "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", + "openNewConnections": true, + "useTransactions": true, + "commitAfterRows": 1000, + "useMultiRowInsert": false, + "multiRowInsertBatch": 500, + "skipBindValues": false, + "disableUsingBatches": true, + "ignoreDuplicateRows": false, + "transferAutoGeneratedColumns": true, + "disableReferentialIntegrity": true, + "useBulkLoad": false, + "truncateBeforeLoad": false, + "openTableOnFinish": true, + "mappings": { + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT \r\n u.[Id],\r\n \r\n\t CASE \r\n\t\tWHEN u.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE u.[CreatedById]\r\n\t END AS [CreatedById],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n urd.CreatedOn,\r\n urd.UserId,\r\n ua.AgencyId, \r\n STRING_AGG(urd.RoleName, \u0027, \u0027) AS Roles,\r\n CASE \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%System Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial Reporter%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial%\u0027 THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Agency Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Analyst%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Manager%\u0027 THEN \u002700000000-0000-0000-0000-000000000001\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister Assistant%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Executive Director%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%View Only Properties%\u0027 THEN \u002700000000-0000-0000-0000-000000000002\u0027\r\n\t \r\n END AS UserType\r\nFROM Users u\r\nLEFT JOIN (\r\n SELECT \r\n ur.UserId,\r\n MAX(ur.CreatedOn) AS CreatedOn,\r\n STRING_AGG(r.Name, \u0027, \u0027) AS RoleName\r\n FROM [pims].[dbo].[UserRoles] ur\r\n INNER JOIN Roles r ON ur.RoleId \u003d r.Id\r\n GROUP BY ur.UserId\r\n) AS urd ON u.Id \u003d urd.UserId\r\n\r\nLEFT OUTER JOIN (\r\n SELECT UserId, MIN(AgencyId) AS AgencyId\r\n FROM UserAgencies\r\n GROUP BY UserId\r\n) ua_min ON u.Id \u003d ua_min.UserId\r\nLEFT OUTER JOIN UserAgencies ua ON u.Id \u003d ua.UserId AND ua.AgencyId \u003d ua_min.AgencyId\r\n\r\nWHERE u.Id \u003c\u003e \u002700000000-0000-0000-0000-000000000000\u0027\r\n\r\nGROUP BY u.[Id],\r\n u.[CreatedById],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n urd.CreatedOn, \r\n urd.UserId, \r\n ua.AgencyId\r\nORDER BY urd.CreatedOn ASC": { + "targetName": "user", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "id", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "createdbyid", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "updatedbyid", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "updatedon", + "mappingType": "existing" + }, + "username": { + "targetName": "username", + "mappingType": "existing" + }, + "displayname": { + "targetName": "displayname", + "mappingType": "existing" + }, + "firstname": { + "targetName": "firstname", + "mappingType": "existing" + }, + "middlename": { + "targetName": "middlename", + "mappingType": "existing" + }, + "lastname": { + "targetName": "lastname", + "mappingType": "existing" + }, + "email": { + "targetName": "email", + "mappingType": "existing" + }, + "Position": { + "targetName": "Position", + "mappingType": "existing" + }, + "isdisabled": { + "targetName": "isdisabled", + "mappingType": "existing" + }, + "emailverified": { + "targetName": "emailverified", + "mappingType": "existing" + }, + "note": { + "targetName": "note", + "mappingType": "existing" + }, + "issystem": { + "targetName": "issystem", + "mappingType": "existing" + }, + "lastlogin": { + "targetName": "lastlogin", + "mappingType": "existing" + }, + "approvedbyid": { + "targetName": "approvedbyid", + "mappingType": "existing" + }, + "approvedon": { + "targetName": "approvedon", + "mappingType": "existing" + }, + "keycloakuserid": { + "targetName": "keycloakuserid", + "mappingType": "existing" + }, + "createdon": { + "targetName": "createdon", + "mappingType": "existing" + }, + "userid": { + "targetName": "userid", + "mappingType": "skip" + }, + "agencyid": { + "targetName": "agencyid", + "mappingType": "existing" + }, + "roles": { + "targetName": "roles", + "mappingType": "skip" + }, + "usertype": { + "targetName": "\"RoleId\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT \r\n urd.CreatedOn,\r\n urd.UserId,\r\n STRING_AGG(urd.RoleName, \u0027, \u0027) AS Roles,\r\n CASE \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%System Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial Reporter%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial%\u0027 THEN \u0027Admin\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Agency Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Analyst%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Manager%\u0027 THEN \u0027General User\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister Assistant%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Executive Director%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%View Only Properties%\u0027 THEN \u0027Auditor\u0027\r\n \r\n ELSE \u0027Regular User\u0027 \r\n END AS UserType\r\nFROM (\r\n SELECT \r\n ur.UserId,\r\n MAX(ur.CreatedOn) AS CreatedOn,\r\n STRING_AGG(r.Name, \u0027, \u0027) AS RoleName\r\n FROM [pims].[dbo].[UserRoles] ur\r\n INNER JOIN Roles r ON ur.RoleId \u003d r.Id\r\n GROUP BY ur.UserId\r\n) AS urd\r\nGROUP BY urd.CreatedOn, urd.UserId;\r\n": { + "targetName": "user_roles", + "mappingType": "existing", + "attributes": { + "createdon": { + "targetName": "createdon", + "mappingType": "existing" + }, + "userid": { + "targetName": "userid", + "mappingType": "existing" + }, + "roles": { + "targetName": "roles", + "mappingType": "existing" + }, + "usertype": { + "targetName": "\"RoleId\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Agencies": { + "targetName": "agency", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing", + "transformer": "constant", + "transformerProperties": { + "constant": "00000000-0000-0000-0000-000000000000" + }, + "transformerPropertiesNames": "constant" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "Name": { + "targetName": "\"Name\"", + "mappingType": "existing" + }, + "isdisabled": { + "targetName": "\"IsDisabled\"", + "mappingType": "existing" + }, + "sortorder": { + "targetName": "\"SortOrder\"", + "mappingType": "existing" + }, + "code": { + "targetName": "\"Code\"", + "mappingType": "existing" + }, + "description": { + "targetName": "\"Description\"", + "mappingType": "existing" + }, + "parentid": { + "targetName": "\"ParentId\"", + "mappingType": "existing" + }, + "email": { + "targetName": "\"Email\"", + "mappingType": "existing" + }, + "sendemail": { + "targetName": "\"SendEmail\"", + "mappingType": "existing" + }, + "addressto": { + "targetName": "\"AddressTo\"", + "mappingType": "existing" + }, + "ccemail": { + "targetName": "\"CCEmail\"", + "mappingType": "existing" + } + } + } + } + }, + "producer": "database_producer", + "consumer": "database_consumer" + } + } + }, + "49a69144-4ee1-4a7e-b735-93a656251763": { + "task": "dataExport", + "label": "AgenciesExport", + "description": "", + "taskFolder": "Testing", + "createTime": "202402131001", + "updateTime": "202402131001", + "state": { + "producers": [ + { + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Agencies" + } + } + ], + "consumers": [ + { + "type": "databaseTransferConsumer" + } + ], + "configuration": { + "maxJobCount": 1, + "showFinalMessage": true, + "DatabaseTransferProducer": { + "extractType": "SEGMENTS", + "segmentSize": 100, + "fetchSize": 10000, + "openNewConnections": false, + "queryRowCount": false, + "selectedColumnsOnly": false, + "selectedRowsOnly": false + }, + "DatabaseTransferConsumer": { + "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", + "openNewConnections": true, + "useTransactions": true, + "commitAfterRows": 1000, + "useMultiRowInsert": false, + "multiRowInsertBatch": 500, + "skipBindValues": false, + "disableUsingBatches": true, + "ignoreDuplicateRows": false, + "transferAutoGeneratedColumns": true, + "disableReferentialIntegrity": false, + "useBulkLoad": false, + "truncateBeforeLoad": false, + "openTableOnFinish": true, + "mappings": { + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Agencies": { + "targetName": "agency", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing", + "transformer": "constant", + "transformerProperties": { + "constant": "00000000-0000-0000-0000-000000000000" + }, + "transformerPropertiesNames": "constant" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "Name": { + "targetName": "\"Name\"", + "mappingType": "existing" + }, + "isdisabled": { + "targetName": "\"IsDisabled\"", + "mappingType": "existing" + }, + "sortorder": { + "targetName": "\"SortOrder\"", + "mappingType": "existing" + }, + "code": { + "targetName": "\"Code\"", + "mappingType": "existing" + }, + "description": { + "targetName": "\"Description\"", + "mappingType": "existing" + }, + "parentid": { + "targetName": "\"ParentId\"", + "mappingType": "existing" + }, + "email": { + "targetName": "\"Email\"", + "mappingType": "existing" + }, + "sendemail": { + "targetName": "\"SendEmail\"", + "mappingType": "existing" + }, + "addressto": { + "targetName": "\"AddressTo\"", + "mappingType": "existing" + }, + "ccemail": { + "targetName": "\"CCEmail\"", + "mappingType": "existing" + } + } + } + } + }, + "producer": "database_producer", + "consumer": "database_consumer" + } + } + }, + "5ecb8524-d561-4531-9c6e-82e38afb697e": { + "task": "dataExport", + "label": "PIMS ETL", + "description": "Export of the Agencies, Roles, Claims, Users, and User Roles", + "taskFolder": "PIMS ETL", + "createTime": "202402131336", + "updateTime": "202402131336", + "state": { + "producers": [ + { + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Agencies" + } + }, + { + "type": "databaseTransferProducer", + "location": { + "type": "query", + "project": "General", + "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", + "defaultCatalog": "pims", + "defaultSchema": "dbo", + "query": "\r\nSELECT \r\n u.[Id],\r\n \r\n\t CASE \r\n\t\tWHEN u.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE u.[CreatedById]\r\n\t END AS [CreatedById],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n urd.CreatedOn,\r\n urd.UserId,\r\n ua.AgencyId, \r\n STRING_AGG(urd.RoleName, \u0027, \u0027) AS Roles,\r\n CASE \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%System Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial Reporter%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial%\u0027 THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Agency Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Analyst%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Manager%\u0027 THEN \u002700000000-0000-0000-0000-000000000001\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister Assistant%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Executive Director%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%View Only Properties%\u0027 THEN \u002700000000-0000-0000-0000-000000000002\u0027\r\n\t \r\n END AS UserType\r\nFROM Users u\r\nLEFT JOIN (\r\n SELECT \r\n ur.UserId,\r\n MAX(ur.CreatedOn) AS CreatedOn,\r\n STRING_AGG(r.Name, \u0027, \u0027) AS RoleName\r\n FROM [pims].[dbo].[UserRoles] ur\r\n INNER JOIN Roles r ON ur.RoleId \u003d r.Id\r\n GROUP BY ur.UserId\r\n) AS urd ON u.Id \u003d urd.UserId\r\n\r\nLEFT OUTER JOIN (\r\n SELECT UserId, MIN(AgencyId) AS AgencyId\r\n FROM UserAgencies\r\n GROUP BY UserId\r\n) ua_min ON u.Id \u003d ua_min.UserId\r\nLEFT OUTER JOIN UserAgencies ua ON u.Id \u003d ua.UserId AND ua.AgencyId \u003d ua_min.AgencyId\r\n\r\nWHERE u.Id \u003c\u003e \u002700000000-0000-0000-0000-000000000000\u0027\r\n\r\nGROUP BY u.[Id],\r\n u.[CreatedById],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n urd.CreatedOn, \r\n urd.UserId, \r\n ua.AgencyId\r\nORDER BY urd.CreatedOn ASC" + } + }, + { + "type": "databaseTransferProducer", + "location": { + "type": "query", + "project": "General", + "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", + "defaultCatalog": "pims", + "query": "\r\nSELECT p.[Id],\r\n\t CASE \r\n\t\tWHEN p.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE p.[CreatedById]\r\n\t END AS [CreatedById],\r\n p.[CreatedOn],\r\n p.[UpdatedById],\r\n p.[UpdatedOn],\r\n p.[Name],\r\n p.[Description],\r\n p.[ClassificationId],\r\n p.[AgencyId],\r\n p.[IsSensitive],\r\n p.[IsVisibleToOtherAgencies],\r\n p.[PID],\r\n p.[PIN],\r\n p.[LandArea],\r\n p.[LandLegalDescription],\r\n p.[Zoning],\r\n p.[ZoningPotential],\r\n p.[NotOwned],\r\n\tCONVERT(VARCHAR(40), CAST(Location.Long AS DECIMAL(18, 14))) + \u0027, \u0027 + CONVERT(VARCHAR(40), CAST(Location.Lat AS DECIMAL(18, 14))) AS Location,\r\n CASE \r\n WHEN a.AdministrativeArea \u003d \u0027The Corporation of the City of Nelson\u0027 THEN 188\r\n WHEN a.AdministrativeArea \u003d \u0027Township of Langley\u0027 THEN 150\r\n WHEN a.AdministrativeArea \u003d \u0027District of North Vancouver\u0027 THEN 196\r\n WHEN a.AdministrativeArea \u003d \u0027Coombs\u0027 THEN 483\r\n WHEN a.AdministrativeArea \u003d \u0027Brookmere\u0027 THEN 481\r\n WHEN a.AdministrativeArea \u003d \u0027Thornhill\u0027 THEN 501\r\n WHEN a.AdministrativeArea \u003d \u0027Two Mile\u0027 THEN 502\r\n WHEN a.AdministrativeArea \u003d \u0027Crofton\u0027 THEN 484\r\n WHEN a.AdministrativeArea \u003d \u0027East Sooke\u0027 THEN 485\r\n WHEN a.AdministrativeArea \u003d \u0027Mudge Island\u0027 THEN 492\r\n WHEN a.AdministrativeArea \u003d \u0027Coal Harbour\u0027 THEN 482\r\n WHEN a.AdministrativeArea \u003d \u0027Miworth\u0027 THEN 490\r\n WHEN a.AdministrativeArea \u003d \u0027Lake Errock\u0027 THEN 489\r\n WHEN a.AdministrativeArea \u003d \u0027Black Creek\u0027 THEN 479\r\n WHEN a.AdministrativeArea \u003d \u0027Whaletown\u0027 THEN 504\r\n WHEN a.AdministrativeArea \u003d \u0027Quathiaski Cove\u0027 THEN 494\r\n WHEN a.AdministrativeArea \u003d \u0027Big Bay in Stuart Island\u0027 THEN 478\r\n WHEN a.AdministrativeArea \u003d \u0027Surge Narrows in Read Island\u0027 THEN 500\r\n WHEN a.AdministrativeArea \u003d \u0027Rock Bay in Sayward\u0027 THEN 497\r\n WHEN a.AdministrativeArea \u003d \u0027Granite Bay in Quadra Island\u0027 THEN 487\r\n WHEN a.AdministrativeArea \u003d \u0027Moberly Lake\u0027 THEN 491\r\n WHEN a.AdministrativeArea \u003d \u0027Quatsino\u0027 THEN 495\r\n WHEN a.AdministrativeArea \u003d \u0027Bouchie Lake\u0027 THEN 480\r\n WHEN a.AdministrativeArea \u003d \u0027West Lake\u0027 THEN 503\r\n WHEN a.AdministrativeArea \u003d \u0027Salmon Valley\u0027 THEN 498\t\t\r\n WHEN a.AdministrativeArea \u003d \u0027Red Rock\u0027 THEN 496\r\n WHEN a.AdministrativeArea \u003d \u0027Stoner\u0027 THEN 499\r\n WHEN a.AdministrativeArea \u003d \u0027Pineview FFG\u0027 THEN 493\r\n WHEN a.AdministrativeArea \u003d \u0027Wonowon\u0027 THEN 506\r\n WHEN a.AdministrativeArea \u003d \u0027Halfway River\u0027 THEN 488\r\n WHEN a.AdministrativeArea \u003d \u0027Giscome\u0027 THEN 486\r\n WHEN a.AdministrativeArea \u003d \u0027Willow River\u0027 THEN 505\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lower Nicola\u0027 THEN 314\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Belcarra\u0027 THEN 425\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Tsawwassen\u0027 THEN 315\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Anmore\u0027 THEN 432\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lake Cowichan\u0027 THEN 442\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027North Cowichan\u0027 THEN 450\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Port Edward\u0027 THEN 347\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Spallumcheen\u0027 THEN 318\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Jumbo Glacier Mountain Resort Municipality\u0027 THEN 438\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Kent\u0027 THEN 439\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Highlands\u0027 THEN 348\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Slocan\u0027 THEN 380\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Warfield\u0027 THEN 448\r\n ELSE aa.Id \r\n END AS AdministrativeAreaId, \r\n\ta.AdministrativeArea,\r\n\ta.Address1, \r\n\ta.Postal,\r\n\tpp.ParcelId as ParentID,\r\n\t0 as PropertyTypeID\r\nFROM \r\n [pims].[dbo].[Parcels] p\r\n\tINNER JOIN Addresses a\r\n\tON p.AddressId \u003d a.Id\r\n\tLEFT OUTER JOIN AdministrativeAreas aa\r\n\tON aa.Name \u003d a.AdministrativeArea\r\n    LEFT OUTER JOIN ParcelParcels pp\r\n    ON pp.SubdivisionId \u003d p.Id" + } + }, + { + "type": "databaseTransferProducer", + "location": { + "type": "query", + "project": "General", + "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", + "defaultCatalog": "pims", + "query": "SELECT p.[Id],\r\n\tCASE \r\n\t WHEN p.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t ELSE p.[CreatedById]\r\n\tEND AS [CreatedById],\r\n p.[CreatedOn],\r\n p.[UpdatedById],\r\n p.[UpdatedOn],\r\n p.[Name],\r\n p.[Description],\r\n p.[ClassificationId],\r\n p.BuildingConstructionTypeId,\r\n p.[AgencyId],\r\n p.[IsSensitive],\r\n p.[IsVisibleToOtherAgencies],\r\n\tp.BuildingFloorCount,\r\n\tp.BuildingPredominateUseId,\r\n\tp.BuildingTenancy,\r\n\tp.RentableArea,\r\n\tp.BuildingOccupantTypeId,\r\n\tp.LeaseExpiry,\r\n\tp.OccupantName,\r\n\tp.TransferLeaseOnSale,\r\n\tp.BuildingTenancyUpdatedOn,\r\n\tp.EncumbranceReason,\r\n\tp.LeasedLandMetadata,\r\n\tp.TotalArea,\r\n\tCONVERT(VARCHAR(40), CAST(Location.Long AS DECIMAL(18, 14))) + \u0027, \u0027 + CONVERT(VARCHAR(40), CAST(Location.Lat AS DECIMAL(18, 14))) AS Location,\r\n\tCASE \r\n WHEN a.AdministrativeArea \u003d \u0027The Corporation of the City of Nelson\u0027 THEN 188\r\n WHEN a.AdministrativeArea \u003d \u0027Township of Langley\u0027 THEN 150\r\n WHEN a.AdministrativeArea \u003d \u0027District of North Vancouver\u0027 THEN 196\r\n WHEN a.AdministrativeArea \u003d \u0027Coombs\u0027 THEN 483\r\n WHEN a.AdministrativeArea \u003d \u0027Brookmere\u0027 THEN 481\r\n WHEN a.AdministrativeArea \u003d \u0027Thornhill\u0027 THEN 501\r\n WHEN a.AdministrativeArea \u003d \u0027Two Mile\u0027 THEN 502\r\n WHEN a.AdministrativeArea \u003d \u0027Crofton\u0027 THEN 484\r\n WHEN a.AdministrativeArea \u003d \u0027East Sooke\u0027 THEN 485\r\n WHEN a.AdministrativeArea \u003d \u0027Mudge Island\u0027 THEN 492\r\n WHEN a.AdministrativeArea \u003d \u0027Coal Harbour\u0027 THEN 482\r\n WHEN a.AdministrativeArea \u003d \u0027Miworth\u0027 THEN 490\r\n WHEN a.AdministrativeArea \u003d \u0027Lake Errock\u0027 THEN 489\r\n WHEN a.AdministrativeArea \u003d \u0027Black Creek\u0027 THEN 479\r\n WHEN a.AdministrativeArea \u003d \u0027Whaletown\u0027 THEN 504\r\n WHEN a.AdministrativeArea \u003d \u0027Quathiaski Cove\u0027 THEN 494\r\n WHEN a.AdministrativeArea \u003d \u0027Big Bay in Stuart Island\u0027 THEN 478\r\n WHEN a.AdministrativeArea \u003d \u0027Surge Narrows in Read Island\u0027 THEN 500\r\n WHEN a.AdministrativeArea \u003d \u0027Rock Bay in Sayward\u0027 THEN 497\r\n WHEN a.AdministrativeArea \u003d \u0027Granite Bay in Quadra Island\u0027 THEN 487\r\n WHEN a.AdministrativeArea \u003d \u0027Moberly Lake\u0027 THEN 491\r\n WHEN a.AdministrativeArea \u003d \u0027Quatsino\u0027 THEN 495\r\n WHEN a.AdministrativeArea \u003d \u0027Bouchie Lake\u0027 THEN 480\r\n WHEN a.AdministrativeArea \u003d \u0027West Lake\u0027 THEN 503\r\n WHEN a.AdministrativeArea \u003d \u0027Salmon Valley\u0027 THEN 498\t\t\r\n WHEN a.AdministrativeArea \u003d \u0027Red Rock\u0027 THEN 496\r\n WHEN a.AdministrativeArea \u003d \u0027Stoner\u0027 THEN 499\r\n WHEN a.AdministrativeArea \u003d \u0027Pineview FFG\u0027 THEN 493\r\n WHEN a.AdministrativeArea \u003d \u0027Wonowon\u0027 THEN 506\r\n WHEN a.AdministrativeArea \u003d \u0027Halfway River\u0027 THEN 488\r\n WHEN a.AdministrativeArea \u003d \u0027Giscome\u0027 THEN 486\r\n WHEN a.AdministrativeArea \u003d \u0027Willow River\u0027 THEN 505\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lower Nicola\u0027 THEN 314\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Belcarra\u0027 THEN 425\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Tsawwassen\u0027 THEN 315\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Anmore\u0027 THEN 432\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lake Cowichan\u0027 THEN 442\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027North Cowichan\u0027 THEN 450\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Port Edward\u0027 THEN 347\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Spallumcheen\u0027 THEN 318\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Jumbo Glacier Mountain Resort Municipality\u0027 THEN 438\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Kent\u0027 THEN 439\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Highlands\u0027 THEN 348\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Slocan\u0027 THEN 380\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Warfield\u0027 THEN 448\r\n ELSE aa.Id \r\n END AS AdministrativeAreaId, \r\n\ta.Address1, \r\n\ta.Postal,\r\n\t1 as PropertyTypeID\r\nFROM \r\n [pims].[dbo].Buildings p\r\n\tINNER JOIN Addresses a\r\n\tON p.AddressId \u003d a.Id\r\n\tLEFT OUTER JOIN AdministrativeAreas aa\r\n\tON aa.Name \u003d a.AdministrativeArea\r\nWHERE p.BuildingPredominateUseId \u003c\u003d 54" + } + }, + { + "type": "databaseTransferProducer", + "location": { + "type": "query", + "project": "General", + "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", + "defaultCatalog": "pims", + "query": "SELECT [ParcelId]\r\n ,[Date]\r\n ,[Key]\r\n ,\r\n\t CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Firm]\r\n ,[Value]\r\n ,[Note]\r\n FROM [pims].[dbo].[ParcelEvaluations]" + } + }, + { + "type": "databaseTransferProducer", + "location": { + "type": "query", + "project": "General", + "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", + "defaultCatalog": "pims", + "query": "SELECT [BuildingId]\r\n ,[Date]\r\n ,[Key]\r\n ,\r\n\t CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Value]\r\n ,[Note]\r\n FROM [pims].[dbo].[BuildingEvaluations]\r\nWHERE BuildingId IN (\r\n\tSELECT b.Id \r\n\tFROM Buildings b\r\n\tWHERE b.BuildingPredominateUseId \u003c\u003d 54\r\n)" + } + }, + { + "type": "databaseTransferProducer", + "location": { + "type": "query", + "project": "General", + "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", + "defaultCatalog": "pims", + "query": "\r\nSELECT pb.*\r\n FROM [pims].[dbo].ParcelBuildings pb\r\n INNER JOIN Buildings b\r\n ON b.Id \u003d pb.BuildingId\r\n WHERE b.BuildingPredominateUseId \u003c\u003d 54" + } + }, + { + "type": "databaseTransferProducer", + "location": { + "type": "query", + "project": "General", + "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", + "defaultCatalog": "pims", + "query": "SELECT [ParcelId]\r\n ,[FiscalYear]\r\n ,[Key]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Value]\r\n ,[Note]\r\n ,[EffectiveDate]\r\n FROM [dbo].[ParcelFiscals]" + } + } + ], + "consumers": [ + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + } + ], + "configuration": { + "maxJobCount": 1, + "showFinalMessage": true, + "DatabaseTransferProducer": { + "extractType": "SEGMENTS", + "segmentSize": 1000, + "fetchSize": 10000, + "openNewConnections": false, + "queryRowCount": false, + "selectedColumnsOnly": false, + "selectedRowsOnly": false + }, + "DatabaseTransferConsumer": { + "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", + "openNewConnections": true, + "useTransactions": true, + "commitAfterRows": 1000, + "useMultiRowInsert": false, + "multiRowInsertBatch": 500, + "skipBindValues": false, + "disableUsingBatches": true, + "ignoreDuplicateRows": false, + "transferAutoGeneratedColumns": true, + "disableReferentialIntegrity": true, + "useBulkLoad": false, + "truncateBeforeLoad": false, + "openTableOnFinish": true, + "mappings": { + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Agencies": { + "targetName": "agency", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing", + "transformer": "constant", + "transformerProperties": { + "constant": "00000000-0000-0000-0000-000000000000" + }, + "transformerPropertiesNames": "constant" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "Name": { + "targetName": "\"Name\"", + "mappingType": "existing" + }, + "isdisabled": { + "targetName": "\"IsDisabled\"", + "mappingType": "existing" + }, + "sortorder": { + "targetName": "\"SortOrder\"", + "mappingType": "existing" + }, + "code": { + "targetName": "\"Code\"", + "mappingType": "existing" + }, + "description": { + "targetName": "\"Description\"", + "mappingType": "existing" + }, + "parentid": { + "targetName": "\"ParentId\"", + "mappingType": "existing" + }, + "email": { + "targetName": "\"Email\"", + "mappingType": "existing" + }, + "sendemail": { + "targetName": "\"SendEmail\"", + "mappingType": "existing" + }, + "addressto": { + "targetName": "\"AddressTo\"", + "mappingType": "existing" + }, + "ccemail": { + "targetName": "\"CCEmail\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT \r\n u.[Id],\r\n \r\n\t CASE \r\n\t\tWHEN u.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE u.[CreatedById]\r\n\t END AS [CreatedById],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n urd.CreatedOn,\r\n urd.UserId,\r\n ua.AgencyId, \r\n STRING_AGG(urd.RoleName, \u0027, \u0027) AS Roles,\r\n CASE \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%System Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial Reporter%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial%\u0027 THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Agency Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Analyst%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Manager%\u0027 THEN \u002700000000-0000-0000-0000-000000000001\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister Assistant%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Executive Director%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%View Only Properties%\u0027 THEN \u002700000000-0000-0000-0000-000000000002\u0027\r\n\t \r\n END AS UserType\r\nFROM Users u\r\nLEFT JOIN (\r\n SELECT \r\n ur.UserId,\r\n MAX(ur.CreatedOn) AS CreatedOn,\r\n STRING_AGG(r.Name, \u0027, \u0027) AS RoleName\r\n FROM [pims].[dbo].[UserRoles] ur\r\n INNER JOIN Roles r ON ur.RoleId \u003d r.Id\r\n GROUP BY ur.UserId\r\n) AS urd ON u.Id \u003d urd.UserId\r\n\r\nLEFT OUTER JOIN (\r\n SELECT UserId, MIN(AgencyId) AS AgencyId\r\n FROM UserAgencies\r\n GROUP BY UserId\r\n) ua_min ON u.Id \u003d ua_min.UserId\r\nLEFT OUTER JOIN UserAgencies ua ON u.Id \u003d ua.UserId AND ua.AgencyId \u003d ua_min.AgencyId\r\n\r\nWHERE u.Id \u003c\u003e \u002700000000-0000-0000-0000-000000000000\u0027\r\n\r\nGROUP BY u.[Id],\r\n u.[CreatedById],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n urd.CreatedOn, \r\n urd.UserId, \r\n ua.AgencyId\r\nORDER BY urd.CreatedOn ASC": { + "targetName": "user", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "id", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "createdbyid", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "updatedbyid", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "updatedon", + "mappingType": "existing" + }, + "username": { + "targetName": "username", + "mappingType": "existing" + }, + "displayname": { + "targetName": "displayname", + "mappingType": "existing" + }, + "firstname": { + "targetName": "firstname", + "mappingType": "existing" + }, + "middlename": { + "targetName": "middlename", + "mappingType": "existing" + }, + "lastname": { + "targetName": "lastname", + "mappingType": "existing" + }, + "email": { + "targetName": "email", + "mappingType": "existing" + }, + "Position": { + "targetName": "Position", + "mappingType": "existing" + }, + "isdisabled": { + "targetName": "isdisabled", + "mappingType": "existing" + }, + "emailverified": { + "targetName": "emailverified", + "mappingType": "existing" + }, + "note": { + "targetName": "note", + "mappingType": "existing" + }, + "issystem": { + "targetName": "issystem", + "mappingType": "existing" + }, + "lastlogin": { + "targetName": "lastlogin", + "mappingType": "existing" + }, + "approvedbyid": { + "targetName": "approvedbyid", + "mappingType": "existing" + }, + "approvedon": { + "targetName": "approvedon", + "mappingType": "existing" + }, + "keycloakuserid": { + "targetName": "keycloakuserid", + "mappingType": "existing" + }, + "createdon": { + "targetName": "createdon", + "mappingType": "existing" + }, + "userid": { + "targetName": "userid", + "mappingType": "skip" + }, + "agencyid": { + "targetName": "agencyid", + "mappingType": "existing" + }, + "roles": { + "targetName": "roles", + "mappingType": "skip" + }, + "usertype": { + "targetName": "\"RoleId\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT p.[Id],\r\n\t CASE \r\n\t\tWHEN p.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE p.[CreatedById]\r\n\t END AS [CreatedById],\r\n p.[CreatedOn],\r\n p.[UpdatedById],\r\n p.[UpdatedOn],\r\n p.[Name],\r\n p.[Description],\r\n p.[ClassificationId],\r\n p.[AgencyId],\r\n p.[IsSensitive],\r\n p.[IsVisibleToOtherAgencies],\r\n p.[PID],\r\n p.[PIN],\r\n p.[LandArea],\r\n p.[LandLegalDescription],\r\n p.[Zoning],\r\n p.[ZoningPotential],\r\n p.[NotOwned],\r\n\tCONVERT(VARCHAR(40), CAST(Location.Long AS DECIMAL(18, 14))) + \u0027, \u0027 + CONVERT(VARCHAR(40), CAST(Location.Lat AS DECIMAL(18, 14))) AS Location,\r\n CASE \r\n WHEN a.AdministrativeArea \u003d \u0027The Corporation of the City of Nelson\u0027 THEN 188\r\n WHEN a.AdministrativeArea \u003d \u0027Township of Langley\u0027 THEN 150\r\n WHEN a.AdministrativeArea \u003d \u0027District of North Vancouver\u0027 THEN 196\r\n WHEN a.AdministrativeArea \u003d \u0027Coombs\u0027 THEN 483\r\n WHEN a.AdministrativeArea \u003d \u0027Brookmere\u0027 THEN 481\r\n WHEN a.AdministrativeArea \u003d \u0027Thornhill\u0027 THEN 501\r\n WHEN a.AdministrativeArea \u003d \u0027Two Mile\u0027 THEN 502\r\n WHEN a.AdministrativeArea \u003d \u0027Crofton\u0027 THEN 484\r\n WHEN a.AdministrativeArea \u003d \u0027East Sooke\u0027 THEN 485\r\n WHEN a.AdministrativeArea \u003d \u0027Mudge Island\u0027 THEN 492\r\n WHEN a.AdministrativeArea \u003d \u0027Coal Harbour\u0027 THEN 482\r\n WHEN a.AdministrativeArea \u003d \u0027Miworth\u0027 THEN 490\r\n WHEN a.AdministrativeArea \u003d \u0027Lake Errock\u0027 THEN 489\r\n WHEN a.AdministrativeArea \u003d \u0027Black Creek\u0027 THEN 479\r\n WHEN a.AdministrativeArea \u003d \u0027Whaletown\u0027 THEN 504\r\n WHEN a.AdministrativeArea \u003d \u0027Quathiaski Cove\u0027 THEN 494\r\n WHEN a.AdministrativeArea \u003d \u0027Big Bay in Stuart Island\u0027 THEN 478\r\n WHEN a.AdministrativeArea \u003d \u0027Surge Narrows in Read Island\u0027 THEN 500\r\n WHEN a.AdministrativeArea \u003d \u0027Rock Bay in Sayward\u0027 THEN 497\r\n WHEN a.AdministrativeArea \u003d \u0027Granite Bay in Quadra Island\u0027 THEN 487\r\n WHEN a.AdministrativeArea \u003d \u0027Moberly Lake\u0027 THEN 491\r\n WHEN a.AdministrativeArea \u003d \u0027Quatsino\u0027 THEN 495\r\n WHEN a.AdministrativeArea \u003d \u0027Bouchie Lake\u0027 THEN 480\r\n WHEN a.AdministrativeArea \u003d \u0027West Lake\u0027 THEN 503\r\n WHEN a.AdministrativeArea \u003d \u0027Salmon Valley\u0027 THEN 498\t\t\r\n WHEN a.AdministrativeArea \u003d \u0027Red Rock\u0027 THEN 496\r\n WHEN a.AdministrativeArea \u003d \u0027Stoner\u0027 THEN 499\r\n WHEN a.AdministrativeArea \u003d \u0027Pineview FFG\u0027 THEN 493\r\n WHEN a.AdministrativeArea \u003d \u0027Wonowon\u0027 THEN 506\r\n WHEN a.AdministrativeArea \u003d \u0027Halfway River\u0027 THEN 488\r\n WHEN a.AdministrativeArea \u003d \u0027Giscome\u0027 THEN 486\r\n WHEN a.AdministrativeArea \u003d \u0027Willow River\u0027 THEN 505\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lower Nicola\u0027 THEN 314\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Belcarra\u0027 THEN 425\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Tsawwassen\u0027 THEN 315\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Anmore\u0027 THEN 432\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lake Cowichan\u0027 THEN 442\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027North Cowichan\u0027 THEN 450\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Port Edward\u0027 THEN 347\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Spallumcheen\u0027 THEN 318\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Jumbo Glacier Mountain Resort Municipality\u0027 THEN 438\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Kent\u0027 THEN 439\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Highlands\u0027 THEN 348\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Slocan\u0027 THEN 380\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Warfield\u0027 THEN 448\r\n ELSE aa.Id \r\n END AS AdministrativeAreaId, \r\n\ta.AdministrativeArea,\r\n\ta.Address1, \r\n\ta.Postal,\r\n\tpp.ParcelId as ParentID,\r\n\t0 as PropertyTypeID\r\nFROM \r\n [pims].[dbo].[Parcels] p\r\n\tINNER JOIN Addresses a\r\n\tON p.AddressId \u003d a.Id\r\n\tLEFT OUTER JOIN AdministrativeAreas aa\r\n\tON aa.Name \u003d a.AdministrativeArea\r\n    LEFT OUTER JOIN ParcelParcels pp\r\n    ON pp.SubdivisionId \u003d p.Id": { + "targetName": "parcel", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "Name": { + "targetName": "\"Name\"", + "mappingType": "existing" + }, + "description": { + "targetName": "\"Description\"", + "mappingType": "existing" + }, + "classificationid": { + "targetName": "\"ClassificationId\"", + "mappingType": "existing" + }, + "agencyid": { + "targetName": "\"AgencyId\"", + "mappingType": "existing" + }, + "issensitive": { + "targetName": "\"IsSensitive\"", + "mappingType": "existing" + }, + "isvisibletootheragencies": { + "targetName": "\"IsVisibleToOtherAgencies\"", + "mappingType": "existing" + }, + "pid": { + "targetName": "\"PID\"", + "mappingType": "existing" + }, + "pin": { + "targetName": "\"PIN\"", + "mappingType": "existing" + }, + "landarea": { + "targetName": "\"LandArea\"", + "mappingType": "existing" + }, + "landlegaldescription": { + "targetName": "\"LandLegalDescription\"", + "mappingType": "existing" + }, + "zoning": { + "targetName": "\"Zoning\"", + "mappingType": "existing" + }, + "zoningpotential": { + "targetName": "\"ZoningPotential\"", + "mappingType": "existing" + }, + "notowned": { + "targetName": "\"NotOwned\"", + "mappingType": "existing" + }, + "Location": { + "targetName": "\"Location\"", + "mappingType": "existing" + }, + "administrativeareaid": { + "targetName": "\"AdministrativeAreaId\"", + "mappingType": "existing" + }, + "administrativearea": { + "targetName": "\"AdministrativeArea\"", + "mappingType": "skip" + }, + "address1": { + "targetName": "\"Address1\"", + "mappingType": "existing" + }, + "postal": { + "targetName": "\"Postal\"", + "mappingType": "existing" + }, + "parentid": { + "targetName": "\"ParentID\"", + "mappingType": "existing" + }, + "propertytypeid": { + "targetName": "\"PropertyTypeID\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT p.[Id],\r\n\tCASE \r\n\t WHEN p.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t ELSE p.[CreatedById]\r\n\tEND AS [CreatedById],\r\n p.[CreatedOn],\r\n p.[UpdatedById],\r\n p.[UpdatedOn],\r\n p.[Name],\r\n p.[Description],\r\n p.[ClassificationId],\r\n p.BuildingConstructionTypeId,\r\n p.[AgencyId],\r\n p.[IsSensitive],\r\n p.[IsVisibleToOtherAgencies],\r\n\tp.BuildingFloorCount,\r\n\tp.BuildingPredominateUseId,\r\n\tp.BuildingTenancy,\r\n\tp.RentableArea,\r\n\tp.BuildingOccupantTypeId,\r\n\tp.LeaseExpiry,\r\n\tp.OccupantName,\r\n\tp.TransferLeaseOnSale,\r\n\tp.BuildingTenancyUpdatedOn,\r\n\tp.EncumbranceReason,\r\n\tp.LeasedLandMetadata,\r\n\tp.TotalArea,\r\n\tCONVERT(VARCHAR(40), CAST(Location.Long AS DECIMAL(18, 14))) + \u0027, \u0027 + CONVERT(VARCHAR(40), CAST(Location.Lat AS DECIMAL(18, 14))) AS Location,\r\n\tCASE \r\n WHEN a.AdministrativeArea \u003d \u0027The Corporation of the City of Nelson\u0027 THEN 188\r\n WHEN a.AdministrativeArea \u003d \u0027Township of Langley\u0027 THEN 150\r\n WHEN a.AdministrativeArea \u003d \u0027District of North Vancouver\u0027 THEN 196\r\n WHEN a.AdministrativeArea \u003d \u0027Coombs\u0027 THEN 483\r\n WHEN a.AdministrativeArea \u003d \u0027Brookmere\u0027 THEN 481\r\n WHEN a.AdministrativeArea \u003d \u0027Thornhill\u0027 THEN 501\r\n WHEN a.AdministrativeArea \u003d \u0027Two Mile\u0027 THEN 502\r\n WHEN a.AdministrativeArea \u003d \u0027Crofton\u0027 THEN 484\r\n WHEN a.AdministrativeArea \u003d \u0027East Sooke\u0027 THEN 485\r\n WHEN a.AdministrativeArea \u003d \u0027Mudge Island\u0027 THEN 492\r\n WHEN a.AdministrativeArea \u003d \u0027Coal Harbour\u0027 THEN 482\r\n WHEN a.AdministrativeArea \u003d \u0027Miworth\u0027 THEN 490\r\n WHEN a.AdministrativeArea \u003d \u0027Lake Errock\u0027 THEN 489\r\n WHEN a.AdministrativeArea \u003d \u0027Black Creek\u0027 THEN 479\r\n WHEN a.AdministrativeArea \u003d \u0027Whaletown\u0027 THEN 504\r\n WHEN a.AdministrativeArea \u003d \u0027Quathiaski Cove\u0027 THEN 494\r\n WHEN a.AdministrativeArea \u003d \u0027Big Bay in Stuart Island\u0027 THEN 478\r\n WHEN a.AdministrativeArea \u003d \u0027Surge Narrows in Read Island\u0027 THEN 500\r\n WHEN a.AdministrativeArea \u003d \u0027Rock Bay in Sayward\u0027 THEN 497\r\n WHEN a.AdministrativeArea \u003d \u0027Granite Bay in Quadra Island\u0027 THEN 487\r\n WHEN a.AdministrativeArea \u003d \u0027Moberly Lake\u0027 THEN 491\r\n WHEN a.AdministrativeArea \u003d \u0027Quatsino\u0027 THEN 495\r\n WHEN a.AdministrativeArea \u003d \u0027Bouchie Lake\u0027 THEN 480\r\n WHEN a.AdministrativeArea \u003d \u0027West Lake\u0027 THEN 503\r\n WHEN a.AdministrativeArea \u003d \u0027Salmon Valley\u0027 THEN 498\t\t\r\n WHEN a.AdministrativeArea \u003d \u0027Red Rock\u0027 THEN 496\r\n WHEN a.AdministrativeArea \u003d \u0027Stoner\u0027 THEN 499\r\n WHEN a.AdministrativeArea \u003d \u0027Pineview FFG\u0027 THEN 493\r\n WHEN a.AdministrativeArea \u003d \u0027Wonowon\u0027 THEN 506\r\n WHEN a.AdministrativeArea \u003d \u0027Halfway River\u0027 THEN 488\r\n WHEN a.AdministrativeArea \u003d \u0027Giscome\u0027 THEN 486\r\n WHEN a.AdministrativeArea \u003d \u0027Willow River\u0027 THEN 505\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lower Nicola\u0027 THEN 314\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Belcarra\u0027 THEN 425\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Tsawwassen\u0027 THEN 315\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Anmore\u0027 THEN 432\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lake Cowichan\u0027 THEN 442\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027North Cowichan\u0027 THEN 450\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Port Edward\u0027 THEN 347\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Spallumcheen\u0027 THEN 318\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Jumbo Glacier Mountain Resort Municipality\u0027 THEN 438\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Kent\u0027 THEN 439\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Highlands\u0027 THEN 348\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Slocan\u0027 THEN 380\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Warfield\u0027 THEN 448\r\n ELSE aa.Id \r\n END AS AdministrativeAreaId, \r\n\ta.Address1, \r\n\ta.Postal,\r\n\t1 as PropertyTypeID\r\nFROM \r\n [pims].[dbo].Buildings p\r\n\tINNER JOIN Addresses a\r\n\tON p.AddressId \u003d a.Id\r\n\tLEFT OUTER JOIN AdministrativeAreas aa\r\n\tON aa.Name \u003d a.AdministrativeArea\r\nWHERE p.BuildingPredominateUseId \u003c\u003d 54": { + "targetName": "building", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "Name": { + "targetName": "\"Name\"", + "mappingType": "existing" + }, + "description": { + "targetName": "\"Description\"", + "mappingType": "existing" + }, + "classificationid": { + "targetName": "\"ClassificationId\"", + "mappingType": "existing" + }, + "buildingconstructiontypeid": { + "targetName": "\"BuildingConstructionTypeId\"", + "mappingType": "existing" + }, + "agencyid": { + "targetName": "\"AgencyId\"", + "mappingType": "existing" + }, + "issensitive": { + "targetName": "\"IsSensitive\"", + "mappingType": "existing" + }, + "isvisibletootheragencies": { + "targetName": "\"IsVisibleToOtherAgencies\"", + "mappingType": "existing" + }, + "buildingfloorcount": { + "targetName": "\"BuildingFloorCount\"", + "mappingType": "existing" + }, + "buildingpredominateuseid": { + "targetName": "\"BuildingPredominateUseId\"", + "mappingType": "existing" + }, + "buildingtenancy": { + "targetName": "\"BuildingTenancy\"", + "mappingType": "existing" + }, + "rentablearea": { + "targetName": "\"RentableArea\"", + "mappingType": "existing" + }, + "buildingoccupanttypeid": { + "targetName": "\"BuildingOccupantTypeId\"", + "mappingType": "existing" + }, + "leaseexpiry": { + "targetName": "\"LeaseExpiry\"", + "mappingType": "existing" + }, + "occupantname": { + "targetName": "\"OccupantName\"", + "mappingType": "existing" + }, + "transferleaseonsale": { + "targetName": "\"TransferLeaseOnSale\"", + "mappingType": "existing" + }, + "buildingtenancyupdatedon": { + "targetName": "\"BuildingTenancyUpdatedOn\"", + "mappingType": "existing" + }, + "encumbrancereason": { + "targetName": "\"EncumbranceReason\"", + "mappingType": "existing" + }, + "leasedlandmetadata": { + "targetName": "\"LeasedLandMetadata\"", + "mappingType": "existing" + }, + "totalarea": { + "targetName": "\"TotalArea\"", + "mappingType": "existing" + }, + "Location": { + "targetName": "\"Location\"", + "mappingType": "existing" + }, + "administrativeareaid": { + "targetName": "\"AdministrativeAreaId\"", + "mappingType": "existing" + }, + "address1": { + "targetName": "\"Address1\"", + "mappingType": "existing" + }, + "postal": { + "targetName": "\"Postal\"", + "mappingType": "existing" + }, + "propertytypeid": { + "targetName": "\"PropertyTypeID\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [ParcelId]\r\n ,[Date]\r\n ,[Key]\r\n ,\r\n\t CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Firm]\r\n ,[Value]\r\n ,[Note]\r\n FROM [pims].[dbo].[ParcelEvaluations]": { + "targetName": "parcel_evaluation", + "mappingType": "existing", + "attributes": { + "parcelid": { + "targetName": "\"ParcelId\"", + "mappingType": "existing" + }, + "Date": { + "targetName": "\"Date\"", + "mappingType": "existing" + }, + "Key": { + "targetName": "\"EvaluationKeyId\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "firm": { + "targetName": "\"Firm\"", + "mappingType": "existing" + }, + "value": { + "targetName": "\"Value\"", + "mappingType": "existing" + }, + "note": { + "targetName": "\"Note\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [BuildingId]\r\n ,[Date]\r\n ,[Key]\r\n ,\r\n\t CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Value]\r\n ,[Note]\r\n FROM [pims].[dbo].[BuildingEvaluations]\r\nWHERE BuildingId IN (\r\n\tSELECT b.Id \r\n\tFROM Buildings b\r\n\tWHERE b.BuildingPredominateUseId \u003c\u003d 54\r\n)": { + "targetName": "building_evaluation", + "mappingType": "existing", + "attributes": { + "buildingid": { + "targetName": "\"BuildingId\"", + "mappingType": "existing" + }, + "Date": { + "targetName": "\"Date\"", + "mappingType": "existing" + }, + "Key": { + "targetName": "\"EvaluationKeyId\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "value": { + "targetName": "\"Value\"", + "mappingType": "existing" + }, + "note": { + "targetName": "\"Note\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT pb.*\r\n FROM [pims].[dbo].ParcelBuildings pb\r\n INNER JOIN Buildings b\r\n ON b.Id \u003d pb.BuildingId\r\n WHERE b.BuildingPredominateUseId \u003c\u003d 54": { + "targetName": "parcel_building", + "mappingType": "existing", + "attributes": { + "parcelid": { + "targetName": "\"ParcelId\"", + "mappingType": "existing" + }, + "buildingid": { + "targetName": "\"BuildingId\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ParcelFiscals": { + "targetName": "parcel_fiscal", + "mappingType": "existing", + "attributes": { + "parcelid": { + "targetName": "\"ParcelId\"", + "mappingType": "existing" + }, + "fiscalyear": { + "targetName": "\"FiscalYear\"", + "mappingType": "existing" + }, + "Key": { + "targetName": "\"FiscalKeyId\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "value": { + "targetName": "\"Value\"", + "mappingType": "existing" + }, + "note": { + "targetName": "\"Note\"", + "mappingType": "existing" + }, + "effectivedate": { + "targetName": "\"EffectiveDate\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [ParcelId]\r\n ,[FiscalYear]\r\n ,[Key]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Value]\r\n ,[Note]\r\n ,[EffectiveDate]\r\n FROM [dbo].[ParcelFiscals]": { + "targetName": "parcel_fiscal", + "mappingType": "existing", + "attributes": { + "parcelid": { + "targetName": "parcelid", + "mappingType": "existing" + }, + "fiscalyear": { + "targetName": "fiscalyear", + "mappingType": "existing" + }, + "Key": { + "targetName": "\"FiscalKeyId\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "createdbyid", + "mappingType": "existing" + }, + "createdon": { + "targetName": "createdon", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "updatedbyid", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "updatedon", + "mappingType": "existing" + }, + "value": { + "targetName": "value", + "mappingType": "existing" + }, + "note": { + "targetName": "note", + "mappingType": "existing" + }, + "effectivedate": { + "targetName": "effectivedate", + "mappingType": "existing" + } + } + } + } + }, + "producer": "database_producer", + "consumer": "database_consumer" + } + } + }, + "61eece26-d465-43ec-837e-d9798e443840": { + "task": "dataExport", + "label": "ParcelEvaluationsExport", + "description": "", + "createTime": "202402150940", + "updateTime": "202402150940", + "state": { + "producers": [ + { + "type": "databaseTransferProducer", + "location": { + "type": "query", + "project": "General", + "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", + "defaultCatalog": "pims", + "query": "SELECT [ParcelId]\r\n ,[Date]\r\n ,[Key]\r\n ,\r\n\t CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Firm]\r\n ,[Value]\r\n ,[Note]\r\n FROM [pims].[dbo].[ParcelEvaluations]" + } + } + ], + "consumers": [ + { + "type": "databaseTransferConsumer" + } + ], + "configuration": { + "maxJobCount": 1, + "showFinalMessage": true, + "DatabaseTransferProducer": { + "extractType": "SEGMENTS", + "segmentSize": 1000, + "fetchSize": 10000, + "openNewConnections": false, + "queryRowCount": false, + "selectedColumnsOnly": false, + "selectedRowsOnly": false + }, + "DatabaseTransferConsumer": { + "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", + "openNewConnections": true, + "useTransactions": true, + "commitAfterRows": 1000, + "useMultiRowInsert": false, + "multiRowInsertBatch": 500, + "skipBindValues": false, + "disableUsingBatches": true, + "ignoreDuplicateRows": false, + "transferAutoGeneratedColumns": true, + "disableReferentialIntegrity": false, + "useBulkLoad": false, + "truncateBeforeLoad": false, + "openTableOnFinish": true, + "mappings": { + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ParcelEvaluations": { + "targetName": "parcel_evaluation", + "mappingType": "existing", + "attributes": { + "parcelid": { + "targetName": "\"ParcelId\"", + "mappingType": "existing" + }, + "Date": { + "targetName": "\"Date\"", + "mappingType": "existing" + }, + "Key": { + "targetName": "\"EvaluationKeyId\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "mappingType": "skip" + }, + "firm": { + "targetName": "\"Firm\"", + "mappingType": "existing" + }, + "value": { + "targetName": "\"Value\"", + "mappingType": "existing" + }, + "note": { + "targetName": "\"Note\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [ParcelId]\r\n ,[Date]\r\n ,[Key]\r\n ,\r\n\t CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Firm]\r\n ,[Value]\r\n ,[Note]\r\n FROM [pims].[dbo].[ParcelEvaluations]": { + "targetName": "parcel_evaluation", + "mappingType": "existing", + "attributes": { + "parcelid": { + "targetName": "\"ParcelId\"", + "mappingType": "existing" + }, + "Date": { + "targetName": "\"Date\"", + "mappingType": "existing" + }, + "Key": { + "targetName": "\"EvaluationKeyId\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "firm": { + "targetName": "\"Firm\"", + "mappingType": "existing" + }, + "value": { + "targetName": "\"Value\"", + "mappingType": "existing" + }, + "note": { + "targetName": "\"Note\"", + "mappingType": "existing" + } + } + } + } + }, + "producer": "database_producer", + "consumer": "database_consumer" + } + } + }, + "a8547f52-50ee-44cc-8c87-d39f2b229591": { + "task": "dataExport", + "label": "BuildingEvaluationsExport", + "description": "", + "taskFolder": "Testing", + "createTime": "202402151103", + "updateTime": "202402151103", + "state": { + "producers": [ + { + "type": "databaseTransferProducer", + "location": { + "type": "query", + "project": "General", + "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", + "query": "SELECT [BuildingId]\r\n ,[Date]\r\n ,[Key]\r\n ,\r\n\t CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Value]\r\n ,[Note]\r\n FROM [pims].[dbo].[BuildingEvaluations]\r\nWHERE BuildingId IN (\r\n\tSELECT b.Id \r\n\tFROM Buildings b\r\n\tWHERE b.BuildingPredominateUseId \u003c\u003d 54\r\n)" + } + } + ], + "consumers": [ + { + "type": "databaseTransferConsumer" + } + ], + "configuration": { + "maxJobCount": 1, + "showFinalMessage": true, + "DatabaseTransferProducer": { + "extractType": "SEGMENTS", + "segmentSize": 1000, + "fetchSize": 10000, + "openNewConnections": false, + "queryRowCount": false, + "selectedColumnsOnly": false, + "selectedRowsOnly": false + }, + "DatabaseTransferConsumer": { + "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", + "openNewConnections": true, + "useTransactions": true, + "commitAfterRows": 1000, + "useMultiRowInsert": false, + "multiRowInsertBatch": 500, + "skipBindValues": false, + "disableUsingBatches": true, + "ignoreDuplicateRows": false, + "transferAutoGeneratedColumns": true, + "disableReferentialIntegrity": false, + "useBulkLoad": false, + "truncateBeforeLoad": false, + "openTableOnFinish": true, + "mappings": { + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [BuildingId]\r\n ,[Date]\r\n ,[Key]\r\n ,\r\n\t CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Value]\r\n ,[Note]\r\n FROM [pims].[dbo].[BuildingEvaluations]\r\nWHERE BuildingId IN (\r\n\tSELECT b.Id \r\n\tFROM Buildings b\r\n\tWHERE b.BuildingPredominateUseId \u003c\u003d 54\r\n)": { + "targetName": "building_evaluation", + "mappingType": "existing", + "attributes": { + "buildingid": { + "targetName": "\"BuildingId\"", + "mappingType": "existing" + }, + "Date": { + "targetName": "\"Date\"", + "mappingType": "existing" + }, + "Key": { + "targetName": "\"EvaluationKeyId\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "value": { + "targetName": "\"Value\"", + "mappingType": "existing" + }, + "note": { + "targetName": "\"Note\"", + "mappingType": "existing" + } + } + } + } + }, + "producer": "database_producer", + "consumer": "database_consumer" + } + } + }, + "baa4a814-9d6e-4cdd-8061-f7941345a5b7": { + "task": "dataExport", + "label": "ParcelFiscalsExport", + "description": "", + "taskFolder": "Testing", + "createTime": "202402151145", + "updateTime": "202402151145", + "state": { + "producers": [ + { + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ParcelFiscals" + } + } + ], + "consumers": [ + { + "type": "databaseTransferConsumer" + } + ], + "configuration": { + "maxJobCount": 1, + "showFinalMessage": true, + "DatabaseTransferProducer": { + "extractType": "SEGMENTS", + "segmentSize": 1000, + "fetchSize": 10000, + "openNewConnections": false, + "queryRowCount": false, + "selectedColumnsOnly": false, + "selectedRowsOnly": false + }, + "DatabaseTransferConsumer": { + "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", + "openNewConnections": true, + "useTransactions": true, + "commitAfterRows": 1000, + "useMultiRowInsert": false, + "multiRowInsertBatch": 500, + "skipBindValues": false, + "disableUsingBatches": true, + "ignoreDuplicateRows": false, + "transferAutoGeneratedColumns": true, + "disableReferentialIntegrity": false, + "useBulkLoad": false, + "truncateBeforeLoad": false, + "openTableOnFinish": true, + "mappings": { + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ParcelFiscals": { + "targetName": "parcel_fiscal", + "mappingType": "existing", + "attributes": { + "parcelid": { + "targetName": "\"ParcelId\"", + "mappingType": "existing" + }, + "fiscalyear": { + "targetName": "\"FiscalYear\"", + "mappingType": "existing" + }, + "Key": { + "targetName": "\"FiscalKeyId\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "value": { + "targetName": "\"Value\"", + "mappingType": "existing" + }, + "note": { + "targetName": "\"Note\"", + "mappingType": "existing" + }, + "effectivedate": { + "targetName": "\"EffectiveDate\"", + "mappingType": "existing" + } + } + } + } + }, + "producer": "database_producer", + "consumer": "database_consumer" + } + } + } +} \ No newline at end of file From 9d14543f7cfdec0a6fa8d7c8fb52d89cbb8e1098 Mon Sep 17 00:00:00 2001 From: Lawrence Lau Date: Thu, 15 Feb 2024 16:10:11 -0800 Subject: [PATCH 04/11] adjusting ETL for users and adding project related tables --- tools/dbeaver/tasks.json | 1043 ++++++++++++++++++++++++++++++-------- 1 file changed, 835 insertions(+), 208 deletions(-) diff --git a/tools/dbeaver/tasks.json b/tools/dbeaver/tasks.json index 0a4be3790f..162a7c3ebf 100644 --- a/tools/dbeaver/tasks.json +++ b/tools/dbeaver/tasks.json @@ -3249,12 +3249,12 @@ } ], "configuration": { - "maxJobCount": 1.0, + "maxJobCount": 1, "showFinalMessage": true, "DatabaseTransferProducer": { "extractType": "SEGMENTS", - "segmentSize": 100.0, - "fetchSize": 10000.0, + "segmentSize": 100, + "fetchSize": 10000, "openNewConnections": false, "queryRowCount": false, "selectedColumnsOnly": false, @@ -3264,9 +3264,9 @@ "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", "openNewConnections": true, "useTransactions": true, - "commitAfterRows": 1000.0, + "commitAfterRows": 1000, "useMultiRowInsert": false, - "multiRowInsertBatch": 500.0, + "multiRowInsertBatch": 500, "skipBindValues": false, "disableUsingBatches": true, "ignoreDuplicateRows": false, @@ -3854,7 +3854,7 @@ "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", "defaultCatalog": "pims", "defaultSchema": "dbo", - "query": "\r\nSELECT \r\n u.[Id],\r\n \r\n\t CASE \r\n\t\tWHEN u.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE u.[CreatedById]\r\n\t END AS [CreatedById],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n urd.CreatedOn,\r\n urd.UserId,\r\n ua.AgencyId, \r\n STRING_AGG(urd.RoleName, \u0027, \u0027) AS Roles,\r\n CASE \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%System Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial Reporter%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial%\u0027 THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Agency Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Analyst%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Manager%\u0027 THEN \u002700000000-0000-0000-0000-000000000001\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister Assistant%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Executive Director%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%View Only Properties%\u0027 THEN \u002700000000-0000-0000-0000-000000000002\u0027\r\n\t \r\n END AS UserType\r\nFROM Users u\r\nLEFT JOIN (\r\n SELECT \r\n ur.UserId,\r\n MAX(ur.CreatedOn) AS CreatedOn,\r\n STRING_AGG(r.Name, \u0027, \u0027) AS RoleName\r\n FROM [pims].[dbo].[UserRoles] ur\r\n INNER JOIN Roles r ON ur.RoleId \u003d r.Id\r\n GROUP BY ur.UserId\r\n) AS urd ON u.Id \u003d urd.UserId\r\n\r\nLEFT OUTER JOIN (\r\n SELECT UserId, MIN(AgencyId) AS AgencyId\r\n FROM UserAgencies\r\n GROUP BY UserId\r\n) ua_min ON u.Id \u003d ua_min.UserId\r\nLEFT OUTER JOIN UserAgencies ua ON u.Id \u003d ua.UserId AND ua.AgencyId \u003d ua_min.AgencyId\r\n\r\nWHERE u.Id \u003c\u003e \u002700000000-0000-0000-0000-000000000000\u0027\r\n\r\nGROUP BY u.[Id],\r\n u.[CreatedById],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n urd.CreatedOn, \r\n urd.UserId, \r\n ua.AgencyId\r\nORDER BY urd.CreatedOn ASC" + "query": "\r\nSELECT \r\n u.[Id],\r\n \r\n\t CASE \r\n\t\tWHEN u.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE u.[CreatedById]\r\n\t END AS [CreatedById],\r\n \r\n\t CASE \r\n\t\tWHEN u.IsDisabled \u003d 0 THEN \u0027Active\u0027\r\n\t\tELSE \u0027Disabled\u0027\r\n\t END AS [Status],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n urd.CreatedOn,\r\n urd.UserId,\r\n ua.AgencyId, \r\n STRING_AGG(urd.RoleName, \u0027, \u0027) AS Roles,\r\n CASE \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%System Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial Reporter%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial%\u0027 THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Agency Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Analyst%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Manager%\u0027 THEN \u002700000000-0000-0000-0000-000000000001\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister Assistant%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Executive Director%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%View Only Properties%\u0027 THEN \u002700000000-0000-0000-0000-000000000002\u0027\r\n\t \r\n END AS UserType\r\nFROM Users u\r\nLEFT JOIN (\r\n SELECT \r\n ur.UserId,\r\n MAX(ur.CreatedOn) AS CreatedOn,\r\n STRING_AGG(r.Name, \u0027, \u0027) AS RoleName\r\n FROM [pims].[dbo].[UserRoles] ur\r\n INNER JOIN Roles r ON ur.RoleId \u003d r.Id\r\n GROUP BY ur.UserId\r\n) AS urd ON u.Id \u003d urd.UserId\r\n\r\nLEFT OUTER JOIN (\r\n SELECT UserId, MIN(AgencyId) AS AgencyId\r\n FROM UserAgencies\r\n GROUP BY UserId\r\n) ua_min ON u.Id \u003d ua_min.UserId\r\nLEFT OUTER JOIN UserAgencies ua ON u.Id \u003d ua.UserId AND ua.AgencyId \u003d ua_min.AgencyId\r\n\r\nWHERE u.Id \u003c\u003e \u002700000000-0000-0000-0000-000000000000\u0027\r\n\r\nGROUP BY u.[Id],\r\n u.[CreatedById],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n urd.CreatedOn, \r\n urd.UserId, \r\n ua.AgencyId\r\nORDER BY urd.CreatedOn ASC" } }, { @@ -3916,6 +3916,50 @@ "defaultCatalog": "pims", "query": "SELECT [ParcelId]\r\n ,[FiscalYear]\r\n ,[Key]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Value]\r\n ,[Note]\r\n ,[EffectiveDate]\r\n FROM [dbo].[ParcelFiscals]" } + }, + { + "type": "databaseTransferProducer", + "location": { + "type": "query", + "project": "General", + "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", + "defaultCatalog": "pims", + "query": "\r\n SELECT BuildingId,\r\n FiscalYear,\r\n [Key],\r\n CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById],\r\n CreatedOn,\r\n UpdatedById,\r\n UpdatedOn,\r\n [Value],\r\n Note,\r\n EffectiveDate\r\n FROM BuildingFiscals \r\n \r\nWHERE BuildingId IN (\r\n\tSELECT b.Id \r\n\tFROM Buildings b\r\n\tWHERE b.BuildingPredominateUseId \u003c\u003d 54\r\n)" + } + }, + { + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Projects" + } + }, + { + "type": "databaseTransferProducer", + "location": { + "type": "query", + "project": "General", + "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", + "defaultCatalog": "pims", + "query": "\r\nSELECT [ProjectId]\r\n ,[TaskId]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[IsCompleted]\r\n ,[CompletedOn]\r\n FROM [dbo].[ProjectTasks]" + } + }, + { + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectStatusHistory" + } + }, + { + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectSnapshots" + } } ], "consumers": [ @@ -3940,6 +3984,21 @@ { "type": "databaseTransferConsumer" }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, { "type": "databaseTransferConsumer" } @@ -3972,82 +4031,7 @@ "truncateBeforeLoad": false, "openTableOnFinish": true, "mappings": { - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Agencies": { - "targetName": "agency", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "\"Id\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing", - "transformer": "constant", - "transformerProperties": { - "constant": "00000000-0000-0000-0000-000000000000" - }, - "transformerPropertiesNames": "constant" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - }, - "Name": { - "targetName": "\"Name\"", - "mappingType": "existing" - }, - "isdisabled": { - "targetName": "\"IsDisabled\"", - "mappingType": "existing" - }, - "sortorder": { - "targetName": "\"SortOrder\"", - "mappingType": "existing" - }, - "code": { - "targetName": "\"Code\"", - "mappingType": "existing" - }, - "description": { - "targetName": "\"Description\"", - "mappingType": "existing" - }, - "parentid": { - "targetName": "\"ParentId\"", - "mappingType": "existing" - }, - "email": { - "targetName": "\"Email\"", - "mappingType": "existing" - }, - "sendemail": { - "targetName": "\"SendEmail\"", - "mappingType": "existing" - }, - "addressto": { - "targetName": "\"AddressTo\"", - "mappingType": "existing" - }, - "ccemail": { - "targetName": "\"CCEmail\"", - "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT \r\n u.[Id],\r\n \r\n\t CASE \r\n\t\tWHEN u.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE u.[CreatedById]\r\n\t END AS [CreatedById],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n urd.CreatedOn,\r\n urd.UserId,\r\n ua.AgencyId, \r\n STRING_AGG(urd.RoleName, \u0027, \u0027) AS Roles,\r\n CASE \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%System Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial Reporter%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial%\u0027 THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Agency Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Analyst%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Manager%\u0027 THEN \u002700000000-0000-0000-0000-000000000001\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister Assistant%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Executive Director%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%View Only Properties%\u0027 THEN \u002700000000-0000-0000-0000-000000000002\u0027\r\n\t \r\n END AS UserType\r\nFROM Users u\r\nLEFT JOIN (\r\n SELECT \r\n ur.UserId,\r\n MAX(ur.CreatedOn) AS CreatedOn,\r\n STRING_AGG(r.Name, \u0027, \u0027) AS RoleName\r\n FROM [pims].[dbo].[UserRoles] ur\r\n INNER JOIN Roles r ON ur.RoleId \u003d r.Id\r\n GROUP BY ur.UserId\r\n) AS urd ON u.Id \u003d urd.UserId\r\n\r\nLEFT OUTER JOIN (\r\n SELECT UserId, MIN(AgencyId) AS AgencyId\r\n FROM UserAgencies\r\n GROUP BY UserId\r\n) ua_min ON u.Id \u003d ua_min.UserId\r\nLEFT OUTER JOIN UserAgencies ua ON u.Id \u003d ua.UserId AND ua.AgencyId \u003d ua_min.AgencyId\r\n\r\nWHERE u.Id \u003c\u003e \u002700000000-0000-0000-0000-000000000000\u0027\r\n\r\nGROUP BY u.[Id],\r\n u.[CreatedById],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n urd.CreatedOn, \r\n urd.UserId, \r\n ua.AgencyId\r\nORDER BY urd.CreatedOn ASC": { + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT \r\n u.[Id],\r\n \r\n\t CASE \r\n\t\tWHEN u.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE u.[CreatedById]\r\n\t END AS [CreatedById],\r\n \r\n\t CASE \r\n\t\tWHEN u.IsDisabled \u003d 0 THEN \u0027Active\u0027\r\n\t\tELSE \u0027Disabled\u0027\r\n\t END AS [Status],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n urd.CreatedOn,\r\n urd.UserId,\r\n ua.AgencyId, \r\n STRING_AGG(urd.RoleName, \u0027, \u0027) AS Roles,\r\n CASE \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%System Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial Reporter%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial%\u0027 THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Agency Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Analyst%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Manager%\u0027 THEN \u002700000000-0000-0000-0000-000000000001\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister Assistant%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Executive Director%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%View Only Properties%\u0027 THEN \u002700000000-0000-0000-0000-000000000002\u0027\r\n\t \r\n END AS UserType\r\nFROM Users u\r\nLEFT JOIN (\r\n SELECT \r\n ur.UserId,\r\n MAX(ur.CreatedOn) AS CreatedOn,\r\n STRING_AGG(r.Name, \u0027, \u0027) AS RoleName\r\n FROM [pims].[dbo].[UserRoles] ur\r\n INNER JOIN Roles r ON ur.RoleId \u003d r.Id\r\n GROUP BY ur.UserId\r\n) AS urd ON u.Id \u003d urd.UserId\r\n\r\nLEFT OUTER JOIN (\r\n SELECT UserId, MIN(AgencyId) AS AgencyId\r\n FROM UserAgencies\r\n GROUP BY UserId\r\n) ua_min ON u.Id \u003d ua_min.UserId\r\nLEFT OUTER JOIN UserAgencies ua ON u.Id \u003d ua.UserId AND ua.AgencyId \u003d ua_min.AgencyId\r\n\r\nWHERE u.Id \u003c\u003e \u002700000000-0000-0000-0000-000000000000\u0027\r\n\r\nGROUP BY u.[Id],\r\n u.[CreatedById],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n urd.CreatedOn, \r\n urd.UserId, \r\n ua.AgencyId\r\nORDER BY urd.CreatedOn ASC": { "targetName": "user", "mappingType": "existing", "attributes": { @@ -4059,6 +4043,10 @@ "targetName": "createdbyid", "mappingType": "existing" }, + "status": { + "targetName": "status", + "mappingType": "existing" + }, "updatedbyid": { "targetName": "updatedbyid", "mappingType": "existing" @@ -4149,6 +4137,81 @@ } } }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Agencies": { + "targetName": "agency", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing", + "transformer": "constant", + "transformerProperties": { + "constant": "00000000-0000-0000-0000-000000000000" + }, + "transformerPropertiesNames": "constant" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "Name": { + "targetName": "\"Name\"", + "mappingType": "existing" + }, + "isdisabled": { + "targetName": "\"IsDisabled\"", + "mappingType": "existing" + }, + "sortorder": { + "targetName": "\"SortOrder\"", + "mappingType": "existing" + }, + "code": { + "targetName": "\"Code\"", + "mappingType": "existing" + }, + "description": { + "targetName": "\"Description\"", + "mappingType": "existing" + }, + "parentid": { + "targetName": "\"ParentId\"", + "mappingType": "existing" + }, + "email": { + "targetName": "\"Email\"", + "mappingType": "existing" + }, + "sendemail": { + "targetName": "\"SendEmail\"", + "mappingType": "existing" + }, + "addressto": { + "targetName": "\"AddressTo\"", + "mappingType": "existing" + }, + "ccemail": { + "targetName": "\"CCEmail\"", + "mappingType": "existing" + } + } + }, "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT p.[Id],\r\n\t CASE \r\n\t\tWHEN p.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE p.[CreatedById]\r\n\t END AS [CreatedById],\r\n p.[CreatedOn],\r\n p.[UpdatedById],\r\n p.[UpdatedOn],\r\n p.[Name],\r\n p.[Description],\r\n p.[ClassificationId],\r\n p.[AgencyId],\r\n p.[IsSensitive],\r\n p.[IsVisibleToOtherAgencies],\r\n p.[PID],\r\n p.[PIN],\r\n p.[LandArea],\r\n p.[LandLegalDescription],\r\n p.[Zoning],\r\n p.[ZoningPotential],\r\n p.[NotOwned],\r\n\tCONVERT(VARCHAR(40), CAST(Location.Long AS DECIMAL(18, 14))) + \u0027, \u0027 + CONVERT(VARCHAR(40), CAST(Location.Lat AS DECIMAL(18, 14))) AS Location,\r\n CASE \r\n WHEN a.AdministrativeArea \u003d \u0027The Corporation of the City of Nelson\u0027 THEN 188\r\n WHEN a.AdministrativeArea \u003d \u0027Township of Langley\u0027 THEN 150\r\n WHEN a.AdministrativeArea \u003d \u0027District of North Vancouver\u0027 THEN 196\r\n WHEN a.AdministrativeArea \u003d \u0027Coombs\u0027 THEN 483\r\n WHEN a.AdministrativeArea \u003d \u0027Brookmere\u0027 THEN 481\r\n WHEN a.AdministrativeArea \u003d \u0027Thornhill\u0027 THEN 501\r\n WHEN a.AdministrativeArea \u003d \u0027Two Mile\u0027 THEN 502\r\n WHEN a.AdministrativeArea \u003d \u0027Crofton\u0027 THEN 484\r\n WHEN a.AdministrativeArea \u003d \u0027East Sooke\u0027 THEN 485\r\n WHEN a.AdministrativeArea \u003d \u0027Mudge Island\u0027 THEN 492\r\n WHEN a.AdministrativeArea \u003d \u0027Coal Harbour\u0027 THEN 482\r\n WHEN a.AdministrativeArea \u003d \u0027Miworth\u0027 THEN 490\r\n WHEN a.AdministrativeArea \u003d \u0027Lake Errock\u0027 THEN 489\r\n WHEN a.AdministrativeArea \u003d \u0027Black Creek\u0027 THEN 479\r\n WHEN a.AdministrativeArea \u003d \u0027Whaletown\u0027 THEN 504\r\n WHEN a.AdministrativeArea \u003d \u0027Quathiaski Cove\u0027 THEN 494\r\n WHEN a.AdministrativeArea \u003d \u0027Big Bay in Stuart Island\u0027 THEN 478\r\n WHEN a.AdministrativeArea \u003d \u0027Surge Narrows in Read Island\u0027 THEN 500\r\n WHEN a.AdministrativeArea \u003d \u0027Rock Bay in Sayward\u0027 THEN 497\r\n WHEN a.AdministrativeArea \u003d \u0027Granite Bay in Quadra Island\u0027 THEN 487\r\n WHEN a.AdministrativeArea \u003d \u0027Moberly Lake\u0027 THEN 491\r\n WHEN a.AdministrativeArea \u003d \u0027Quatsino\u0027 THEN 495\r\n WHEN a.AdministrativeArea \u003d \u0027Bouchie Lake\u0027 THEN 480\r\n WHEN a.AdministrativeArea \u003d \u0027West Lake\u0027 THEN 503\r\n WHEN a.AdministrativeArea \u003d \u0027Salmon Valley\u0027 THEN 498\t\t\r\n WHEN a.AdministrativeArea \u003d \u0027Red Rock\u0027 THEN 496\r\n WHEN a.AdministrativeArea \u003d \u0027Stoner\u0027 THEN 499\r\n WHEN a.AdministrativeArea \u003d \u0027Pineview FFG\u0027 THEN 493\r\n WHEN a.AdministrativeArea \u003d \u0027Wonowon\u0027 THEN 506\r\n WHEN a.AdministrativeArea \u003d \u0027Halfway River\u0027 THEN 488\r\n WHEN a.AdministrativeArea \u003d \u0027Giscome\u0027 THEN 486\r\n WHEN a.AdministrativeArea \u003d \u0027Willow River\u0027 THEN 505\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lower Nicola\u0027 THEN 314\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Belcarra\u0027 THEN 425\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Tsawwassen\u0027 THEN 315\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Anmore\u0027 THEN 432\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lake Cowichan\u0027 THEN 442\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027North Cowichan\u0027 THEN 450\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Port Edward\u0027 THEN 347\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Spallumcheen\u0027 THEN 318\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Jumbo Glacier Mountain Resort Municipality\u0027 THEN 438\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Kent\u0027 THEN 439\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Highlands\u0027 THEN 348\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Slocan\u0027 THEN 380\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Warfield\u0027 THEN 448\r\n ELSE aa.Id \r\n END AS AdministrativeAreaId, \r\n\ta.AdministrativeArea,\r\n\ta.Address1, \r\n\ta.Postal,\r\n\tpp.ParcelId as ParentID,\r\n\t0 as PropertyTypeID\r\nFROM \r\n [pims].[dbo].[Parcels] p\r\n\tINNER JOIN Addresses a\r\n\tON p.AddressId \u003d a.Id\r\n\tLEFT OUTER JOIN AdministrativeAreas aa\r\n\tON aa.Name \u003d a.AdministrativeArea\r\n    LEFT OUTER JOIN ParcelParcels pp\r\n    ON pp.SubdivisionId \u003d p.Id": { "targetName": "parcel", "mappingType": "existing", @@ -4499,16 +4562,16 @@ } } }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ParcelFiscals": { + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [ParcelId]\r\n ,[FiscalYear]\r\n ,[Key]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Value]\r\n ,[Note]\r\n ,[EffectiveDate]\r\n FROM [dbo].[ParcelFiscals]": { "targetName": "parcel_fiscal", "mappingType": "existing", "attributes": { "parcelid": { - "targetName": "\"ParcelId\"", + "targetName": "parcelid", "mappingType": "existing" }, "fiscalyear": { - "targetName": "\"FiscalYear\"", + "targetName": "fiscalyear", "mappingType": "existing" }, "Key": { @@ -4516,49 +4579,45 @@ "mappingType": "existing" }, "createdbyid": { - "targetName": "\"CreatedById\"", + "targetName": "createdbyid", "mappingType": "existing" }, "createdon": { - "targetName": "\"CreatedOn\"", + "targetName": "createdon", "mappingType": "existing" }, "updatedbyid": { - "targetName": "\"UpdatedById\"", + "targetName": "updatedbyid", "mappingType": "existing" }, "updatedon": { - "targetName": "\"UpdatedOn\"", + "targetName": "updatedon", "mappingType": "existing" }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - }, "value": { - "targetName": "\"Value\"", + "targetName": "value", "mappingType": "existing" }, "note": { - "targetName": "\"Note\"", + "targetName": "note", "mappingType": "existing" }, "effectivedate": { - "targetName": "\"EffectiveDate\"", + "targetName": "effectivedate", "mappingType": "existing" } } }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [ParcelId]\r\n ,[FiscalYear]\r\n ,[Key]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Value]\r\n ,[Note]\r\n ,[EffectiveDate]\r\n FROM [dbo].[ParcelFiscals]": { - "targetName": "parcel_fiscal", + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\n SELECT BuildingId,\r\n FiscalYear,\r\n [Key],\r\n CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById],\r\n CreatedOn,\r\n UpdatedById,\r\n UpdatedOn,\r\n [Value],\r\n Note,\r\n EffectiveDate\r\n FROM BuildingFiscals \r\n \r\nWHERE BuildingId IN (\r\n\tSELECT b.Id \r\n\tFROM Buildings b\r\n\tWHERE b.BuildingPredominateUseId \u003c\u003d 54\r\n)": { + "targetName": "building_fiscal", "mappingType": "existing", "attributes": { - "parcelid": { - "targetName": "parcelid", + "buildingid": { + "targetName": "\"BuildingId\"", "mappingType": "existing" }, "fiscalyear": { - "targetName": "fiscalyear", + "targetName": "\"FiscalYear\"", "mappingType": "existing" }, "Key": { @@ -4566,31 +4625,538 @@ "mappingType": "existing" }, "createdbyid": { - "targetName": "createdbyid", + "targetName": "\"CreatedById\"", "mappingType": "existing" }, "createdon": { - "targetName": "createdon", + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "value": { + "targetName": "\"Value\"", + "mappingType": "existing" + }, + "note": { + "targetName": "\"Note\"", + "mappingType": "existing" + }, + "effectivedate": { + "targetName": "\"EffectiveDate\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Projects": { + "targetName": "project", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "projectnumber": { + "targetName": "\"ProjectNumber\"", + "mappingType": "existing" + }, + "Name": { + "targetName": "\"Name\"", + "mappingType": "existing" + }, + "workflowid": { + "targetName": "\"WorkflowId\"", + "mappingType": "existing" + }, + "manager": { + "targetName": "\"Manager\"", + "mappingType": "existing" + }, + "reportedfiscalyear": { + "targetName": "\"ReportedFiscalYear\"", + "mappingType": "existing" + }, + "actualfiscalyear": { + "targetName": "\"ActualFiscalYear\"", + "mappingType": "existing" + }, + "agencyid": { + "targetName": "\"AgencyId\"", + "mappingType": "existing" + }, + "statusid": { + "targetName": "\"StatusId\"", + "mappingType": "existing" + }, + "description": { + "targetName": "\"Description\"", + "mappingType": "existing" + }, + "tierlevelid": { + "targetName": "\"TierLevelId\"", + "mappingType": "existing" + }, + "riskid": { + "targetName": "\"RiskId\"", + "mappingType": "existing" + }, + "metadata": { + "targetName": "\"Metadata\"", + "mappingType": "existing" + }, + "submittedon": { + "targetName": "\"SubmittedOn\"", + "mappingType": "existing" + }, + "approvedon": { + "targetName": "\"ApprovedOn\"", + "mappingType": "existing" + }, + "deniedon": { + "targetName": "\"DeniedOn\"", + "mappingType": "existing" + }, + "cancelledon": { + "targetName": "\"CancelledOn\"", + "mappingType": "existing" + }, + "completedon": { + "targetName": "\"CompletedOn\"", + "mappingType": "existing" + }, + "netbook": { + "targetName": "\"NetBook\"", + "mappingType": "existing" + }, + "market": { + "targetName": "\"Market\"", + "mappingType": "existing" + }, + "assessed": { + "targetName": "\"Assessed\"", + "mappingType": "existing" + }, + "appraised": { + "targetName": "\"Appraised\"", + "mappingType": "existing" + }, + "projecttype": { + "targetName": "\"ProjectType\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT [ProjectId]\r\n ,[TaskId]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[IsCompleted]\r\n ,[CompletedOn]\r\n FROM [dbo].[ProjectTasks]": { + "targetName": "project_task", + "mappingType": "existing", + "attributes": { + "projectid": { + "targetName": "\"ProjectId\"", + "mappingType": "existing" + }, + "taskid": { + "targetName": "\"TaskId\"", + "mappingType": "existing" + }, + "CreatedById\r\n ,[CreatedOn": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "iscompleted": { + "targetName": "\"IsCompleted\"", + "mappingType": "existing" + }, + "completedon": { + "targetName": "\"CompletedOn\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectStatusHistory": { + "targetName": "project_status_history", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "projectid": { + "targetName": "\"ProjectId\"", + "mappingType": "existing" + }, + "workflowid": { + "targetName": "\"WorkflowId\"", + "mappingType": "existing" + }, + "statusid": { + "targetName": "\"StatusId\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectSnapshots": { + "targetName": "project_snapshot", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "projectid": { + "targetName": "\"ProjectId\"", + "mappingType": "existing" + }, + "netbook": { + "targetName": "\"NetBook\"", + "mappingType": "existing" + }, + "market": { + "targetName": "\"Market\"", + "mappingType": "existing" + }, + "assessed": { + "targetName": "\"Assessed\"", + "mappingType": "existing" + }, + "appraised": { + "targetName": "\"Appraised\"", + "mappingType": "existing" + }, + "snapshoton": { + "targetName": "\"SnapshotOn\"", + "mappingType": "existing" + }, + "metadata": { + "targetName": "\"Metadata\"", + "mappingType": "existing" + } + } + } + } + }, + "producer": "database_producer", + "consumer": "database_consumer" + } + } + }, + "61eece26-d465-43ec-837e-d9798e443840": { + "task": "dataExport", + "label": "ParcelEvaluationsExport", + "description": "", + "createTime": "202402150940", + "updateTime": "202402150940", + "state": { + "producers": [ + { + "type": "databaseTransferProducer", + "location": { + "type": "query", + "project": "General", + "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", + "defaultCatalog": "pims", + "query": "SELECT [ParcelId]\r\n ,[Date]\r\n ,[Key]\r\n ,\r\n\t CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Firm]\r\n ,[Value]\r\n ,[Note]\r\n FROM [pims].[dbo].[ParcelEvaluations]" + } + } + ], + "consumers": [ + { + "type": "databaseTransferConsumer" + } + ], + "configuration": { + "maxJobCount": 1, + "showFinalMessage": true, + "DatabaseTransferProducer": { + "extractType": "SEGMENTS", + "segmentSize": 1000, + "fetchSize": 10000, + "openNewConnections": false, + "queryRowCount": false, + "selectedColumnsOnly": false, + "selectedRowsOnly": false + }, + "DatabaseTransferConsumer": { + "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", + "openNewConnections": true, + "useTransactions": true, + "commitAfterRows": 1000, + "useMultiRowInsert": false, + "multiRowInsertBatch": 500, + "skipBindValues": false, + "disableUsingBatches": true, + "ignoreDuplicateRows": false, + "transferAutoGeneratedColumns": true, + "disableReferentialIntegrity": false, + "useBulkLoad": false, + "truncateBeforeLoad": false, + "openTableOnFinish": true, + "mappings": { + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ParcelEvaluations": { + "targetName": "parcel_evaluation", + "mappingType": "existing", + "attributes": { + "parcelid": { + "targetName": "\"ParcelId\"", + "mappingType": "existing" + }, + "Date": { + "targetName": "\"Date\"", + "mappingType": "existing" + }, + "Key": { + "targetName": "\"EvaluationKeyId\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "mappingType": "skip" + }, + "firm": { + "targetName": "\"Firm\"", + "mappingType": "existing" + }, + "value": { + "targetName": "\"Value\"", + "mappingType": "existing" + }, + "note": { + "targetName": "\"Note\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [ParcelId]\r\n ,[Date]\r\n ,[Key]\r\n ,\r\n\t CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Firm]\r\n ,[Value]\r\n ,[Note]\r\n FROM [pims].[dbo].[ParcelEvaluations]": { + "targetName": "parcel_evaluation", + "mappingType": "existing", + "attributes": { + "parcelid": { + "targetName": "\"ParcelId\"", + "mappingType": "existing" + }, + "Date": { + "targetName": "\"Date\"", + "mappingType": "existing" + }, + "Key": { + "targetName": "\"EvaluationKeyId\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "firm": { + "targetName": "\"Firm\"", + "mappingType": "existing" + }, + "value": { + "targetName": "\"Value\"", + "mappingType": "existing" + }, + "note": { + "targetName": "\"Note\"", + "mappingType": "existing" + } + } + } + } + }, + "producer": "database_producer", + "consumer": "database_consumer" + } + } + }, + "a8547f52-50ee-44cc-8c87-d39f2b229591": { + "task": "dataExport", + "label": "BuildingEvaluationsExport", + "description": "", + "taskFolder": "Testing", + "createTime": "202402151103", + "updateTime": "202402151103", + "state": { + "producers": [ + { + "type": "databaseTransferProducer", + "location": { + "type": "query", + "project": "General", + "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", + "query": "SELECT [BuildingId]\r\n ,[Date]\r\n ,[Key]\r\n ,\r\n\t CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Value]\r\n ,[Note]\r\n FROM [pims].[dbo].[BuildingEvaluations]\r\nWHERE BuildingId IN (\r\n\tSELECT b.Id \r\n\tFROM Buildings b\r\n\tWHERE b.BuildingPredominateUseId \u003c\u003d 54\r\n)" + } + } + ], + "consumers": [ + { + "type": "databaseTransferConsumer" + } + ], + "configuration": { + "maxJobCount": 1, + "showFinalMessage": true, + "DatabaseTransferProducer": { + "extractType": "SEGMENTS", + "segmentSize": 1000, + "fetchSize": 10000, + "openNewConnections": false, + "queryRowCount": false, + "selectedColumnsOnly": false, + "selectedRowsOnly": false + }, + "DatabaseTransferConsumer": { + "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", + "openNewConnections": true, + "useTransactions": true, + "commitAfterRows": 1000, + "useMultiRowInsert": false, + "multiRowInsertBatch": 500, + "skipBindValues": false, + "disableUsingBatches": true, + "ignoreDuplicateRows": false, + "transferAutoGeneratedColumns": true, + "disableReferentialIntegrity": false, + "useBulkLoad": false, + "truncateBeforeLoad": false, + "openTableOnFinish": true, + "mappings": { + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [BuildingId]\r\n ,[Date]\r\n ,[Key]\r\n ,\r\n\t CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Value]\r\n ,[Note]\r\n FROM [pims].[dbo].[BuildingEvaluations]\r\nWHERE BuildingId IN (\r\n\tSELECT b.Id \r\n\tFROM Buildings b\r\n\tWHERE b.BuildingPredominateUseId \u003c\u003d 54\r\n)": { + "targetName": "building_evaluation", + "mappingType": "existing", + "attributes": { + "buildingid": { + "targetName": "\"BuildingId\"", + "mappingType": "existing" + }, + "Date": { + "targetName": "\"Date\"", + "mappingType": "existing" + }, + "Key": { + "targetName": "\"EvaluationKeyId\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", "mappingType": "existing" }, "updatedbyid": { - "targetName": "updatedbyid", + "targetName": "\"UpdatedById\"", "mappingType": "existing" }, "updatedon": { - "targetName": "updatedon", + "targetName": "\"UpdatedOn\"", "mappingType": "existing" }, "value": { - "targetName": "value", + "targetName": "\"Value\"", "mappingType": "existing" }, "note": { - "targetName": "note", - "mappingType": "existing" - }, - "effectivedate": { - "targetName": "effectivedate", + "targetName": "\"Note\"", "mappingType": "existing" } } @@ -4602,22 +5168,21 @@ } } }, - "61eece26-d465-43ec-837e-d9798e443840": { + "baa4a814-9d6e-4cdd-8061-f7941345a5b7": { "task": "dataExport", - "label": "ParcelEvaluationsExport", + "label": "ParcelFiscalsExport", "description": "", - "createTime": "202402150940", - "updateTime": "202402150940", + "taskFolder": "Testing", + "createTime": "202402151145", + "updateTime": "202402151145", "state": { "producers": [ { "type": "databaseTransferProducer", "location": { - "type": "query", + "type": "entity", "project": "General", - "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", - "defaultCatalog": "pims", - "query": "SELECT [ParcelId]\r\n ,[Date]\r\n ,[Key]\r\n ,\r\n\t CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Firm]\r\n ,[Value]\r\n ,[Note]\r\n FROM [pims].[dbo].[ParcelEvaluations]" + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ParcelFiscals" } } ], @@ -4654,20 +5219,20 @@ "truncateBeforeLoad": false, "openTableOnFinish": true, "mappings": { - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ParcelEvaluations": { - "targetName": "parcel_evaluation", + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ParcelFiscals": { + "targetName": "parcel_fiscal", "mappingType": "existing", "attributes": { "parcelid": { "targetName": "\"ParcelId\"", "mappingType": "existing" }, - "Date": { - "targetName": "\"Date\"", + "fiscalyear": { + "targetName": "\"FiscalYear\"", "mappingType": "existing" }, "Key": { - "targetName": "\"EvaluationKeyId\"", + "targetName": "\"FiscalKeyId\"", "mappingType": "existing" }, "createdbyid": { @@ -4687,12 +5252,9 @@ "mappingType": "existing" }, "rowversion": { + "targetName": "\"RowVersion\"", "mappingType": "skip" }, - "firm": { - "targetName": "\"Firm\"", - "mappingType": "existing" - }, "value": { "targetName": "\"Value\"", "mappingType": "existing" @@ -4700,51 +5262,9 @@ "note": { "targetName": "\"Note\"", "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [ParcelId]\r\n ,[Date]\r\n ,[Key]\r\n ,\r\n\t CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Firm]\r\n ,[Value]\r\n ,[Note]\r\n FROM [pims].[dbo].[ParcelEvaluations]": { - "targetName": "parcel_evaluation", - "mappingType": "existing", - "attributes": { - "parcelid": { - "targetName": "\"ParcelId\"", - "mappingType": "existing" - }, - "Date": { - "targetName": "\"Date\"", - "mappingType": "existing" - }, - "Key": { - "targetName": "\"EvaluationKeyId\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "firm": { - "targetName": "\"Firm\"", - "mappingType": "existing" - }, - "value": { - "targetName": "\"Value\"", - "mappingType": "existing" }, - "note": { - "targetName": "\"Note\"", + "effectivedate": { + "targetName": "\"EffectiveDate\"", "mappingType": "existing" } } @@ -4756,13 +5276,13 @@ } } }, - "a8547f52-50ee-44cc-8c87-d39f2b229591": { + "b0670349-36fe-48f2-83f1-a8712f4da3cc": { "task": "dataExport", - "label": "BuildingEvaluationsExport", + "label": "BuildingFiscalsExport", "description": "", "taskFolder": "Testing", - "createTime": "202402151103", - "updateTime": "202402151103", + "createTime": "202402151417", + "updateTime": "202402151417", "state": { "producers": [ { @@ -4771,7 +5291,7 @@ "type": "query", "project": "General", "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", - "query": "SELECT [BuildingId]\r\n ,[Date]\r\n ,[Key]\r\n ,\r\n\t CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Value]\r\n ,[Note]\r\n FROM [pims].[dbo].[BuildingEvaluations]\r\nWHERE BuildingId IN (\r\n\tSELECT b.Id \r\n\tFROM Buildings b\r\n\tWHERE b.BuildingPredominateUseId \u003c\u003d 54\r\n)" + "query": "\r\n SELECT BuildingId,\r\n FiscalYear,\r\n [Key],\r\n CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById],\r\n CreatedOn,\r\n UpdatedById,\r\n UpdatedOn,\r\n [Value],\r\n Note,\r\n EffectiveDate\r\n FROM BuildingFiscals \r\n \r\nWHERE BuildingId IN (\r\n\tSELECT b.Id \r\n\tFROM Buildings b\r\n\tWHERE b.BuildingPredominateUseId \u003c\u003d 54\r\n)" } } ], @@ -4803,25 +5323,25 @@ "disableUsingBatches": true, "ignoreDuplicateRows": false, "transferAutoGeneratedColumns": true, - "disableReferentialIntegrity": false, + "disableReferentialIntegrity": true, "useBulkLoad": false, "truncateBeforeLoad": false, "openTableOnFinish": true, "mappings": { - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [BuildingId]\r\n ,[Date]\r\n ,[Key]\r\n ,\r\n\t CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Value]\r\n ,[Note]\r\n FROM [pims].[dbo].[BuildingEvaluations]\r\nWHERE BuildingId IN (\r\n\tSELECT b.Id \r\n\tFROM Buildings b\r\n\tWHERE b.BuildingPredominateUseId \u003c\u003d 54\r\n)": { - "targetName": "building_evaluation", + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\n SELECT BuildingId,\r\n FiscalYear,\r\n [Key],\r\n CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById],\r\n CreatedOn,\r\n UpdatedById,\r\n UpdatedOn,\r\n [Value],\r\n Note,\r\n EffectiveDate\r\n FROM BuildingFiscals \r\n \r\nWHERE BuildingId IN (\r\n\tSELECT b.Id \r\n\tFROM Buildings b\r\n\tWHERE b.BuildingPredominateUseId \u003c\u003d 54\r\n)": { + "targetName": "building_fiscal", "mappingType": "existing", "attributes": { "buildingid": { "targetName": "\"BuildingId\"", "mappingType": "existing" }, - "Date": { - "targetName": "\"Date\"", + "fiscalyear": { + "targetName": "\"FiscalYear\"", "mappingType": "existing" }, "Key": { - "targetName": "\"EvaluationKeyId\"", + "targetName": "\"FiscalKeyId\"", "mappingType": "existing" }, "createdbyid": { @@ -4847,6 +5367,10 @@ "note": { "targetName": "\"Note\"", "mappingType": "existing" + }, + "effectivedate": { + "targetName": "\"EffectiveDate\"", + "mappingType": "existing" } } } @@ -4857,21 +5381,22 @@ } } }, - "baa4a814-9d6e-4cdd-8061-f7941345a5b7": { + "d054c29f-10f6-441b-a0ad-7d69d9bdea31": { "task": "dataExport", - "label": "ParcelFiscalsExport", + "label": "ProjectsExport", "description": "", "taskFolder": "Testing", - "createTime": "202402151145", - "updateTime": "202402151145", + "createTime": "202402151428", + "updateTime": "202402151428", "state": { "producers": [ { "type": "databaseTransferProducer", "location": { - "type": "entity", + "type": "query", "project": "General", - "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ParcelFiscals" + "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", + "query": "\r\nSELECT [ProjectId]\r\n ,[TaskId]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[IsCompleted]\r\n ,[CompletedOn]\r\n FROM [dbo].[ProjectTasks]" } } ], @@ -4903,25 +5428,17 @@ "disableUsingBatches": true, "ignoreDuplicateRows": false, "transferAutoGeneratedColumns": true, - "disableReferentialIntegrity": false, + "disableReferentialIntegrity": true, "useBulkLoad": false, "truncateBeforeLoad": false, "openTableOnFinish": true, "mappings": { - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ParcelFiscals": { - "targetName": "parcel_fiscal", + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Projects": { + "targetName": "project", "mappingType": "existing", "attributes": { - "parcelid": { - "targetName": "\"ParcelId\"", - "mappingType": "existing" - }, - "fiscalyear": { - "targetName": "\"FiscalYear\"", - "mappingType": "existing" - }, - "Key": { - "targetName": "\"FiscalKeyId\"", + "id": { + "targetName": "\"Id\"", "mappingType": "existing" }, "createdbyid": { @@ -4944,16 +5461,126 @@ "targetName": "\"RowVersion\"", "mappingType": "skip" }, - "value": { - "targetName": "\"Value\"", + "projectnumber": { + "targetName": "\"ProjectNumber\"", "mappingType": "existing" }, - "note": { - "targetName": "\"Note\"", + "Name": { + "targetName": "\"Name\"", "mappingType": "existing" }, - "effectivedate": { - "targetName": "\"EffectiveDate\"", + "workflowid": { + "targetName": "\"WorkflowId\"", + "mappingType": "existing" + }, + "manager": { + "targetName": "\"Manager\"", + "mappingType": "existing" + }, + "reportedfiscalyear": { + "targetName": "\"ReportedFiscalYear\"", + "mappingType": "existing" + }, + "actualfiscalyear": { + "targetName": "\"ActualFiscalYear\"", + "mappingType": "existing" + }, + "agencyid": { + "targetName": "\"AgencyId\"", + "mappingType": "existing" + }, + "statusid": { + "targetName": "\"StatusId\"", + "mappingType": "existing" + }, + "description": { + "targetName": "\"Description\"", + "mappingType": "existing" + }, + "tierlevelid": { + "targetName": "\"TierLevelId\"", + "mappingType": "existing" + }, + "riskid": { + "targetName": "\"RiskId\"", + "mappingType": "existing" + }, + "metadata": { + "targetName": "\"Metadata\"", + "mappingType": "existing" + }, + "submittedon": { + "targetName": "\"SubmittedOn\"", + "mappingType": "existing" + }, + "approvedon": { + "targetName": "\"ApprovedOn\"", + "mappingType": "existing" + }, + "deniedon": { + "targetName": "\"DeniedOn\"", + "mappingType": "existing" + }, + "cancelledon": { + "targetName": "\"CancelledOn\"", + "mappingType": "existing" + }, + "completedon": { + "targetName": "\"CompletedOn\"", + "mappingType": "existing" + }, + "netbook": { + "targetName": "\"NetBook\"", + "mappingType": "existing" + }, + "market": { + "targetName": "\"Market\"", + "mappingType": "existing" + }, + "assessed": { + "targetName": "\"Assessed\"", + "mappingType": "existing" + }, + "appraised": { + "targetName": "\"Appraised\"", + "mappingType": "existing" + }, + "projecttype": { + "targetName": "\"ProjectType\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT [ProjectId]\r\n ,[TaskId]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[IsCompleted]\r\n ,[CompletedOn]\r\n FROM [dbo].[ProjectTasks]": { + "targetName": "project_task", + "mappingType": "existing", + "attributes": { + "projectid": { + "targetName": "\"ProjectId\"", + "mappingType": "existing" + }, + "taskid": { + "targetName": "\"TaskId\"", + "mappingType": "existing" + }, + "CreatedById\r\n ,[CreatedOn": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "iscompleted": { + "targetName": "\"IsCompleted\"", + "mappingType": "existing" + }, + "completedon": { + "targetName": "\"CompletedOn\"", "mappingType": "existing" } } From 3e21ef567eb4e2adec255c3446f1a337f894d75d Mon Sep 17 00:00:00 2001 From: Lawrence Lau Date: Fri, 16 Feb 2024 10:20:16 -0800 Subject: [PATCH 05/11] adding migration for nullable columns adding ETL for project tables --- .../src/typeorm/Entities/ProjectProperty.ts | 4 +-- .../src/typeorm/Entities/ProjectReport.ts | 2 +- .../1708104421858-NullableFields.ts | 36 +++++++++++++++++++ 3 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 express-api/src/typeorm/Migrations/1708104421858-NullableFields.ts diff --git a/express-api/src/typeorm/Entities/ProjectProperty.ts b/express-api/src/typeorm/Entities/ProjectProperty.ts index c24e5d69c2..a8145db86c 100644 --- a/express-api/src/typeorm/Entities/ProjectProperty.ts +++ b/express-api/src/typeorm/Entities/ProjectProperty.ts @@ -28,7 +28,7 @@ export class ProjectProperty extends BaseEntity { PropertyType: PropertyType; // Parcel Relation - @Column({ name: 'ParcelId', type: 'int' }) + @Column({ name: 'ParcelId', type: 'int', nullable: true }) ParcelId: number; @ManyToOne(() => Parcel, (Parcel) => Parcel.Id) @@ -36,7 +36,7 @@ export class ProjectProperty extends BaseEntity { Parcel: Parcel; // Building Relation - @Column({ name: 'BuildingId', type: 'int' }) + @Column({ name: 'BuildingId', type: 'int', nullable: true }) BuildingId: number; @ManyToOne(() => Building, (Building) => Building.Id) diff --git a/express-api/src/typeorm/Entities/ProjectReport.ts b/express-api/src/typeorm/Entities/ProjectReport.ts index f7f6c7687f..8f6e497996 100644 --- a/express-api/src/typeorm/Entities/ProjectReport.ts +++ b/express-api/src/typeorm/Entities/ProjectReport.ts @@ -14,7 +14,7 @@ export class ProjectReport extends BaseEntity { @Column({ type: 'character varying', length: 250, nullable: true }) Name: string; - @Column('timestamp') + @Column({ type: 'timestamp', nullable: true }) From: Date; @Column('timestamp') diff --git a/express-api/src/typeorm/Migrations/1708104421858-NullableFields.ts b/express-api/src/typeorm/Migrations/1708104421858-NullableFields.ts new file mode 100644 index 0000000000..54bce1c62d --- /dev/null +++ b/express-api/src/typeorm/Migrations/1708104421858-NullableFields.ts @@ -0,0 +1,36 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; + +export class NullableFields1708104421858 implements MigrationInterface { + name = 'NullableFields1708104421858' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE "parcel" DROP COLUMN "ParentID"`); + await queryRunner.query(`ALTER TABLE "project_property" DROP CONSTRAINT "FK_a580df432f0e0c521225fc3327b"`); + await queryRunner.query(`ALTER TABLE "project_property" DROP CONSTRAINT "FK_de366a792fc0aef4f8718e42d9c"`); + await queryRunner.query(`DROP INDEX "public"."IDX_a8615c36638af5cbe405f58fca"`); + await queryRunner.query(`ALTER TABLE "project_property" ALTER COLUMN "ParcelId" DROP NOT NULL`); + await queryRunner.query(`ALTER TABLE "project_property" ALTER COLUMN "BuildingId" DROP NOT NULL`); + await queryRunner.query(`DROP INDEX "public"."IDX_c32ecc1c2fd813140954bdfcc0"`); + await queryRunner.query(`ALTER TABLE "project_report" ALTER COLUMN "From" DROP NOT NULL`); + await queryRunner.query(`CREATE INDEX "IDX_a8615c36638af5cbe405f58fca" ON "project_property" ("ProjectId", "PropertyTypeId", "ParcelId", "BuildingId") `); + await queryRunner.query(`CREATE INDEX "IDX_c32ecc1c2fd813140954bdfcc0" ON "project_report" ("Id", "To", "From", "IsFinal") `); + await queryRunner.query(`ALTER TABLE "project_property" ADD CONSTRAINT "FK_a580df432f0e0c521225fc3327b" FOREIGN KEY ("ParcelId") REFERENCES "parcel"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`); + await queryRunner.query(`ALTER TABLE "project_property" ADD CONSTRAINT "FK_de366a792fc0aef4f8718e42d9c" FOREIGN KEY ("BuildingId") REFERENCES "building"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE "project_property" DROP CONSTRAINT "FK_de366a792fc0aef4f8718e42d9c"`); + await queryRunner.query(`ALTER TABLE "project_property" DROP CONSTRAINT "FK_a580df432f0e0c521225fc3327b"`); + await queryRunner.query(`DROP INDEX "public"."IDX_c32ecc1c2fd813140954bdfcc0"`); + await queryRunner.query(`DROP INDEX "public"."IDX_a8615c36638af5cbe405f58fca"`); + await queryRunner.query(`ALTER TABLE "project_report" ALTER COLUMN "From" SET NOT NULL`); + await queryRunner.query(`CREATE INDEX "IDX_c32ecc1c2fd813140954bdfcc0" ON "project_report" ("Id", "IsFinal", "From", "To") `); + await queryRunner.query(`ALTER TABLE "project_property" ALTER COLUMN "BuildingId" SET NOT NULL`); + await queryRunner.query(`ALTER TABLE "project_property" ALTER COLUMN "ParcelId" SET NOT NULL`); + await queryRunner.query(`CREATE INDEX "IDX_a8615c36638af5cbe405f58fca" ON "project_property" ("ProjectId", "PropertyTypeId", "ParcelId", "BuildingId") `); + await queryRunner.query(`ALTER TABLE "project_property" ADD CONSTRAINT "FK_de366a792fc0aef4f8718e42d9c" FOREIGN KEY ("BuildingId") REFERENCES "building"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`); + await queryRunner.query(`ALTER TABLE "project_property" ADD CONSTRAINT "FK_a580df432f0e0c521225fc3327b" FOREIGN KEY ("ParcelId") REFERENCES "parcel"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`); + await queryRunner.query(`ALTER TABLE "parcel" ADD "ParentID" integer`); + } + +} From 9f4907d1893ddb76105b59b9f20adc77e92b3d82 Mon Sep 17 00:00:00 2001 From: Lawrence Lau Date: Fri, 16 Feb 2024 10:21:51 -0800 Subject: [PATCH 06/11] adding ETL for project_properties --- tools/dbeaver/tasks.json | 1196 +++++++++++++++----------------------- 1 file changed, 479 insertions(+), 717 deletions(-) diff --git a/tools/dbeaver/tasks.json b/tools/dbeaver/tasks.json index 162a7c3ebf..f0ebe54c15 100644 --- a/tools/dbeaver/tasks.json +++ b/tools/dbeaver/tasks.json @@ -2209,119 +2209,6 @@ } } }, - "72b2e3cf-c2c3-4b56-b94d-42f5f012dde0": { - "task": "dataExport", - "label": "New Admin Areas", - "description": "", - "taskFolder": "Testing", - "createTime": "202401171130", - "updateTime": "202401171130", - "state": { - "producers": [ - { - "type": "databaseTransferProducer", - "location": { - "type": "query", - "project": "General", - "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", - "query": " SELECT a.Id, CAST(\u00272023-01-17 17:58:40.246\u0027 AS datetime)\r\n as CreatedOn, null as UpdatedOn, ar.Name, 0 as IsDisabled, 0 as SortOrder, null as Abbreviation, null as BoundaryType, \u002700000000-0000-0000-0000-000000000000\u0027 as CreatedById, null as UpdatedById, ar.Regional_District, b.Id AS RD_Id\r\n FROM [pims].[dbo].[AdminAreasCurrentlyInPIMS_RDsImported] ar\r\n INNER JOIN AdministrativeAreas a\r\n ON ar.Id \u003d a.Id\r\n LEFT OUTER JOIN AdministrativeAreas b\r\n ON b.Name \u003d ar.Regional_District\r\nORDER By a.Name" - } - } - ], - "consumers": [ - { - "type": "databaseTransferConsumer" - } - ], - "configuration": { - "maxJobCount": 1, - "showFinalMessage": true, - "DatabaseTransferProducer": { - "extractType": "SEGMENTS", - "segmentSize": 1000, - "fetchSize": 10000, - "openNewConnections": false, - "queryRowCount": false, - "selectedColumnsOnly": false, - "selectedRowsOnly": false - }, - "DatabaseTransferConsumer": { - "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", - "openNewConnections": true, - "useTransactions": true, - "commitAfterRows": 1000, - "useMultiRowInsert": false, - "multiRowInsertBatch": 500, - "skipBindValues": false, - "disableUsingBatches": true, - "ignoreDuplicateRows": false, - "transferAutoGeneratedColumns": true, - "disableReferentialIntegrity": true, - "useBulkLoad": false, - "truncateBeforeLoad": false, - "openTableOnFinish": true, - "mappings": { - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/ SELECT a.Id, CAST(\u00272023-01-17 17:58:40.246\u0027 AS datetime)\r\n as CreatedOn, null as UpdatedOn, ar.Name, 0 as IsDisabled, 0 as SortOrder, null as Abbreviation, null as BoundaryType, \u002700000000-0000-0000-0000-000000000000\u0027 as CreatedById, null as UpdatedById, ar.Regional_District, b.Id AS RD_Id\r\n FROM [pims].[dbo].[AdminAreasCurrentlyInPIMS_RDsImported] ar\r\n INNER JOIN AdministrativeAreas a\r\n ON ar.Id \u003d a.Id\r\n LEFT OUTER JOIN AdministrativeAreas b\r\n ON b.Name \u003d ar.Regional_District\r\nORDER By a.Name": { - "targetName": "administrative_areas", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "id", - "mappingType": "existing" - }, - "createdon": { - "targetName": "createdon", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "updatedon", - "mappingType": "existing" - }, - "name": { - "targetName": "name", - "mappingType": "existing" - }, - "isdisabled": { - "targetName": "isdisabled", - "mappingType": "existing" - }, - "sortorder": { - "targetName": "sortorder", - "mappingType": "existing" - }, - "abbreviation": { - "targetName": "abbreviation", - "mappingType": "existing" - }, - "boundarytype": { - "targetName": "boundarytype", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "createdbyid", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "updatedbyid", - "mappingType": "existing" - }, - "regional_district": { - "targetName": "regional_district", - "mappingType": "skip" - }, - "rd_id": { - "targetName": "\"RegionalDistrictId\"", - "mappingType": "existing" - } - } - } - } - }, - "producer": "database_producer", - "consumer": "database_consumer" - } - } - }, "49fa42d1-ee3a-4f6c-a1ad-a6ff2f2b0ccf": { "task": "dataExport", "label": "Parcels Export", @@ -3696,139 +3583,6 @@ } } }, - "49a69144-4ee1-4a7e-b735-93a656251763": { - "task": "dataExport", - "label": "AgenciesExport", - "description": "", - "taskFolder": "Testing", - "createTime": "202402131001", - "updateTime": "202402131001", - "state": { - "producers": [ - { - "type": "databaseTransferProducer", - "location": { - "type": "entity", - "project": "General", - "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Agencies" - } - } - ], - "consumers": [ - { - "type": "databaseTransferConsumer" - } - ], - "configuration": { - "maxJobCount": 1, - "showFinalMessage": true, - "DatabaseTransferProducer": { - "extractType": "SEGMENTS", - "segmentSize": 100, - "fetchSize": 10000, - "openNewConnections": false, - "queryRowCount": false, - "selectedColumnsOnly": false, - "selectedRowsOnly": false - }, - "DatabaseTransferConsumer": { - "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", - "openNewConnections": true, - "useTransactions": true, - "commitAfterRows": 1000, - "useMultiRowInsert": false, - "multiRowInsertBatch": 500, - "skipBindValues": false, - "disableUsingBatches": true, - "ignoreDuplicateRows": false, - "transferAutoGeneratedColumns": true, - "disableReferentialIntegrity": false, - "useBulkLoad": false, - "truncateBeforeLoad": false, - "openTableOnFinish": true, - "mappings": { - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Agencies": { - "targetName": "agency", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "\"Id\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing", - "transformer": "constant", - "transformerProperties": { - "constant": "00000000-0000-0000-0000-000000000000" - }, - "transformerPropertiesNames": "constant" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - }, - "Name": { - "targetName": "\"Name\"", - "mappingType": "existing" - }, - "isdisabled": { - "targetName": "\"IsDisabled\"", - "mappingType": "existing" - }, - "sortorder": { - "targetName": "\"SortOrder\"", - "mappingType": "existing" - }, - "code": { - "targetName": "\"Code\"", - "mappingType": "existing" - }, - "description": { - "targetName": "\"Description\"", - "mappingType": "existing" - }, - "parentid": { - "targetName": "\"ParentId\"", - "mappingType": "existing" - }, - "email": { - "targetName": "\"Email\"", - "mappingType": "existing" - }, - "sendemail": { - "targetName": "\"SendEmail\"", - "mappingType": "existing" - }, - "addressto": { - "targetName": "\"AddressTo\"", - "mappingType": "existing" - }, - "ccemail": { - "targetName": "\"CCEmail\"", - "mappingType": "existing" - } - } - } - } - }, - "producer": "database_producer", - "consumer": "database_consumer" - } - } - }, "5ecb8524-d561-4531-9c6e-82e38afb697e": { "task": "dataExport", "label": "PIMS ETL", @@ -3884,7 +3638,7 @@ "project": "General", "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", "defaultCatalog": "pims", - "query": "SELECT [ParcelId]\r\n ,[Date]\r\n ,[Key]\r\n ,\r\n\t CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Firm]\r\n ,[Value]\r\n ,[Note]\r\n FROM [pims].[dbo].[ParcelEvaluations]" + "query": "\r\nSELECT pb.*\r\n FROM [pims].[dbo].ParcelBuildings pb\r\n INNER JOIN Buildings b\r\n ON b.Id \u003d pb.BuildingId\r\n WHERE b.BuildingPredominateUseId \u003c\u003d 54" } }, { @@ -3894,7 +3648,7 @@ "project": "General", "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", "defaultCatalog": "pims", - "query": "SELECT [BuildingId]\r\n ,[Date]\r\n ,[Key]\r\n ,\r\n\t CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Value]\r\n ,[Note]\r\n FROM [pims].[dbo].[BuildingEvaluations]\r\nWHERE BuildingId IN (\r\n\tSELECT b.Id \r\n\tFROM Buildings b\r\n\tWHERE b.BuildingPredominateUseId \u003c\u003d 54\r\n)" + "query": "SELECT [ParcelId]\r\n ,[Date]\r\n ,[Key]\r\n ,\r\n\t CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Firm]\r\n ,[Value]\r\n ,[Note]\r\n FROM [pims].[dbo].[ParcelEvaluations]" } }, { @@ -3904,7 +3658,7 @@ "project": "General", "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", "defaultCatalog": "pims", - "query": "\r\nSELECT pb.*\r\n FROM [pims].[dbo].ParcelBuildings pb\r\n INNER JOIN Buildings b\r\n ON b.Id \u003d pb.BuildingId\r\n WHERE b.BuildingPredominateUseId \u003c\u003d 54" + "query": "SELECT [ParcelId]\r\n ,[FiscalYear]\r\n ,[Key]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Value]\r\n ,[Note]\r\n ,[EffectiveDate]\r\n FROM [dbo].[ParcelFiscals]" } }, { @@ -3914,7 +3668,7 @@ "project": "General", "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", "defaultCatalog": "pims", - "query": "SELECT [ParcelId]\r\n ,[FiscalYear]\r\n ,[Key]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Value]\r\n ,[Note]\r\n ,[EffectiveDate]\r\n FROM [dbo].[ParcelFiscals]" + "query": "\r\n SELECT BuildingId,\r\n FiscalYear,\r\n [Key],\r\n CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById],\r\n CreatedOn,\r\n UpdatedById,\r\n UpdatedOn,\r\n [Value],\r\n Note,\r\n EffectiveDate\r\n FROM BuildingFiscals \r\n \r\nWHERE BuildingId IN (\r\n\tSELECT b.Id \r\n\tFROM Buildings b\r\n\tWHERE b.BuildingPredominateUseId \u003c\u003d 54\r\n)" } }, { @@ -3924,7 +3678,7 @@ "project": "General", "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", "defaultCatalog": "pims", - "query": "\r\n SELECT BuildingId,\r\n FiscalYear,\r\n [Key],\r\n CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById],\r\n CreatedOn,\r\n UpdatedById,\r\n UpdatedOn,\r\n [Value],\r\n Note,\r\n EffectiveDate\r\n FROM BuildingFiscals \r\n \r\nWHERE BuildingId IN (\r\n\tSELECT b.Id \r\n\tFROM Buildings b\r\n\tWHERE b.BuildingPredominateUseId \u003c\u003d 54\r\n)" + "query": "SELECT [BuildingId]\r\n ,[Date]\r\n ,[Key]\r\n ,\r\n\t CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Value]\r\n ,[Note]\r\n FROM [pims].[dbo].[BuildingEvaluations]\r\nWHERE BuildingId IN (\r\n\tSELECT b.Id \r\n\tFROM Buildings b\r\n\tWHERE b.BuildingPredominateUseId \u003c\u003d 54\r\n)" } }, { @@ -3938,11 +3692,9 @@ { "type": "databaseTransferProducer", "location": { - "type": "query", + "type": "entity", "project": "General", - "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", - "defaultCatalog": "pims", - "query": "\r\nSELECT [ProjectId]\r\n ,[TaskId]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[IsCompleted]\r\n ,[CompletedOn]\r\n FROM [dbo].[ProjectTasks]" + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectSnapshots" } }, { @@ -3956,12 +3708,32 @@ { "type": "databaseTransferProducer", "location": { - "type": "entity", + "type": "query", "project": "General", - "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectSnapshots" + "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", + "defaultCatalog": "pims", + "query": "\r\nSELECT [ProjectId]\r\n ,[TaskId]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[IsCompleted]\r\n ,[CompletedOn]\r\n FROM [dbo].[ProjectTasks]" } - } - ], + }, + { + "type": "databaseTransferProducer", + "location": { + "type": "query", + "project": "General", + "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", + "defaultCatalog": "pims", + "query": "SELECT [Id]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[IsFinal]\r\n ,[Name]\r\n ,[From]\r\n ,[To]\r\n ,[ReportType]\r\n FROM [dbo].[ProjectReports]" + } + }, + { + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectProperties" + } + } + ], "consumers": [ { "type": "databaseTransferConsumer" @@ -3999,6 +3771,12 @@ { "type": "databaseTransferConsumer" }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, { "type": "databaseTransferConsumer" } @@ -4031,114 +3809,301 @@ "truncateBeforeLoad": false, "openTableOnFinish": true, "mappings": { - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT \r\n u.[Id],\r\n \r\n\t CASE \r\n\t\tWHEN u.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE u.[CreatedById]\r\n\t END AS [CreatedById],\r\n \r\n\t CASE \r\n\t\tWHEN u.IsDisabled \u003d 0 THEN \u0027Active\u0027\r\n\t\tELSE \u0027Disabled\u0027\r\n\t END AS [Status],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n urd.CreatedOn,\r\n urd.UserId,\r\n ua.AgencyId, \r\n STRING_AGG(urd.RoleName, \u0027, \u0027) AS Roles,\r\n CASE \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%System Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial Reporter%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial%\u0027 THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Agency Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Analyst%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Manager%\u0027 THEN \u002700000000-0000-0000-0000-000000000001\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister Assistant%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Executive Director%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%View Only Properties%\u0027 THEN \u002700000000-0000-0000-0000-000000000002\u0027\r\n\t \r\n END AS UserType\r\nFROM Users u\r\nLEFT JOIN (\r\n SELECT \r\n ur.UserId,\r\n MAX(ur.CreatedOn) AS CreatedOn,\r\n STRING_AGG(r.Name, \u0027, \u0027) AS RoleName\r\n FROM [pims].[dbo].[UserRoles] ur\r\n INNER JOIN Roles r ON ur.RoleId \u003d r.Id\r\n GROUP BY ur.UserId\r\n) AS urd ON u.Id \u003d urd.UserId\r\n\r\nLEFT OUTER JOIN (\r\n SELECT UserId, MIN(AgencyId) AS AgencyId\r\n FROM UserAgencies\r\n GROUP BY UserId\r\n) ua_min ON u.Id \u003d ua_min.UserId\r\nLEFT OUTER JOIN UserAgencies ua ON u.Id \u003d ua.UserId AND ua.AgencyId \u003d ua_min.AgencyId\r\n\r\nWHERE u.Id \u003c\u003e \u002700000000-0000-0000-0000-000000000000\u0027\r\n\r\nGROUP BY u.[Id],\r\n u.[CreatedById],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n urd.CreatedOn, \r\n urd.UserId, \r\n ua.AgencyId\r\nORDER BY urd.CreatedOn ASC": { - "targetName": "user", + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Agencies": { + "targetName": "agency", "mappingType": "existing", "attributes": { "id": { - "targetName": "id", + "targetName": "\"Id\"", "mappingType": "existing" }, "createdbyid": { - "targetName": "createdbyid", - "mappingType": "existing" + "targetName": "\"CreatedById\"", + "mappingType": "existing", + "transformer": "constant", + "transformerProperties": { + "constant": "00000000-0000-0000-0000-000000000000" + }, + "transformerPropertiesNames": "constant" }, - "status": { - "targetName": "status", + "createdon": { + "targetName": "\"CreatedOn\"", "mappingType": "existing" }, "updatedbyid": { - "targetName": "updatedbyid", + "targetName": "\"UpdatedById\"", "mappingType": "existing" }, "updatedon": { - "targetName": "updatedon", + "targetName": "\"UpdatedOn\"", "mappingType": "existing" }, - "username": { - "targetName": "username", + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "Name": { + "targetName": "\"Name\"", "mappingType": "existing" }, - "displayname": { - "targetName": "displayname", + "isdisabled": { + "targetName": "\"IsDisabled\"", "mappingType": "existing" }, - "firstname": { - "targetName": "firstname", + "sortorder": { + "targetName": "\"SortOrder\"", "mappingType": "existing" }, - "middlename": { - "targetName": "middlename", + "code": { + "targetName": "\"Code\"", "mappingType": "existing" }, - "lastname": { - "targetName": "lastname", + "description": { + "targetName": "\"Description\"", + "mappingType": "existing" + }, + "parentid": { + "targetName": "\"ParentId\"", "mappingType": "existing" }, "email": { - "targetName": "email", + "targetName": "\"Email\"", "mappingType": "existing" }, - "Position": { - "targetName": "Position", + "sendemail": { + "targetName": "\"SendEmail\"", "mappingType": "existing" }, - "isdisabled": { - "targetName": "isdisabled", + "addressto": { + "targetName": "\"AddressTo\"", "mappingType": "existing" }, - "emailverified": { - "targetName": "emailverified", + "ccemail": { + "targetName": "\"CCEmail\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Projects": { + "targetName": "project", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", "mappingType": "existing" }, - "note": { - "targetName": "note", + "createdbyid": { + "targetName": "\"CreatedById\"", "mappingType": "existing" }, - "issystem": { - "targetName": "issystem", + "createdon": { + "targetName": "\"CreatedOn\"", "mappingType": "existing" }, - "lastlogin": { - "targetName": "lastlogin", + "updatedbyid": { + "targetName": "\"UpdatedById\"", "mappingType": "existing" }, - "approvedbyid": { - "targetName": "approvedbyid", + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "projectnumber": { + "targetName": "\"ProjectNumber\"", + "mappingType": "existing" + }, + "Name": { + "targetName": "\"Name\"", + "mappingType": "existing" + }, + "workflowid": { + "targetName": "\"WorkflowId\"", + "mappingType": "existing" + }, + "manager": { + "targetName": "\"Manager\"", + "mappingType": "existing" + }, + "reportedfiscalyear": { + "targetName": "\"ReportedFiscalYear\"", + "mappingType": "existing" + }, + "actualfiscalyear": { + "targetName": "\"ActualFiscalYear\"", + "mappingType": "existing" + }, + "agencyid": { + "targetName": "\"AgencyId\"", + "mappingType": "existing" + }, + "statusid": { + "targetName": "\"StatusId\"", + "mappingType": "existing" + }, + "description": { + "targetName": "\"Description\"", + "mappingType": "existing" + }, + "tierlevelid": { + "targetName": "\"TierLevelId\"", + "mappingType": "existing" + }, + "riskid": { + "targetName": "\"RiskId\"", + "mappingType": "existing" + }, + "metadata": { + "targetName": "\"Metadata\"", + "mappingType": "existing" + }, + "submittedon": { + "targetName": "\"SubmittedOn\"", "mappingType": "existing" }, "approvedon": { - "targetName": "approvedon", + "targetName": "\"ApprovedOn\"", "mappingType": "existing" }, - "keycloakuserid": { - "targetName": "keycloakuserid", + "deniedon": { + "targetName": "\"DeniedOn\"", + "mappingType": "existing" + }, + "cancelledon": { + "targetName": "\"CancelledOn\"", + "mappingType": "existing" + }, + "completedon": { + "targetName": "\"CompletedOn\"", + "mappingType": "existing" + }, + "netbook": { + "targetName": "\"NetBook\"", + "mappingType": "existing" + }, + "market": { + "targetName": "\"Market\"", + "mappingType": "existing" + }, + "assessed": { + "targetName": "\"Assessed\"", + "mappingType": "existing" + }, + "appraised": { + "targetName": "\"Appraised\"", + "mappingType": "existing" + }, + "projecttype": { + "targetName": "\"ProjectType\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectSnapshots": { + "targetName": "project_snapshot", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", "mappingType": "existing" }, "createdon": { - "targetName": "createdon", + "targetName": "\"CreatedOn\"", "mappingType": "existing" }, - "userid": { - "targetName": "userid", + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "targetName": "\"RowVersion\"", "mappingType": "skip" }, - "agencyid": { - "targetName": "agencyid", + "projectid": { + "targetName": "\"ProjectId\"", "mappingType": "existing" }, - "roles": { - "targetName": "roles", + "netbook": { + "targetName": "\"NetBook\"", + "mappingType": "existing" + }, + "market": { + "targetName": "\"Market\"", + "mappingType": "existing" + }, + "assessed": { + "targetName": "\"Assessed\"", + "mappingType": "existing" + }, + "appraised": { + "targetName": "\"Appraised\"", + "mappingType": "existing" + }, + "snapshoton": { + "targetName": "\"SnapshotOn\"", + "mappingType": "existing" + }, + "metadata": { + "targetName": "\"Metadata\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectStatusHistory": { + "targetName": "project_status_history", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "targetName": "\"RowVersion\"", "mappingType": "skip" }, - "usertype": { - "targetName": "\"RoleId\"", + "projectid": { + "targetName": "\"ProjectId\"", + "mappingType": "existing" + }, + "workflowid": { + "targetName": "\"WorkflowId\"", + "mappingType": "existing" + }, + "statusid": { + "targetName": "\"StatusId\"", "mappingType": "existing" } } }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Agencies": { - "targetName": "agency", + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectProperties": { + "targetName": "project_property", "mappingType": "existing", "attributes": { "id": { @@ -4147,12 +4112,7 @@ }, "createdbyid": { "targetName": "\"CreatedById\"", - "mappingType": "existing", - "transformer": "constant", - "transformerProperties": { - "constant": "00000000-0000-0000-0000-000000000000" - }, - "transformerPropertiesNames": "constant" + "mappingType": "existing" }, "createdon": { "targetName": "\"CreatedOn\"", @@ -4170,44 +4130,126 @@ "targetName": "\"RowVersion\"", "mappingType": "skip" }, - "Name": { - "targetName": "\"Name\"", + "projectid": { + "targetName": "\"ProjectId\"", + "mappingType": "existing" + }, + "propertytype": { + "targetName": "\"PropertyTypeId\"", + "mappingType": "existing" + }, + "parcelid": { + "targetName": "\"ParcelId\"", + "mappingType": "existing" + }, + "buildingid": { + "targetName": "\"BuildingId\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT \r\n u.[Id],\r\n \r\n\t CASE \r\n\t\tWHEN u.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE u.[CreatedById]\r\n\t END AS [CreatedById],\r\n \r\n\t CASE \r\n\t\tWHEN u.IsDisabled \u003d 0 THEN \u0027Active\u0027\r\n\t\tELSE \u0027Disabled\u0027\r\n\t END AS [Status],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n urd.CreatedOn,\r\n urd.UserId,\r\n ua.AgencyId, \r\n STRING_AGG(urd.RoleName, \u0027, \u0027) AS Roles,\r\n CASE \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%System Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial Reporter%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial%\u0027 THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Agency Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Analyst%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Manager%\u0027 THEN \u002700000000-0000-0000-0000-000000000001\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister Assistant%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Executive Director%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%View Only Properties%\u0027 THEN \u002700000000-0000-0000-0000-000000000002\u0027\r\n\t \r\n END AS UserType\r\nFROM Users u\r\nLEFT JOIN (\r\n SELECT \r\n ur.UserId,\r\n MAX(ur.CreatedOn) AS CreatedOn,\r\n STRING_AGG(r.Name, \u0027, \u0027) AS RoleName\r\n FROM [pims].[dbo].[UserRoles] ur\r\n INNER JOIN Roles r ON ur.RoleId \u003d r.Id\r\n GROUP BY ur.UserId\r\n) AS urd ON u.Id \u003d urd.UserId\r\n\r\nLEFT OUTER JOIN (\r\n SELECT UserId, MIN(AgencyId) AS AgencyId\r\n FROM UserAgencies\r\n GROUP BY UserId\r\n) ua_min ON u.Id \u003d ua_min.UserId\r\nLEFT OUTER JOIN UserAgencies ua ON u.Id \u003d ua.UserId AND ua.AgencyId \u003d ua_min.AgencyId\r\n\r\nWHERE u.Id \u003c\u003e \u002700000000-0000-0000-0000-000000000000\u0027\r\n\r\nGROUP BY u.[Id],\r\n u.[CreatedById],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n urd.CreatedOn, \r\n urd.UserId, \r\n ua.AgencyId\r\nORDER BY urd.CreatedOn ASC": { + "targetName": "user", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "id", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "createdbyid", + "mappingType": "existing" + }, + "status": { + "targetName": "status", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "updatedbyid", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "updatedon", + "mappingType": "existing" + }, + "username": { + "targetName": "username", + "mappingType": "existing" + }, + "displayname": { + "targetName": "displayname", + "mappingType": "existing" + }, + "firstname": { + "targetName": "firstname", + "mappingType": "existing" + }, + "middlename": { + "targetName": "middlename", + "mappingType": "existing" + }, + "lastname": { + "targetName": "lastname", + "mappingType": "existing" + }, + "email": { + "targetName": "email", + "mappingType": "existing" + }, + "Position": { + "targetName": "Position", "mappingType": "existing" }, "isdisabled": { - "targetName": "\"IsDisabled\"", + "targetName": "isdisabled", "mappingType": "existing" }, - "sortorder": { - "targetName": "\"SortOrder\"", + "emailverified": { + "targetName": "emailverified", + "mappingType": "existing" + }, + "note": { + "targetName": "note", + "mappingType": "existing" + }, + "issystem": { + "targetName": "issystem", + "mappingType": "existing" + }, + "lastlogin": { + "targetName": "lastlogin", "mappingType": "existing" }, - "code": { - "targetName": "\"Code\"", + "approvedbyid": { + "targetName": "approvedbyid", "mappingType": "existing" }, - "description": { - "targetName": "\"Description\"", + "approvedon": { + "targetName": "approvedon", "mappingType": "existing" }, - "parentid": { - "targetName": "\"ParentId\"", + "keycloakuserid": { + "targetName": "keycloakuserid", "mappingType": "existing" }, - "email": { - "targetName": "\"Email\"", + "createdon": { + "targetName": "createdon", "mappingType": "existing" }, - "sendemail": { - "targetName": "\"SendEmail\"", - "mappingType": "existing" + "userid": { + "targetName": "userid", + "mappingType": "skip" }, - "addressto": { - "targetName": "\"AddressTo\"", + "agencyid": { + "targetName": "agencyid", "mappingType": "existing" }, - "ccemail": { - "targetName": "\"CCEmail\"", + "roles": { + "targetName": "roles", + "mappingType": "skip" + }, + "usertype": { + "targetName": "\"RoleId\"", "mappingType": "existing" } } @@ -4309,7 +4351,7 @@ "mappingType": "existing" }, "parentid": { - "targetName": "\"ParentID\"", + "targetName": "\"ParentParcelId\"", "mappingType": "existing" }, "propertytypeid": { @@ -4318,6 +4360,52 @@ } } }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [ParcelId]\r\n ,[Date]\r\n ,[Key]\r\n ,\r\n\t CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Firm]\r\n ,[Value]\r\n ,[Note]\r\n FROM [pims].[dbo].[ParcelEvaluations]": { + "targetName": "parcel_evaluation", + "mappingType": "existing", + "attributes": { + "parcelid": { + "targetName": "\"ParcelId\"", + "mappingType": "existing" + }, + "Date": { + "targetName": "\"Date\"", + "mappingType": "existing" + }, + "Key": { + "targetName": "\"EvaluationKeyId\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "firm": { + "targetName": "\"Firm\"", + "mappingType": "existing" + }, + "value": { + "targetName": "\"Value\"", + "mappingType": "existing" + }, + "note": { + "targetName": "\"Note\"", + "mappingType": "existing" + } + } + }, "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT p.[Id],\r\n\tCASE \r\n\t WHEN p.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t ELSE p.[CreatedById]\r\n\tEND AS [CreatedById],\r\n p.[CreatedOn],\r\n p.[UpdatedById],\r\n p.[UpdatedOn],\r\n p.[Name],\r\n p.[Description],\r\n p.[ClassificationId],\r\n p.BuildingConstructionTypeId,\r\n p.[AgencyId],\r\n p.[IsSensitive],\r\n p.[IsVisibleToOtherAgencies],\r\n\tp.BuildingFloorCount,\r\n\tp.BuildingPredominateUseId,\r\n\tp.BuildingTenancy,\r\n\tp.RentableArea,\r\n\tp.BuildingOccupantTypeId,\r\n\tp.LeaseExpiry,\r\n\tp.OccupantName,\r\n\tp.TransferLeaseOnSale,\r\n\tp.BuildingTenancyUpdatedOn,\r\n\tp.EncumbranceReason,\r\n\tp.LeasedLandMetadata,\r\n\tp.TotalArea,\r\n\tCONVERT(VARCHAR(40), CAST(Location.Long AS DECIMAL(18, 14))) + \u0027, \u0027 + CONVERT(VARCHAR(40), CAST(Location.Lat AS DECIMAL(18, 14))) AS Location,\r\n\tCASE \r\n WHEN a.AdministrativeArea \u003d \u0027The Corporation of the City of Nelson\u0027 THEN 188\r\n WHEN a.AdministrativeArea \u003d \u0027Township of Langley\u0027 THEN 150\r\n WHEN a.AdministrativeArea \u003d \u0027District of North Vancouver\u0027 THEN 196\r\n WHEN a.AdministrativeArea \u003d \u0027Coombs\u0027 THEN 483\r\n WHEN a.AdministrativeArea \u003d \u0027Brookmere\u0027 THEN 481\r\n WHEN a.AdministrativeArea \u003d \u0027Thornhill\u0027 THEN 501\r\n WHEN a.AdministrativeArea \u003d \u0027Two Mile\u0027 THEN 502\r\n WHEN a.AdministrativeArea \u003d \u0027Crofton\u0027 THEN 484\r\n WHEN a.AdministrativeArea \u003d \u0027East Sooke\u0027 THEN 485\r\n WHEN a.AdministrativeArea \u003d \u0027Mudge Island\u0027 THEN 492\r\n WHEN a.AdministrativeArea \u003d \u0027Coal Harbour\u0027 THEN 482\r\n WHEN a.AdministrativeArea \u003d \u0027Miworth\u0027 THEN 490\r\n WHEN a.AdministrativeArea \u003d \u0027Lake Errock\u0027 THEN 489\r\n WHEN a.AdministrativeArea \u003d \u0027Black Creek\u0027 THEN 479\r\n WHEN a.AdministrativeArea \u003d \u0027Whaletown\u0027 THEN 504\r\n WHEN a.AdministrativeArea \u003d \u0027Quathiaski Cove\u0027 THEN 494\r\n WHEN a.AdministrativeArea \u003d \u0027Big Bay in Stuart Island\u0027 THEN 478\r\n WHEN a.AdministrativeArea \u003d \u0027Surge Narrows in Read Island\u0027 THEN 500\r\n WHEN a.AdministrativeArea \u003d \u0027Rock Bay in Sayward\u0027 THEN 497\r\n WHEN a.AdministrativeArea \u003d \u0027Granite Bay in Quadra Island\u0027 THEN 487\r\n WHEN a.AdministrativeArea \u003d \u0027Moberly Lake\u0027 THEN 491\r\n WHEN a.AdministrativeArea \u003d \u0027Quatsino\u0027 THEN 495\r\n WHEN a.AdministrativeArea \u003d \u0027Bouchie Lake\u0027 THEN 480\r\n WHEN a.AdministrativeArea \u003d \u0027West Lake\u0027 THEN 503\r\n WHEN a.AdministrativeArea \u003d \u0027Salmon Valley\u0027 THEN 498\t\t\r\n WHEN a.AdministrativeArea \u003d \u0027Red Rock\u0027 THEN 496\r\n WHEN a.AdministrativeArea \u003d \u0027Stoner\u0027 THEN 499\r\n WHEN a.AdministrativeArea \u003d \u0027Pineview FFG\u0027 THEN 493\r\n WHEN a.AdministrativeArea \u003d \u0027Wonowon\u0027 THEN 506\r\n WHEN a.AdministrativeArea \u003d \u0027Halfway River\u0027 THEN 488\r\n WHEN a.AdministrativeArea \u003d \u0027Giscome\u0027 THEN 486\r\n WHEN a.AdministrativeArea \u003d \u0027Willow River\u0027 THEN 505\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lower Nicola\u0027 THEN 314\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Belcarra\u0027 THEN 425\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Tsawwassen\u0027 THEN 315\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Anmore\u0027 THEN 432\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lake Cowichan\u0027 THEN 442\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027North Cowichan\u0027 THEN 450\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Port Edward\u0027 THEN 347\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Spallumcheen\u0027 THEN 318\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Jumbo Glacier Mountain Resort Municipality\u0027 THEN 438\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Kent\u0027 THEN 439\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Highlands\u0027 THEN 348\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Slocan\u0027 THEN 380\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Warfield\u0027 THEN 448\r\n ELSE aa.Id \r\n END AS AdministrativeAreaId, \r\n\ta.Address1, \r\n\ta.Postal,\r\n\t1 as PropertyTypeID\r\nFROM \r\n [pims].[dbo].Buildings p\r\n\tINNER JOIN Addresses a\r\n\tON p.AddressId \u003d a.Id\r\n\tLEFT OUTER JOIN AdministrativeAreas aa\r\n\tON aa.Name \u003d a.AdministrativeArea\r\nWHERE p.BuildingPredominateUseId \u003c\u003d 54": { "targetName": "building", "mappingType": "existing", @@ -4440,52 +4528,6 @@ } } }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [ParcelId]\r\n ,[Date]\r\n ,[Key]\r\n ,\r\n\t CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Firm]\r\n ,[Value]\r\n ,[Note]\r\n FROM [pims].[dbo].[ParcelEvaluations]": { - "targetName": "parcel_evaluation", - "mappingType": "existing", - "attributes": { - "parcelid": { - "targetName": "\"ParcelId\"", - "mappingType": "existing" - }, - "Date": { - "targetName": "\"Date\"", - "mappingType": "existing" - }, - "Key": { - "targetName": "\"EvaluationKeyId\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "firm": { - "targetName": "\"Firm\"", - "mappingType": "existing" - }, - "value": { - "targetName": "\"Value\"", - "mappingType": "existing" - }, - "note": { - "targetName": "\"Note\"", - "mappingType": "existing" - } - } - }, "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [BuildingId]\r\n ,[Date]\r\n ,[Key]\r\n ,\r\n\t CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Value]\r\n ,[Note]\r\n FROM [pims].[dbo].[BuildingEvaluations]\r\nWHERE BuildingId IN (\r\n\tSELECT b.Id \r\n\tFROM Buildings b\r\n\tWHERE b.BuildingPredominateUseId \u003c\u003d 54\r\n)": { "targetName": "building_evaluation", "mappingType": "existing", @@ -4571,203 +4613,85 @@ "mappingType": "existing" }, "fiscalyear": { - "targetName": "fiscalyear", - "mappingType": "existing" - }, - "Key": { - "targetName": "\"FiscalKeyId\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "createdbyid", - "mappingType": "existing" - }, - "createdon": { - "targetName": "createdon", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "updatedbyid", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "updatedon", - "mappingType": "existing" - }, - "value": { - "targetName": "value", - "mappingType": "existing" - }, - "note": { - "targetName": "note", - "mappingType": "existing" - }, - "effectivedate": { - "targetName": "effectivedate", - "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\n SELECT BuildingId,\r\n FiscalYear,\r\n [Key],\r\n CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById],\r\n CreatedOn,\r\n UpdatedById,\r\n UpdatedOn,\r\n [Value],\r\n Note,\r\n EffectiveDate\r\n FROM BuildingFiscals \r\n \r\nWHERE BuildingId IN (\r\n\tSELECT b.Id \r\n\tFROM Buildings b\r\n\tWHERE b.BuildingPredominateUseId \u003c\u003d 54\r\n)": { - "targetName": "building_fiscal", - "mappingType": "existing", - "attributes": { - "buildingid": { - "targetName": "\"BuildingId\"", - "mappingType": "existing" - }, - "fiscalyear": { - "targetName": "\"FiscalYear\"", - "mappingType": "existing" - }, - "Key": { - "targetName": "\"FiscalKeyId\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "value": { - "targetName": "\"Value\"", - "mappingType": "existing" - }, - "note": { - "targetName": "\"Note\"", - "mappingType": "existing" - }, - "effectivedate": { - "targetName": "\"EffectiveDate\"", - "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Projects": { - "targetName": "project", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "\"Id\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - }, - "projectnumber": { - "targetName": "\"ProjectNumber\"", - "mappingType": "existing" - }, - "Name": { - "targetName": "\"Name\"", - "mappingType": "existing" - }, - "workflowid": { - "targetName": "\"WorkflowId\"", - "mappingType": "existing" - }, - "manager": { - "targetName": "\"Manager\"", - "mappingType": "existing" - }, - "reportedfiscalyear": { - "targetName": "\"ReportedFiscalYear\"", + "targetName": "fiscalyear", "mappingType": "existing" }, - "actualfiscalyear": { - "targetName": "\"ActualFiscalYear\"", + "Key": { + "targetName": "\"FiscalKeyId\"", "mappingType": "existing" }, - "agencyid": { - "targetName": "\"AgencyId\"", + "createdbyid": { + "targetName": "createdbyid", "mappingType": "existing" }, - "statusid": { - "targetName": "\"StatusId\"", + "createdon": { + "targetName": "createdon", "mappingType": "existing" }, - "description": { - "targetName": "\"Description\"", + "updatedbyid": { + "targetName": "updatedbyid", "mappingType": "existing" }, - "tierlevelid": { - "targetName": "\"TierLevelId\"", + "updatedon": { + "targetName": "updatedon", "mappingType": "existing" }, - "riskid": { - "targetName": "\"RiskId\"", + "value": { + "targetName": "value", "mappingType": "existing" }, - "metadata": { - "targetName": "\"Metadata\"", + "note": { + "targetName": "note", "mappingType": "existing" }, - "submittedon": { - "targetName": "\"SubmittedOn\"", + "effectivedate": { + "targetName": "effectivedate", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\n SELECT BuildingId,\r\n FiscalYear,\r\n [Key],\r\n CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById],\r\n CreatedOn,\r\n UpdatedById,\r\n UpdatedOn,\r\n [Value],\r\n Note,\r\n EffectiveDate\r\n FROM BuildingFiscals \r\n \r\nWHERE BuildingId IN (\r\n\tSELECT b.Id \r\n\tFROM Buildings b\r\n\tWHERE b.BuildingPredominateUseId \u003c\u003d 54\r\n)": { + "targetName": "building_fiscal", + "mappingType": "existing", + "attributes": { + "buildingid": { + "targetName": "\"BuildingId\"", "mappingType": "existing" }, - "approvedon": { - "targetName": "\"ApprovedOn\"", + "fiscalyear": { + "targetName": "\"FiscalYear\"", "mappingType": "existing" }, - "deniedon": { - "targetName": "\"DeniedOn\"", + "Key": { + "targetName": "\"FiscalKeyId\"", "mappingType": "existing" }, - "cancelledon": { - "targetName": "\"CancelledOn\"", + "createdbyid": { + "targetName": "\"CreatedById\"", "mappingType": "existing" }, - "completedon": { - "targetName": "\"CompletedOn\"", + "createdon": { + "targetName": "\"CreatedOn\"", "mappingType": "existing" }, - "netbook": { - "targetName": "\"NetBook\"", + "updatedbyid": { + "targetName": "\"UpdatedById\"", "mappingType": "existing" }, - "market": { - "targetName": "\"Market\"", + "updatedon": { + "targetName": "\"UpdatedOn\"", "mappingType": "existing" }, - "assessed": { - "targetName": "\"Assessed\"", + "value": { + "targetName": "\"Value\"", "mappingType": "existing" }, - "appraised": { - "targetName": "\"Appraised\"", + "note": { + "targetName": "\"Note\"", "mappingType": "existing" }, - "projecttype": { - "targetName": "\"ProjectType\"", + "effectivedate": { + "targetName": "\"EffectiveDate\"", "mappingType": "existing" } } @@ -4806,50 +4730,8 @@ } } }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectStatusHistory": { - "targetName": "project_status_history", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "\"Id\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - }, - "projectid": { - "targetName": "\"ProjectId\"", - "mappingType": "existing" - }, - "workflowid": { - "targetName": "\"WorkflowId\"", - "mappingType": "existing" - }, - "statusid": { - "targetName": "\"StatusId\"", - "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectSnapshots": { - "targetName": "project_snapshot", + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [Id]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[IsFinal]\r\n ,[Name]\r\n ,[From]\r\n ,[To]\r\n ,[ReportType]\r\n FROM [dbo].[ProjectReports]": { + "targetName": "project_report", "mappingType": "existing", "attributes": { "id": { @@ -4872,36 +4754,24 @@ "targetName": "\"UpdatedOn\"", "mappingType": "existing" }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - }, - "projectid": { - "targetName": "\"ProjectId\"", - "mappingType": "existing" - }, - "netbook": { - "targetName": "\"NetBook\"", - "mappingType": "existing" - }, - "market": { - "targetName": "\"Market\"", + "isfinal": { + "targetName": "\"IsFinal\"", "mappingType": "existing" }, - "assessed": { - "targetName": "\"Assessed\"", + "Name": { + "targetName": "\"Name\"", "mappingType": "existing" }, - "appraised": { - "targetName": "\"Appraised\"", + "From": { + "targetName": "\"From\"", "mappingType": "existing" }, - "snapshoton": { - "targetName": "\"SnapshotOn\"", + "To": { + "targetName": "\"To\"", "mappingType": "existing" }, - "metadata": { - "targetName": "\"Metadata\"", + "reporttype": { + "targetName": "\"ReportTypeId\"", "mappingType": "existing" } } @@ -5168,114 +5038,6 @@ } } }, - "baa4a814-9d6e-4cdd-8061-f7941345a5b7": { - "task": "dataExport", - "label": "ParcelFiscalsExport", - "description": "", - "taskFolder": "Testing", - "createTime": "202402151145", - "updateTime": "202402151145", - "state": { - "producers": [ - { - "type": "databaseTransferProducer", - "location": { - "type": "entity", - "project": "General", - "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ParcelFiscals" - } - } - ], - "consumers": [ - { - "type": "databaseTransferConsumer" - } - ], - "configuration": { - "maxJobCount": 1, - "showFinalMessage": true, - "DatabaseTransferProducer": { - "extractType": "SEGMENTS", - "segmentSize": 1000, - "fetchSize": 10000, - "openNewConnections": false, - "queryRowCount": false, - "selectedColumnsOnly": false, - "selectedRowsOnly": false - }, - "DatabaseTransferConsumer": { - "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", - "openNewConnections": true, - "useTransactions": true, - "commitAfterRows": 1000, - "useMultiRowInsert": false, - "multiRowInsertBatch": 500, - "skipBindValues": false, - "disableUsingBatches": true, - "ignoreDuplicateRows": false, - "transferAutoGeneratedColumns": true, - "disableReferentialIntegrity": false, - "useBulkLoad": false, - "truncateBeforeLoad": false, - "openTableOnFinish": true, - "mappings": { - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ParcelFiscals": { - "targetName": "parcel_fiscal", - "mappingType": "existing", - "attributes": { - "parcelid": { - "targetName": "\"ParcelId\"", - "mappingType": "existing" - }, - "fiscalyear": { - "targetName": "\"FiscalYear\"", - "mappingType": "existing" - }, - "Key": { - "targetName": "\"FiscalKeyId\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - }, - "value": { - "targetName": "\"Value\"", - "mappingType": "existing" - }, - "note": { - "targetName": "\"Note\"", - "mappingType": "existing" - }, - "effectivedate": { - "targetName": "\"EffectiveDate\"", - "mappingType": "existing" - } - } - } - } - }, - "producer": "database_producer", - "consumer": "database_consumer" - } - } - }, "b0670349-36fe-48f2-83f1-a8712f4da3cc": { "task": "dataExport", "label": "BuildingFiscalsExport", From 0d672e73e6117ae9b8a3fb6a58b753f7a9f71e39 Mon Sep 17 00:00:00 2001 From: Lawrence Lau Date: Fri, 16 Feb 2024 11:56:02 -0800 Subject: [PATCH 07/11] lint fix --- .../1708104421858-NullableFields.ts | 89 ++++++++++++------- 1 file changed, 58 insertions(+), 31 deletions(-) diff --git a/express-api/src/typeorm/Migrations/1708104421858-NullableFields.ts b/express-api/src/typeorm/Migrations/1708104421858-NullableFields.ts index 54bce1c62d..3a9ccfb317 100644 --- a/express-api/src/typeorm/Migrations/1708104421858-NullableFields.ts +++ b/express-api/src/typeorm/Migrations/1708104421858-NullableFields.ts @@ -1,36 +1,63 @@ -import { MigrationInterface, QueryRunner } from "typeorm"; +import { MigrationInterface, QueryRunner } from 'typeorm'; export class NullableFields1708104421858 implements MigrationInterface { - name = 'NullableFields1708104421858' + name = 'NullableFields1708104421858'; - public async up(queryRunner: QueryRunner): Promise { - await queryRunner.query(`ALTER TABLE "parcel" DROP COLUMN "ParentID"`); - await queryRunner.query(`ALTER TABLE "project_property" DROP CONSTRAINT "FK_a580df432f0e0c521225fc3327b"`); - await queryRunner.query(`ALTER TABLE "project_property" DROP CONSTRAINT "FK_de366a792fc0aef4f8718e42d9c"`); - await queryRunner.query(`DROP INDEX "public"."IDX_a8615c36638af5cbe405f58fca"`); - await queryRunner.query(`ALTER TABLE "project_property" ALTER COLUMN "ParcelId" DROP NOT NULL`); - await queryRunner.query(`ALTER TABLE "project_property" ALTER COLUMN "BuildingId" DROP NOT NULL`); - await queryRunner.query(`DROP INDEX "public"."IDX_c32ecc1c2fd813140954bdfcc0"`); - await queryRunner.query(`ALTER TABLE "project_report" ALTER COLUMN "From" DROP NOT NULL`); - await queryRunner.query(`CREATE INDEX "IDX_a8615c36638af5cbe405f58fca" ON "project_property" ("ProjectId", "PropertyTypeId", "ParcelId", "BuildingId") `); - await queryRunner.query(`CREATE INDEX "IDX_c32ecc1c2fd813140954bdfcc0" ON "project_report" ("Id", "To", "From", "IsFinal") `); - await queryRunner.query(`ALTER TABLE "project_property" ADD CONSTRAINT "FK_a580df432f0e0c521225fc3327b" FOREIGN KEY ("ParcelId") REFERENCES "parcel"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "project_property" ADD CONSTRAINT "FK_de366a792fc0aef4f8718e42d9c" FOREIGN KEY ("BuildingId") REFERENCES "building"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`); - } - - public async down(queryRunner: QueryRunner): Promise { - await queryRunner.query(`ALTER TABLE "project_property" DROP CONSTRAINT "FK_de366a792fc0aef4f8718e42d9c"`); - await queryRunner.query(`ALTER TABLE "project_property" DROP CONSTRAINT "FK_a580df432f0e0c521225fc3327b"`); - await queryRunner.query(`DROP INDEX "public"."IDX_c32ecc1c2fd813140954bdfcc0"`); - await queryRunner.query(`DROP INDEX "public"."IDX_a8615c36638af5cbe405f58fca"`); - await queryRunner.query(`ALTER TABLE "project_report" ALTER COLUMN "From" SET NOT NULL`); - await queryRunner.query(`CREATE INDEX "IDX_c32ecc1c2fd813140954bdfcc0" ON "project_report" ("Id", "IsFinal", "From", "To") `); - await queryRunner.query(`ALTER TABLE "project_property" ALTER COLUMN "BuildingId" SET NOT NULL`); - await queryRunner.query(`ALTER TABLE "project_property" ALTER COLUMN "ParcelId" SET NOT NULL`); - await queryRunner.query(`CREATE INDEX "IDX_a8615c36638af5cbe405f58fca" ON "project_property" ("ProjectId", "PropertyTypeId", "ParcelId", "BuildingId") `); - await queryRunner.query(`ALTER TABLE "project_property" ADD CONSTRAINT "FK_de366a792fc0aef4f8718e42d9c" FOREIGN KEY ("BuildingId") REFERENCES "building"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "project_property" ADD CONSTRAINT "FK_a580df432f0e0c521225fc3327b" FOREIGN KEY ("ParcelId") REFERENCES "parcel"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "parcel" ADD "ParentID" integer`); - } + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE "parcel" DROP COLUMN "ParentID"`); + await queryRunner.query( + `ALTER TABLE "project_property" DROP CONSTRAINT "FK_a580df432f0e0c521225fc3327b"`, + ); + await queryRunner.query( + `ALTER TABLE "project_property" DROP CONSTRAINT "FK_de366a792fc0aef4f8718e42d9c"`, + ); + await queryRunner.query(`DROP INDEX "public"."IDX_a8615c36638af5cbe405f58fca"`); + await queryRunner.query(`ALTER TABLE "project_property" ALTER COLUMN "ParcelId" DROP NOT NULL`); + await queryRunner.query( + `ALTER TABLE "project_property" ALTER COLUMN "BuildingId" DROP NOT NULL`, + ); + await queryRunner.query(`DROP INDEX "public"."IDX_c32ecc1c2fd813140954bdfcc0"`); + await queryRunner.query(`ALTER TABLE "project_report" ALTER COLUMN "From" DROP NOT NULL`); + await queryRunner.query( + `CREATE INDEX "IDX_a8615c36638af5cbe405f58fca" ON "project_property" ("ProjectId", "PropertyTypeId", "ParcelId", "BuildingId") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_c32ecc1c2fd813140954bdfcc0" ON "project_report" ("Id", "To", "From", "IsFinal") `, + ); + await queryRunner.query( + `ALTER TABLE "project_property" ADD CONSTRAINT "FK_a580df432f0e0c521225fc3327b" FOREIGN KEY ("ParcelId") REFERENCES "parcel"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "project_property" ADD CONSTRAINT "FK_de366a792fc0aef4f8718e42d9c" FOREIGN KEY ("BuildingId") REFERENCES "building"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`, + ); + } + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query( + `ALTER TABLE "project_property" DROP CONSTRAINT "FK_de366a792fc0aef4f8718e42d9c"`, + ); + await queryRunner.query( + `ALTER TABLE "project_property" DROP CONSTRAINT "FK_a580df432f0e0c521225fc3327b"`, + ); + await queryRunner.query(`DROP INDEX "public"."IDX_c32ecc1c2fd813140954bdfcc0"`); + await queryRunner.query(`DROP INDEX "public"."IDX_a8615c36638af5cbe405f58fca"`); + await queryRunner.query(`ALTER TABLE "project_report" ALTER COLUMN "From" SET NOT NULL`); + await queryRunner.query( + `CREATE INDEX "IDX_c32ecc1c2fd813140954bdfcc0" ON "project_report" ("Id", "IsFinal", "From", "To") `, + ); + await queryRunner.query( + `ALTER TABLE "project_property" ALTER COLUMN "BuildingId" SET NOT NULL`, + ); + await queryRunner.query(`ALTER TABLE "project_property" ALTER COLUMN "ParcelId" SET NOT NULL`); + await queryRunner.query( + `CREATE INDEX "IDX_a8615c36638af5cbe405f58fca" ON "project_property" ("ProjectId", "PropertyTypeId", "ParcelId", "BuildingId") `, + ); + await queryRunner.query( + `ALTER TABLE "project_property" ADD CONSTRAINT "FK_de366a792fc0aef4f8718e42d9c" FOREIGN KEY ("BuildingId") REFERENCES "building"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "project_property" ADD CONSTRAINT "FK_a580df432f0e0c521225fc3327b" FOREIGN KEY ("ParcelId") REFERENCES "parcel"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`, + ); + await queryRunner.query(`ALTER TABLE "parcel" ADD "ParentID" integer`); + } } From 6216d4f70ab39f95413d0e6c18022288e838977f Mon Sep 17 00:00:00 2001 From: Lawrence Lau Date: Fri, 16 Feb 2024 15:08:25 -0800 Subject: [PATCH 08/11] added more nullable changes and the final tasks.json --- .../src/typeorm/Entities/NotificationQueue.ts | 4 +- .../typeorm/Entities/ProjectAgencyResponse.ts | 2 +- .../Migrations/1707763864013-CreateTables.ts | 4 - .../1708104421858-NullableFields.ts | 63 - .../1708123404599-NullableFields.ts | 58 + tools/dbeaver/tasks.json | 1123 +++++++++++------ 6 files changed, 809 insertions(+), 445 deletions(-) delete mode 100644 express-api/src/typeorm/Migrations/1708104421858-NullableFields.ts create mode 100644 express-api/src/typeorm/Migrations/1708123404599-NullableFields.ts diff --git a/express-api/src/typeorm/Entities/NotificationQueue.ts b/express-api/src/typeorm/Entities/NotificationQueue.ts index 14f0bb1d2e..1ec0e554e8 100644 --- a/express-api/src/typeorm/Entities/NotificationQueue.ts +++ b/express-api/src/typeorm/Entities/NotificationQueue.ts @@ -51,7 +51,7 @@ export class NotificationQueue extends BaseEntity { Tag: string; // Project Relation - @Column({ name: 'ProjectId', type: 'int' }) + @Column({ name: 'ProjectId', type: 'int', nullable: true }) ProjectId: number; @ManyToOne(() => Project, (Project) => Project.Id) @@ -59,7 +59,7 @@ export class NotificationQueue extends BaseEntity { Project: Project; // Agency Relation - @Column({ name: 'ToAgencyId', type: 'int' }) + @Column({ name: 'ToAgencyId', type: 'int', nullable: true }) ToAgencyId: number; @ManyToOne(() => Agency, (Agency) => Agency.Id) diff --git a/express-api/src/typeorm/Entities/ProjectAgencyResponse.ts b/express-api/src/typeorm/Entities/ProjectAgencyResponse.ts index 224f5cf8a7..cf83988f47 100644 --- a/express-api/src/typeorm/Entities/ProjectAgencyResponse.ts +++ b/express-api/src/typeorm/Entities/ProjectAgencyResponse.ts @@ -26,7 +26,7 @@ export class ProjectAgencyResponse extends BaseEntity { OfferAmount: number; // Notification Relation - @Column({ name: 'NotificationId', type: 'int' }) + @Column({ name: 'NotificationId', type: 'int', nullable: true }) NotificationId: number; @ManyToOne(() => NotificationQueue, (Notification) => Notification.Id, { nullable: true }) diff --git a/express-api/src/typeorm/Migrations/1707763864013-CreateTables.ts b/express-api/src/typeorm/Migrations/1707763864013-CreateTables.ts index 08bdaefa56..510328eecc 100644 --- a/express-api/src/typeorm/Migrations/1707763864013-CreateTables.ts +++ b/express-api/src/typeorm/Migrations/1707763864013-CreateTables.ts @@ -43,9 +43,6 @@ export class CreateTables1707763864013 implements MigrationInterface { await queryRunner.query( `CREATE INDEX "IDX_cdcb63fdec2cdf48ea4589557d" ON "user" ("UpdatedById") `, ); - await queryRunner.query( - `CREATE UNIQUE INDEX "IDX_b000857089edf6cae23b9bc9b8" ON "user" ("Username") `, - ); await queryRunner.query( `CREATE UNIQUE INDEX "IDX_b7eee57d84fb7ed872e660197f" ON "user" ("Email") `, ); @@ -1745,7 +1742,6 @@ export class CreateTables1707763864013 implements MigrationInterface { await queryRunner.query(`DROP TABLE "access_request"`); await queryRunner.query(`DROP INDEX "public"."IDX_c01351e0689032ad8995861393"`); await queryRunner.query(`DROP INDEX "public"."IDX_b7eee57d84fb7ed872e660197f"`); - await queryRunner.query(`DROP INDEX "public"."IDX_b000857089edf6cae23b9bc9b8"`); await queryRunner.query(`DROP INDEX "public"."IDX_cdcb63fdec2cdf48ea4589557d"`); await queryRunner.query(`DROP INDEX "public"."IDX_061257d343976f0dd80167c79e"`); await queryRunner.query(`DROP TABLE "user"`); diff --git a/express-api/src/typeorm/Migrations/1708104421858-NullableFields.ts b/express-api/src/typeorm/Migrations/1708104421858-NullableFields.ts deleted file mode 100644 index 3a9ccfb317..0000000000 --- a/express-api/src/typeorm/Migrations/1708104421858-NullableFields.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { MigrationInterface, QueryRunner } from 'typeorm'; - -export class NullableFields1708104421858 implements MigrationInterface { - name = 'NullableFields1708104421858'; - - public async up(queryRunner: QueryRunner): Promise { - await queryRunner.query(`ALTER TABLE "parcel" DROP COLUMN "ParentID"`); - await queryRunner.query( - `ALTER TABLE "project_property" DROP CONSTRAINT "FK_a580df432f0e0c521225fc3327b"`, - ); - await queryRunner.query( - `ALTER TABLE "project_property" DROP CONSTRAINT "FK_de366a792fc0aef4f8718e42d9c"`, - ); - await queryRunner.query(`DROP INDEX "public"."IDX_a8615c36638af5cbe405f58fca"`); - await queryRunner.query(`ALTER TABLE "project_property" ALTER COLUMN "ParcelId" DROP NOT NULL`); - await queryRunner.query( - `ALTER TABLE "project_property" ALTER COLUMN "BuildingId" DROP NOT NULL`, - ); - await queryRunner.query(`DROP INDEX "public"."IDX_c32ecc1c2fd813140954bdfcc0"`); - await queryRunner.query(`ALTER TABLE "project_report" ALTER COLUMN "From" DROP NOT NULL`); - await queryRunner.query( - `CREATE INDEX "IDX_a8615c36638af5cbe405f58fca" ON "project_property" ("ProjectId", "PropertyTypeId", "ParcelId", "BuildingId") `, - ); - await queryRunner.query( - `CREATE INDEX "IDX_c32ecc1c2fd813140954bdfcc0" ON "project_report" ("Id", "To", "From", "IsFinal") `, - ); - await queryRunner.query( - `ALTER TABLE "project_property" ADD CONSTRAINT "FK_a580df432f0e0c521225fc3327b" FOREIGN KEY ("ParcelId") REFERENCES "parcel"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`, - ); - await queryRunner.query( - `ALTER TABLE "project_property" ADD CONSTRAINT "FK_de366a792fc0aef4f8718e42d9c" FOREIGN KEY ("BuildingId") REFERENCES "building"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`, - ); - } - - public async down(queryRunner: QueryRunner): Promise { - await queryRunner.query( - `ALTER TABLE "project_property" DROP CONSTRAINT "FK_de366a792fc0aef4f8718e42d9c"`, - ); - await queryRunner.query( - `ALTER TABLE "project_property" DROP CONSTRAINT "FK_a580df432f0e0c521225fc3327b"`, - ); - await queryRunner.query(`DROP INDEX "public"."IDX_c32ecc1c2fd813140954bdfcc0"`); - await queryRunner.query(`DROP INDEX "public"."IDX_a8615c36638af5cbe405f58fca"`); - await queryRunner.query(`ALTER TABLE "project_report" ALTER COLUMN "From" SET NOT NULL`); - await queryRunner.query( - `CREATE INDEX "IDX_c32ecc1c2fd813140954bdfcc0" ON "project_report" ("Id", "IsFinal", "From", "To") `, - ); - await queryRunner.query( - `ALTER TABLE "project_property" ALTER COLUMN "BuildingId" SET NOT NULL`, - ); - await queryRunner.query(`ALTER TABLE "project_property" ALTER COLUMN "ParcelId" SET NOT NULL`); - await queryRunner.query( - `CREATE INDEX "IDX_a8615c36638af5cbe405f58fca" ON "project_property" ("ProjectId", "PropertyTypeId", "ParcelId", "BuildingId") `, - ); - await queryRunner.query( - `ALTER TABLE "project_property" ADD CONSTRAINT "FK_de366a792fc0aef4f8718e42d9c" FOREIGN KEY ("BuildingId") REFERENCES "building"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`, - ); - await queryRunner.query( - `ALTER TABLE "project_property" ADD CONSTRAINT "FK_a580df432f0e0c521225fc3327b" FOREIGN KEY ("ParcelId") REFERENCES "parcel"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`, - ); - await queryRunner.query(`ALTER TABLE "parcel" ADD "ParentID" integer`); - } -} diff --git a/express-api/src/typeorm/Migrations/1708123404599-NullableFields.ts b/express-api/src/typeorm/Migrations/1708123404599-NullableFields.ts new file mode 100644 index 0000000000..253c18d050 --- /dev/null +++ b/express-api/src/typeorm/Migrations/1708123404599-NullableFields.ts @@ -0,0 +1,58 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; + +export class NullableFields1708123404599 implements MigrationInterface { + name = 'NullableFields1708123404599' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE "notification_queue" DROP CONSTRAINT "FK_5d7fe381cc5ac14b88f911c81c7"`); + await queryRunner.query(`ALTER TABLE "notification_queue" DROP CONSTRAINT "FK_705c9558182adb03383285e8674"`); + await queryRunner.query(`DROP INDEX "public"."IDX_359a7aedcd7b3d97fda4bfbc83"`); + await queryRunner.query(`ALTER TABLE "notification_queue" ALTER COLUMN "ProjectId" DROP NOT NULL`); + await queryRunner.query(`ALTER TABLE "notification_queue" ALTER COLUMN "ToAgencyId" DROP NOT NULL`); + await queryRunner.query(`ALTER TABLE "project_agency_response" DROP CONSTRAINT "FK_14fa612dd1f3ac554faa62f7ff9"`); + await queryRunner.query(`ALTER TABLE "project_agency_response" ALTER COLUMN "NotificationId" DROP NOT NULL`); + await queryRunner.query(`ALTER TABLE "project_property" DROP CONSTRAINT "FK_a580df432f0e0c521225fc3327b"`); + await queryRunner.query(`ALTER TABLE "project_property" DROP CONSTRAINT "FK_de366a792fc0aef4f8718e42d9c"`); + await queryRunner.query(`DROP INDEX "public"."IDX_a8615c36638af5cbe405f58fca"`); + await queryRunner.query(`ALTER TABLE "project_property" ALTER COLUMN "ParcelId" DROP NOT NULL`); + await queryRunner.query(`ALTER TABLE "project_property" ALTER COLUMN "BuildingId" DROP NOT NULL`); + await queryRunner.query(`DROP INDEX "public"."IDX_c32ecc1c2fd813140954bdfcc0"`); + await queryRunner.query(`ALTER TABLE "project_report" ALTER COLUMN "From" DROP NOT NULL`); + await queryRunner.query(`CREATE UNIQUE INDEX "IDX_b000857089edf6cae23b9bc9b8" ON "user" ("Username") `); + await queryRunner.query(`CREATE INDEX "IDX_359a7aedcd7b3d97fda4bfbc83" ON "notification_queue" ("ProjectId", "TemplateId", "ToAgencyId") `); + await queryRunner.query(`CREATE INDEX "IDX_a8615c36638af5cbe405f58fca" ON "project_property" ("ProjectId", "PropertyTypeId", "ParcelId", "BuildingId") `); + await queryRunner.query(`CREATE INDEX "IDX_c32ecc1c2fd813140954bdfcc0" ON "project_report" ("Id", "To", "From", "IsFinal") `); + await queryRunner.query(`ALTER TABLE "notification_queue" ADD CONSTRAINT "FK_5d7fe381cc5ac14b88f911c81c7" FOREIGN KEY ("ProjectId") REFERENCES "project"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`); + await queryRunner.query(`ALTER TABLE "notification_queue" ADD CONSTRAINT "FK_705c9558182adb03383285e8674" FOREIGN KEY ("ToAgencyId") REFERENCES "agency"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`); + await queryRunner.query(`ALTER TABLE "project_agency_response" ADD CONSTRAINT "FK_14fa612dd1f3ac554faa62f7ff9" FOREIGN KEY ("NotificationId") REFERENCES "notification_queue"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`); + await queryRunner.query(`ALTER TABLE "project_property" ADD CONSTRAINT "FK_a580df432f0e0c521225fc3327b" FOREIGN KEY ("ParcelId") REFERENCES "parcel"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`); + await queryRunner.query(`ALTER TABLE "project_property" ADD CONSTRAINT "FK_de366a792fc0aef4f8718e42d9c" FOREIGN KEY ("BuildingId") REFERENCES "building"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE "project_property" DROP CONSTRAINT "FK_de366a792fc0aef4f8718e42d9c"`); + await queryRunner.query(`ALTER TABLE "project_property" DROP CONSTRAINT "FK_a580df432f0e0c521225fc3327b"`); + await queryRunner.query(`ALTER TABLE "project_agency_response" DROP CONSTRAINT "FK_14fa612dd1f3ac554faa62f7ff9"`); + await queryRunner.query(`ALTER TABLE "notification_queue" DROP CONSTRAINT "FK_705c9558182adb03383285e8674"`); + await queryRunner.query(`ALTER TABLE "notification_queue" DROP CONSTRAINT "FK_5d7fe381cc5ac14b88f911c81c7"`); + await queryRunner.query(`DROP INDEX "public"."IDX_c32ecc1c2fd813140954bdfcc0"`); + await queryRunner.query(`DROP INDEX "public"."IDX_a8615c36638af5cbe405f58fca"`); + await queryRunner.query(`DROP INDEX "public"."IDX_359a7aedcd7b3d97fda4bfbc83"`); + await queryRunner.query(`DROP INDEX "public"."IDX_b000857089edf6cae23b9bc9b8"`); + await queryRunner.query(`ALTER TABLE "project_report" ALTER COLUMN "From" SET NOT NULL`); + await queryRunner.query(`CREATE INDEX "IDX_c32ecc1c2fd813140954bdfcc0" ON "project_report" ("Id", "IsFinal", "From", "To") `); + await queryRunner.query(`ALTER TABLE "project_property" ALTER COLUMN "BuildingId" SET NOT NULL`); + await queryRunner.query(`ALTER TABLE "project_property" ALTER COLUMN "ParcelId" SET NOT NULL`); + await queryRunner.query(`CREATE INDEX "IDX_a8615c36638af5cbe405f58fca" ON "project_property" ("ProjectId", "PropertyTypeId", "ParcelId", "BuildingId") `); + await queryRunner.query(`ALTER TABLE "project_property" ADD CONSTRAINT "FK_de366a792fc0aef4f8718e42d9c" FOREIGN KEY ("BuildingId") REFERENCES "building"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`); + await queryRunner.query(`ALTER TABLE "project_property" ADD CONSTRAINT "FK_a580df432f0e0c521225fc3327b" FOREIGN KEY ("ParcelId") REFERENCES "parcel"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`); + await queryRunner.query(`ALTER TABLE "project_agency_response" ALTER COLUMN "NotificationId" SET NOT NULL`); + await queryRunner.query(`ALTER TABLE "project_agency_response" ADD CONSTRAINT "FK_14fa612dd1f3ac554faa62f7ff9" FOREIGN KEY ("NotificationId") REFERENCES "notification_queue"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`); + await queryRunner.query(`ALTER TABLE "notification_queue" ALTER COLUMN "ToAgencyId" SET NOT NULL`); + await queryRunner.query(`ALTER TABLE "notification_queue" ALTER COLUMN "ProjectId" SET NOT NULL`); + await queryRunner.query(`CREATE INDEX "IDX_359a7aedcd7b3d97fda4bfbc83" ON "notification_queue" ("ProjectId", "ToAgencyId", "TemplateId") `); + await queryRunner.query(`ALTER TABLE "notification_queue" ADD CONSTRAINT "FK_705c9558182adb03383285e8674" FOREIGN KEY ("ToAgencyId") REFERENCES "agency"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`); + await queryRunner.query(`ALTER TABLE "notification_queue" ADD CONSTRAINT "FK_5d7fe381cc5ac14b88f911c81c7" FOREIGN KEY ("ProjectId") REFERENCES "project"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`); + } + +} diff --git a/tools/dbeaver/tasks.json b/tools/dbeaver/tasks.json index f0ebe54c15..dc0ae8f7f9 100644 --- a/tools/dbeaver/tasks.json +++ b/tools/dbeaver/tasks.json @@ -3689,6 +3689,26 @@ "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Projects" } }, + { + "type": "databaseTransferProducer", + "location": { + "type": "query", + "project": "General", + "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", + "defaultCatalog": "pims", + "query": "\r\nSELECT [ProjectId]\r\n ,[TaskId]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[IsCompleted]\r\n ,[CompletedOn]\r\n FROM [dbo].[ProjectTasks]" + } + }, + { + "type": "databaseTransferProducer", + "location": { + "type": "query", + "project": "General", + "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", + "defaultCatalog": "pims", + "query": "SELECT [Id]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[IsFinal]\r\n ,[Name]\r\n ,[From]\r\n ,[To]\r\n ,[ReportType]\r\n FROM [dbo].[ProjectReports]" + } + }, { "type": "databaseTransferProducer", "location": { @@ -3705,6 +3725,14 @@ "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectStatusHistory" } }, + { + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectProperties" + } + }, { "type": "databaseTransferProducer", "location": { @@ -3712,7 +3740,15 @@ "project": "General", "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", "defaultCatalog": "pims", - "query": "\r\nSELECT [ProjectId]\r\n ,[TaskId]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[IsCompleted]\r\n ,[CompletedOn]\r\n FROM [dbo].[ProjectTasks]" + "query": "\r\nSELECT [ProjectId]\r\n ,[AgencyId]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[OfferAmount]\r\n ,[NotificationId]\r\n ,[Response]\r\n ,[ReceivedOn]\r\n ,[Note]\r\n FROM [dbo].[ProjectAgencyResponses]" + } + }, + { + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectNumbers" } }, { @@ -3722,7 +3758,7 @@ "project": "General", "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", "defaultCatalog": "pims", - "query": "SELECT [Id]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[IsFinal]\r\n ,[Name]\r\n ,[From]\r\n ,[To]\r\n ,[ReportType]\r\n FROM [dbo].[ProjectReports]" + "query": "SELECT [Id]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[ProjectId]\r\n ,[NoteType]\r\n ,[Note]\r\n FROM [dbo].[ProjectNotes]" } }, { @@ -3730,7 +3766,7 @@ "location": { "type": "entity", "project": "General", - "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectProperties" + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/NotificationQueue" } } ], @@ -3777,6 +3813,18 @@ { "type": "databaseTransferConsumer" }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, { "type": "databaseTransferConsumer" } @@ -3884,126 +3932,114 @@ } } }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Projects": { - "targetName": "project", + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT \r\n u.[Id],\r\n \r\n\t CASE \r\n\t\tWHEN u.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE u.[CreatedById]\r\n\t END AS [CreatedById],\r\n \r\n\t CASE \r\n\t\tWHEN u.IsDisabled \u003d 0 THEN \u0027Active\u0027\r\n\t\tELSE \u0027Disabled\u0027\r\n\t END AS [Status],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n urd.CreatedOn,\r\n urd.UserId,\r\n ua.AgencyId, \r\n STRING_AGG(urd.RoleName, \u0027, \u0027) AS Roles,\r\n CASE \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%System Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial Reporter%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial%\u0027 THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Agency Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Analyst%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Manager%\u0027 THEN \u002700000000-0000-0000-0000-000000000001\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister Assistant%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Executive Director%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%View Only Properties%\u0027 THEN \u002700000000-0000-0000-0000-000000000002\u0027\r\n\t \r\n END AS UserType\r\nFROM Users u\r\nLEFT JOIN (\r\n SELECT \r\n ur.UserId,\r\n MAX(ur.CreatedOn) AS CreatedOn,\r\n STRING_AGG(r.Name, \u0027, \u0027) AS RoleName\r\n FROM [pims].[dbo].[UserRoles] ur\r\n INNER JOIN Roles r ON ur.RoleId \u003d r.Id\r\n GROUP BY ur.UserId\r\n) AS urd ON u.Id \u003d urd.UserId\r\n\r\nLEFT OUTER JOIN (\r\n SELECT UserId, MIN(AgencyId) AS AgencyId\r\n FROM UserAgencies\r\n GROUP BY UserId\r\n) ua_min ON u.Id \u003d ua_min.UserId\r\nLEFT OUTER JOIN UserAgencies ua ON u.Id \u003d ua.UserId AND ua.AgencyId \u003d ua_min.AgencyId\r\n\r\nWHERE u.Id \u003c\u003e \u002700000000-0000-0000-0000-000000000000\u0027\r\n\r\nGROUP BY u.[Id],\r\n u.[CreatedById],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n urd.CreatedOn, \r\n urd.UserId, \r\n ua.AgencyId\r\nORDER BY urd.CreatedOn ASC": { + "targetName": "user", "mappingType": "existing", "attributes": { "id": { - "targetName": "\"Id\"", + "targetName": "id", "mappingType": "existing" }, "createdbyid": { - "targetName": "\"CreatedById\"", + "targetName": "createdbyid", "mappingType": "existing" }, - "createdon": { - "targetName": "\"CreatedOn\"", + "status": { + "targetName": "status", "mappingType": "existing" }, "updatedbyid": { - "targetName": "\"UpdatedById\"", + "targetName": "updatedbyid", "mappingType": "existing" }, "updatedon": { - "targetName": "\"UpdatedOn\"", + "targetName": "updatedon", "mappingType": "existing" }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - }, - "projectnumber": { - "targetName": "\"ProjectNumber\"", + "username": { + "targetName": "username", "mappingType": "existing" }, - "Name": { - "targetName": "\"Name\"", + "displayname": { + "targetName": "displayname", "mappingType": "existing" }, - "workflowid": { - "targetName": "\"WorkflowId\"", + "firstname": { + "targetName": "firstname", "mappingType": "existing" }, - "manager": { - "targetName": "\"Manager\"", + "middlename": { + "targetName": "middlename", "mappingType": "existing" }, - "reportedfiscalyear": { - "targetName": "\"ReportedFiscalYear\"", + "lastname": { + "targetName": "lastname", "mappingType": "existing" }, - "actualfiscalyear": { - "targetName": "\"ActualFiscalYear\"", + "email": { + "targetName": "email", "mappingType": "existing" }, - "agencyid": { - "targetName": "\"AgencyId\"", + "Position": { + "targetName": "Position", "mappingType": "existing" }, - "statusid": { - "targetName": "\"StatusId\"", + "isdisabled": { + "targetName": "isdisabled", "mappingType": "existing" }, - "description": { - "targetName": "\"Description\"", + "emailverified": { + "targetName": "emailverified", "mappingType": "existing" }, - "tierlevelid": { - "targetName": "\"TierLevelId\"", + "note": { + "targetName": "note", "mappingType": "existing" }, - "riskid": { - "targetName": "\"RiskId\"", + "issystem": { + "targetName": "issystem", "mappingType": "existing" }, - "metadata": { - "targetName": "\"Metadata\"", + "lastlogin": { + "targetName": "lastlogin", "mappingType": "existing" }, - "submittedon": { - "targetName": "\"SubmittedOn\"", + "approvedbyid": { + "targetName": "approvedbyid", "mappingType": "existing" }, "approvedon": { - "targetName": "\"ApprovedOn\"", - "mappingType": "existing" - }, - "deniedon": { - "targetName": "\"DeniedOn\"", - "mappingType": "existing" - }, - "cancelledon": { - "targetName": "\"CancelledOn\"", + "targetName": "approvedon", "mappingType": "existing" }, - "completedon": { - "targetName": "\"CompletedOn\"", + "keycloakuserid": { + "targetName": "keycloakuserid", "mappingType": "existing" }, - "netbook": { - "targetName": "\"NetBook\"", + "createdon": { + "targetName": "createdon", "mappingType": "existing" }, - "market": { - "targetName": "\"Market\"", - "mappingType": "existing" + "userid": { + "targetName": "userid", + "mappingType": "skip" }, - "assessed": { - "targetName": "\"Assessed\"", + "agencyid": { + "targetName": "agencyid", "mappingType": "existing" }, - "appraised": { - "targetName": "\"Appraised\"", - "mappingType": "existing" + "roles": { + "targetName": "roles", + "mappingType": "skip" }, - "projecttype": { - "targetName": "\"ProjectType\"", + "usertype": { + "targetName": "\"RoleId\"", "mappingType": "existing" } } }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectSnapshots": { - "targetName": "project_snapshot", + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT p.[Id],\r\n\t CASE \r\n\t\tWHEN p.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE p.[CreatedById]\r\n\t END AS [CreatedById],\r\n p.[CreatedOn],\r\n p.[UpdatedById],\r\n p.[UpdatedOn],\r\n p.[Name],\r\n p.[Description],\r\n p.[ClassificationId],\r\n p.[AgencyId],\r\n p.[IsSensitive],\r\n p.[IsVisibleToOtherAgencies],\r\n p.[PID],\r\n p.[PIN],\r\n p.[LandArea],\r\n p.[LandLegalDescription],\r\n p.[Zoning],\r\n p.[ZoningPotential],\r\n p.[NotOwned],\r\n\tCONVERT(VARCHAR(40), CAST(Location.Long AS DECIMAL(18, 14))) + \u0027, \u0027 + CONVERT(VARCHAR(40), CAST(Location.Lat AS DECIMAL(18, 14))) AS Location,\r\n CASE \r\n WHEN a.AdministrativeArea \u003d \u0027The Corporation of the City of Nelson\u0027 THEN 188\r\n WHEN a.AdministrativeArea \u003d \u0027Township of Langley\u0027 THEN 150\r\n WHEN a.AdministrativeArea \u003d \u0027District of North Vancouver\u0027 THEN 196\r\n WHEN a.AdministrativeArea \u003d \u0027Coombs\u0027 THEN 483\r\n WHEN a.AdministrativeArea \u003d \u0027Brookmere\u0027 THEN 481\r\n WHEN a.AdministrativeArea \u003d \u0027Thornhill\u0027 THEN 501\r\n WHEN a.AdministrativeArea \u003d \u0027Two Mile\u0027 THEN 502\r\n WHEN a.AdministrativeArea \u003d \u0027Crofton\u0027 THEN 484\r\n WHEN a.AdministrativeArea \u003d \u0027East Sooke\u0027 THEN 485\r\n WHEN a.AdministrativeArea \u003d \u0027Mudge Island\u0027 THEN 492\r\n WHEN a.AdministrativeArea \u003d \u0027Coal Harbour\u0027 THEN 482\r\n WHEN a.AdministrativeArea \u003d \u0027Miworth\u0027 THEN 490\r\n WHEN a.AdministrativeArea \u003d \u0027Lake Errock\u0027 THEN 489\r\n WHEN a.AdministrativeArea \u003d \u0027Black Creek\u0027 THEN 479\r\n WHEN a.AdministrativeArea \u003d \u0027Whaletown\u0027 THEN 504\r\n WHEN a.AdministrativeArea \u003d \u0027Quathiaski Cove\u0027 THEN 494\r\n WHEN a.AdministrativeArea \u003d \u0027Big Bay in Stuart Island\u0027 THEN 478\r\n WHEN a.AdministrativeArea \u003d \u0027Surge Narrows in Read Island\u0027 THEN 500\r\n WHEN a.AdministrativeArea \u003d \u0027Rock Bay in Sayward\u0027 THEN 497\r\n WHEN a.AdministrativeArea \u003d \u0027Granite Bay in Quadra Island\u0027 THEN 487\r\n WHEN a.AdministrativeArea \u003d \u0027Moberly Lake\u0027 THEN 491\r\n WHEN a.AdministrativeArea \u003d \u0027Quatsino\u0027 THEN 495\r\n WHEN a.AdministrativeArea \u003d \u0027Bouchie Lake\u0027 THEN 480\r\n WHEN a.AdministrativeArea \u003d \u0027West Lake\u0027 THEN 503\r\n WHEN a.AdministrativeArea \u003d \u0027Salmon Valley\u0027 THEN 498\t\t\r\n WHEN a.AdministrativeArea \u003d \u0027Red Rock\u0027 THEN 496\r\n WHEN a.AdministrativeArea \u003d \u0027Stoner\u0027 THEN 499\r\n WHEN a.AdministrativeArea \u003d \u0027Pineview FFG\u0027 THEN 493\r\n WHEN a.AdministrativeArea \u003d \u0027Wonowon\u0027 THEN 506\r\n WHEN a.AdministrativeArea \u003d \u0027Halfway River\u0027 THEN 488\r\n WHEN a.AdministrativeArea \u003d \u0027Giscome\u0027 THEN 486\r\n WHEN a.AdministrativeArea \u003d \u0027Willow River\u0027 THEN 505\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lower Nicola\u0027 THEN 314\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Belcarra\u0027 THEN 425\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Tsawwassen\u0027 THEN 315\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Anmore\u0027 THEN 432\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lake Cowichan\u0027 THEN 442\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027North Cowichan\u0027 THEN 450\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Port Edward\u0027 THEN 347\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Spallumcheen\u0027 THEN 318\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Jumbo Glacier Mountain Resort Municipality\u0027 THEN 438\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Kent\u0027 THEN 439\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Highlands\u0027 THEN 348\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Slocan\u0027 THEN 380\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Warfield\u0027 THEN 448\r\n ELSE aa.Id \r\n END AS AdministrativeAreaId, \r\n\ta.AdministrativeArea,\r\n\ta.Address1, \r\n\ta.Postal,\r\n\tpp.ParcelId as ParentID,\r\n\t0 as PropertyTypeID\r\nFROM \r\n [pims].[dbo].[Parcels] p\r\n\tINNER JOIN Addresses a\r\n\tON p.AddressId \u003d a.Id\r\n\tLEFT OUTER JOIN AdministrativeAreas aa\r\n\tON aa.Name \u003d a.AdministrativeArea\r\n    LEFT OUTER JOIN ParcelParcels pp\r\n    ON pp.SubdivisionId \u003d p.Id": { + "targetName": "parcel", "mappingType": "existing", "attributes": { "id": { @@ -4026,42 +4062,90 @@ "targetName": "\"UpdatedOn\"", "mappingType": "existing" }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" + "Name": { + "targetName": "\"Name\"", + "mappingType": "existing" }, - "projectid": { - "targetName": "\"ProjectId\"", + "description": { + "targetName": "\"Description\"", "mappingType": "existing" }, - "netbook": { - "targetName": "\"NetBook\"", + "classificationid": { + "targetName": "\"ClassificationId\"", "mappingType": "existing" }, - "market": { - "targetName": "\"Market\"", + "agencyid": { + "targetName": "\"AgencyId\"", "mappingType": "existing" }, - "assessed": { - "targetName": "\"Assessed\"", + "issensitive": { + "targetName": "\"IsSensitive\"", "mappingType": "existing" }, - "appraised": { - "targetName": "\"Appraised\"", + "isvisibletootheragencies": { + "targetName": "\"IsVisibleToOtherAgencies\"", "mappingType": "existing" }, - "snapshoton": { - "targetName": "\"SnapshotOn\"", + "pid": { + "targetName": "\"PID\"", "mappingType": "existing" }, - "metadata": { - "targetName": "\"Metadata\"", + "pin": { + "targetName": "\"PIN\"", + "mappingType": "existing" + }, + "landarea": { + "targetName": "\"LandArea\"", + "mappingType": "existing" + }, + "landlegaldescription": { + "targetName": "\"LandLegalDescription\"", + "mappingType": "existing" + }, + "zoning": { + "targetName": "\"Zoning\"", + "mappingType": "existing" + }, + "zoningpotential": { + "targetName": "\"ZoningPotential\"", + "mappingType": "existing" + }, + "notowned": { + "targetName": "\"NotOwned\"", + "mappingType": "existing" + }, + "Location": { + "targetName": "\"Location\"", + "mappingType": "existing" + }, + "administrativeareaid": { + "targetName": "\"AdministrativeAreaId\"", + "mappingType": "existing" + }, + "administrativearea": { + "targetName": "\"AdministrativeArea\"", + "mappingType": "skip" + }, + "address1": { + "targetName": "\"Address1\"", + "mappingType": "existing" + }, + "postal": { + "targetName": "\"Postal\"", + "mappingType": "existing" + }, + "parentid": { + "targetName": "\"ParentParcelId\"", + "mappingType": "existing" + }, + "propertytypeid": { + "targetName": "\"PropertyTypeID\"", "mappingType": "existing" } } }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectStatusHistory": { - "targetName": "project_status_history", + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT p.[Id],\r\n\tCASE \r\n\t WHEN p.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t ELSE p.[CreatedById]\r\n\tEND AS [CreatedById],\r\n p.[CreatedOn],\r\n p.[UpdatedById],\r\n p.[UpdatedOn],\r\n p.[Name],\r\n p.[Description],\r\n p.[ClassificationId],\r\n p.BuildingConstructionTypeId,\r\n p.[AgencyId],\r\n p.[IsSensitive],\r\n p.[IsVisibleToOtherAgencies],\r\n\tp.BuildingFloorCount,\r\n\tp.BuildingPredominateUseId,\r\n\tp.BuildingTenancy,\r\n\tp.RentableArea,\r\n\tp.BuildingOccupantTypeId,\r\n\tp.LeaseExpiry,\r\n\tp.OccupantName,\r\n\tp.TransferLeaseOnSale,\r\n\tp.BuildingTenancyUpdatedOn,\r\n\tp.EncumbranceReason,\r\n\tp.LeasedLandMetadata,\r\n\tp.TotalArea,\r\n\tCONVERT(VARCHAR(40), CAST(Location.Long AS DECIMAL(18, 14))) + \u0027, \u0027 + CONVERT(VARCHAR(40), CAST(Location.Lat AS DECIMAL(18, 14))) AS Location,\r\n\tCASE \r\n WHEN a.AdministrativeArea \u003d \u0027The Corporation of the City of Nelson\u0027 THEN 188\r\n WHEN a.AdministrativeArea \u003d \u0027Township of Langley\u0027 THEN 150\r\n WHEN a.AdministrativeArea \u003d \u0027District of North Vancouver\u0027 THEN 196\r\n WHEN a.AdministrativeArea \u003d \u0027Coombs\u0027 THEN 483\r\n WHEN a.AdministrativeArea \u003d \u0027Brookmere\u0027 THEN 481\r\n WHEN a.AdministrativeArea \u003d \u0027Thornhill\u0027 THEN 501\r\n WHEN a.AdministrativeArea \u003d \u0027Two Mile\u0027 THEN 502\r\n WHEN a.AdministrativeArea \u003d \u0027Crofton\u0027 THEN 484\r\n WHEN a.AdministrativeArea \u003d \u0027East Sooke\u0027 THEN 485\r\n WHEN a.AdministrativeArea \u003d \u0027Mudge Island\u0027 THEN 492\r\n WHEN a.AdministrativeArea \u003d \u0027Coal Harbour\u0027 THEN 482\r\n WHEN a.AdministrativeArea \u003d \u0027Miworth\u0027 THEN 490\r\n WHEN a.AdministrativeArea \u003d \u0027Lake Errock\u0027 THEN 489\r\n WHEN a.AdministrativeArea \u003d \u0027Black Creek\u0027 THEN 479\r\n WHEN a.AdministrativeArea \u003d \u0027Whaletown\u0027 THEN 504\r\n WHEN a.AdministrativeArea \u003d \u0027Quathiaski Cove\u0027 THEN 494\r\n WHEN a.AdministrativeArea \u003d \u0027Big Bay in Stuart Island\u0027 THEN 478\r\n WHEN a.AdministrativeArea \u003d \u0027Surge Narrows in Read Island\u0027 THEN 500\r\n WHEN a.AdministrativeArea \u003d \u0027Rock Bay in Sayward\u0027 THEN 497\r\n WHEN a.AdministrativeArea \u003d \u0027Granite Bay in Quadra Island\u0027 THEN 487\r\n WHEN a.AdministrativeArea \u003d \u0027Moberly Lake\u0027 THEN 491\r\n WHEN a.AdministrativeArea \u003d \u0027Quatsino\u0027 THEN 495\r\n WHEN a.AdministrativeArea \u003d \u0027Bouchie Lake\u0027 THEN 480\r\n WHEN a.AdministrativeArea \u003d \u0027West Lake\u0027 THEN 503\r\n WHEN a.AdministrativeArea \u003d \u0027Salmon Valley\u0027 THEN 498\t\t\r\n WHEN a.AdministrativeArea \u003d \u0027Red Rock\u0027 THEN 496\r\n WHEN a.AdministrativeArea \u003d \u0027Stoner\u0027 THEN 499\r\n WHEN a.AdministrativeArea \u003d \u0027Pineview FFG\u0027 THEN 493\r\n WHEN a.AdministrativeArea \u003d \u0027Wonowon\u0027 THEN 506\r\n WHEN a.AdministrativeArea \u003d \u0027Halfway River\u0027 THEN 488\r\n WHEN a.AdministrativeArea \u003d \u0027Giscome\u0027 THEN 486\r\n WHEN a.AdministrativeArea \u003d \u0027Willow River\u0027 THEN 505\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lower Nicola\u0027 THEN 314\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Belcarra\u0027 THEN 425\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Tsawwassen\u0027 THEN 315\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Anmore\u0027 THEN 432\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lake Cowichan\u0027 THEN 442\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027North Cowichan\u0027 THEN 450\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Port Edward\u0027 THEN 347\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Spallumcheen\u0027 THEN 318\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Jumbo Glacier Mountain Resort Municipality\u0027 THEN 438\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Kent\u0027 THEN 439\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Highlands\u0027 THEN 348\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Slocan\u0027 THEN 380\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Warfield\u0027 THEN 448\r\n ELSE aa.Id \r\n END AS AdministrativeAreaId, \r\n\ta.Address1, \r\n\ta.Postal,\r\n\t1 as PropertyTypeID\r\nFROM \r\n [pims].[dbo].Buildings p\r\n\tINNER JOIN Addresses a\r\n\tON p.AddressId \u003d a.Id\r\n\tLEFT OUTER JOIN AdministrativeAreas aa\r\n\tON aa.Name \u003d a.AdministrativeArea\r\nWHERE p.BuildingPredominateUseId \u003c\u003d 54": { + "targetName": "building", "mappingType": "existing", "attributes": { "id": { @@ -4084,30 +4168,114 @@ "targetName": "\"UpdatedOn\"", "mappingType": "existing" }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - }, - "projectid": { - "targetName": "\"ProjectId\"", + "Name": { + "targetName": "\"Name\"", "mappingType": "existing" }, - "workflowid": { - "targetName": "\"WorkflowId\"", + "description": { + "targetName": "\"Description\"", "mappingType": "existing" }, - "statusid": { - "targetName": "\"StatusId\"", + "classificationid": { + "targetName": "\"ClassificationId\"", + "mappingType": "existing" + }, + "buildingconstructiontypeid": { + "targetName": "\"BuildingConstructionTypeId\"", + "mappingType": "existing" + }, + "agencyid": { + "targetName": "\"AgencyId\"", + "mappingType": "existing" + }, + "issensitive": { + "targetName": "\"IsSensitive\"", + "mappingType": "existing" + }, + "isvisibletootheragencies": { + "targetName": "\"IsVisibleToOtherAgencies\"", + "mappingType": "existing" + }, + "buildingfloorcount": { + "targetName": "\"BuildingFloorCount\"", + "mappingType": "existing" + }, + "buildingpredominateuseid": { + "targetName": "\"BuildingPredominateUseId\"", + "mappingType": "existing" + }, + "buildingtenancy": { + "targetName": "\"BuildingTenancy\"", + "mappingType": "existing" + }, + "rentablearea": { + "targetName": "\"RentableArea\"", + "mappingType": "existing" + }, + "buildingoccupanttypeid": { + "targetName": "\"BuildingOccupantTypeId\"", + "mappingType": "existing" + }, + "leaseexpiry": { + "targetName": "\"LeaseExpiry\"", + "mappingType": "existing" + }, + "occupantname": { + "targetName": "\"OccupantName\"", + "mappingType": "existing" + }, + "transferleaseonsale": { + "targetName": "\"TransferLeaseOnSale\"", + "mappingType": "existing" + }, + "buildingtenancyupdatedon": { + "targetName": "\"BuildingTenancyUpdatedOn\"", + "mappingType": "existing" + }, + "encumbrancereason": { + "targetName": "\"EncumbranceReason\"", + "mappingType": "existing" + }, + "leasedlandmetadata": { + "targetName": "\"LeasedLandMetadata\"", + "mappingType": "existing" + }, + "totalarea": { + "targetName": "\"TotalArea\"", + "mappingType": "existing" + }, + "Location": { + "targetName": "\"Location\"", + "mappingType": "existing" + }, + "administrativeareaid": { + "targetName": "\"AdministrativeAreaId\"", + "mappingType": "existing" + }, + "address1": { + "targetName": "\"Address1\"", + "mappingType": "existing" + }, + "postal": { + "targetName": "\"Postal\"", + "mappingType": "existing" + }, + "propertytypeid": { + "targetName": "\"PropertyTypeID\"", "mappingType": "existing" } } }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectProperties": { - "targetName": "project_property", + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT pb.*\r\n FROM [pims].[dbo].ParcelBuildings pb\r\n INNER JOIN Buildings b\r\n ON b.Id \u003d pb.BuildingId\r\n WHERE b.BuildingPredominateUseId \u003c\u003d 54": { + "targetName": "parcel_building", "mappingType": "existing", "attributes": { - "id": { - "targetName": "\"Id\"", + "parcelid": { + "targetName": "\"ParcelId\"", + "mappingType": "existing" + }, + "buildingid": { + "targetName": "\"BuildingId\"", "mappingType": "existing" }, "createdbyid": { @@ -4129,39 +4297,77 @@ "rowversion": { "targetName": "\"RowVersion\"", "mappingType": "skip" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [ParcelId]\r\n ,[Date]\r\n ,[Key]\r\n ,\r\n\t CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Firm]\r\n ,[Value]\r\n ,[Note]\r\n FROM [pims].[dbo].[ParcelEvaluations]": { + "targetName": "parcel_evaluation", + "mappingType": "existing", + "attributes": { + "parcelid": { + "targetName": "\"ParcelId\"", + "mappingType": "existing" }, - "projectid": { - "targetName": "\"ProjectId\"", + "Date": { + "targetName": "\"Date\"", "mappingType": "existing" }, - "propertytype": { - "targetName": "\"PropertyTypeId\"", + "Key": { + "targetName": "\"EvaluationKeyId\"", "mappingType": "existing" }, - "parcelid": { - "targetName": "\"ParcelId\"", + "createdbyid": { + "targetName": "\"CreatedById\"", "mappingType": "existing" }, - "buildingid": { - "targetName": "\"BuildingId\"", + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "firm": { + "targetName": "\"Firm\"", + "mappingType": "existing" + }, + "value": { + "targetName": "\"Value\"", + "mappingType": "existing" + }, + "note": { + "targetName": "\"Note\"", "mappingType": "existing" } } }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT \r\n u.[Id],\r\n \r\n\t CASE \r\n\t\tWHEN u.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE u.[CreatedById]\r\n\t END AS [CreatedById],\r\n \r\n\t CASE \r\n\t\tWHEN u.IsDisabled \u003d 0 THEN \u0027Active\u0027\r\n\t\tELSE \u0027Disabled\u0027\r\n\t END AS [Status],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n urd.CreatedOn,\r\n urd.UserId,\r\n ua.AgencyId, \r\n STRING_AGG(urd.RoleName, \u0027, \u0027) AS Roles,\r\n CASE \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%System Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial Reporter%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial%\u0027 THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Agency Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Analyst%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Manager%\u0027 THEN \u002700000000-0000-0000-0000-000000000001\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister Assistant%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Executive Director%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%View Only Properties%\u0027 THEN \u002700000000-0000-0000-0000-000000000002\u0027\r\n\t \r\n END AS UserType\r\nFROM Users u\r\nLEFT JOIN (\r\n SELECT \r\n ur.UserId,\r\n MAX(ur.CreatedOn) AS CreatedOn,\r\n STRING_AGG(r.Name, \u0027, \u0027) AS RoleName\r\n FROM [pims].[dbo].[UserRoles] ur\r\n INNER JOIN Roles r ON ur.RoleId \u003d r.Id\r\n GROUP BY ur.UserId\r\n) AS urd ON u.Id \u003d urd.UserId\r\n\r\nLEFT OUTER JOIN (\r\n SELECT UserId, MIN(AgencyId) AS AgencyId\r\n FROM UserAgencies\r\n GROUP BY UserId\r\n) ua_min ON u.Id \u003d ua_min.UserId\r\nLEFT OUTER JOIN UserAgencies ua ON u.Id \u003d ua.UserId AND ua.AgencyId \u003d ua_min.AgencyId\r\n\r\nWHERE u.Id \u003c\u003e \u002700000000-0000-0000-0000-000000000000\u0027\r\n\r\nGROUP BY u.[Id],\r\n u.[CreatedById],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n urd.CreatedOn, \r\n urd.UserId, \r\n ua.AgencyId\r\nORDER BY urd.CreatedOn ASC": { - "targetName": "user", + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [ParcelId]\r\n ,[FiscalYear]\r\n ,[Key]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Value]\r\n ,[Note]\r\n ,[EffectiveDate]\r\n FROM [dbo].[ParcelFiscals]": { + "targetName": "parcel_fiscal", "mappingType": "existing", "attributes": { - "id": { - "targetName": "id", + "parcelid": { + "targetName": "parcelid", + "mappingType": "existing" + }, + "fiscalyear": { + "targetName": "fiscalyear", + "mappingType": "existing" + }, + "Key": { + "targetName": "\"FiscalKeyId\"", "mappingType": "existing" }, "createdbyid": { "targetName": "createdbyid", "mappingType": "existing" }, - "status": { - "targetName": "status", + "createdon": { + "targetName": "createdon", "mappingType": "existing" }, "updatedbyid": { @@ -4172,90 +4378,110 @@ "targetName": "updatedon", "mappingType": "existing" }, - "username": { - "targetName": "username", + "value": { + "targetName": "value", "mappingType": "existing" }, - "displayname": { - "targetName": "displayname", + "note": { + "targetName": "note", "mappingType": "existing" }, - "firstname": { - "targetName": "firstname", + "effectivedate": { + "targetName": "effectivedate", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\n SELECT BuildingId,\r\n FiscalYear,\r\n [Key],\r\n CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById],\r\n CreatedOn,\r\n UpdatedById,\r\n UpdatedOn,\r\n [Value],\r\n Note,\r\n EffectiveDate\r\n FROM BuildingFiscals \r\n \r\nWHERE BuildingId IN (\r\n\tSELECT b.Id \r\n\tFROM Buildings b\r\n\tWHERE b.BuildingPredominateUseId \u003c\u003d 54\r\n)": { + "targetName": "building_fiscal", + "mappingType": "existing", + "attributes": { + "buildingid": { + "targetName": "\"BuildingId\"", "mappingType": "existing" }, - "middlename": { - "targetName": "middlename", + "fiscalyear": { + "targetName": "\"FiscalYear\"", "mappingType": "existing" }, - "lastname": { - "targetName": "lastname", + "Key": { + "targetName": "\"FiscalKeyId\"", "mappingType": "existing" }, - "email": { - "targetName": "email", + "createdbyid": { + "targetName": "\"CreatedById\"", "mappingType": "existing" }, - "Position": { - "targetName": "Position", + "createdon": { + "targetName": "\"CreatedOn\"", "mappingType": "existing" }, - "isdisabled": { - "targetName": "isdisabled", + "updatedbyid": { + "targetName": "\"UpdatedById\"", "mappingType": "existing" }, - "emailverified": { - "targetName": "emailverified", + "updatedon": { + "targetName": "\"UpdatedOn\"", "mappingType": "existing" }, - "note": { - "targetName": "note", + "value": { + "targetName": "\"Value\"", "mappingType": "existing" }, - "issystem": { - "targetName": "issystem", + "note": { + "targetName": "\"Note\"", "mappingType": "existing" }, - "lastlogin": { - "targetName": "lastlogin", + "effectivedate": { + "targetName": "\"EffectiveDate\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [BuildingId]\r\n ,[Date]\r\n ,[Key]\r\n ,\r\n\t CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Value]\r\n ,[Note]\r\n FROM [pims].[dbo].[BuildingEvaluations]\r\nWHERE BuildingId IN (\r\n\tSELECT b.Id \r\n\tFROM Buildings b\r\n\tWHERE b.BuildingPredominateUseId \u003c\u003d 54\r\n)": { + "targetName": "building_evaluation", + "mappingType": "existing", + "attributes": { + "buildingid": { + "targetName": "\"BuildingId\"", "mappingType": "existing" }, - "approvedbyid": { - "targetName": "approvedbyid", + "Date": { + "targetName": "\"Date\"", "mappingType": "existing" }, - "approvedon": { - "targetName": "approvedon", + "Key": { + "targetName": "\"EvaluationKeyId\"", "mappingType": "existing" }, - "keycloakuserid": { - "targetName": "keycloakuserid", + "createdbyid": { + "targetName": "\"CreatedById\"", "mappingType": "existing" }, "createdon": { - "targetName": "createdon", + "targetName": "\"CreatedOn\"", "mappingType": "existing" }, - "userid": { - "targetName": "userid", - "mappingType": "skip" + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" }, - "agencyid": { - "targetName": "agencyid", + "updatedon": { + "targetName": "\"UpdatedOn\"", "mappingType": "existing" }, - "roles": { - "targetName": "roles", - "mappingType": "skip" + "value": { + "targetName": "\"Value\"", + "mappingType": "existing" }, - "usertype": { - "targetName": "\"RoleId\"", + "note": { + "targetName": "\"Note\"", "mappingType": "existing" } } }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT p.[Id],\r\n\t CASE \r\n\t\tWHEN p.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE p.[CreatedById]\r\n\t END AS [CreatedById],\r\n p.[CreatedOn],\r\n p.[UpdatedById],\r\n p.[UpdatedOn],\r\n p.[Name],\r\n p.[Description],\r\n p.[ClassificationId],\r\n p.[AgencyId],\r\n p.[IsSensitive],\r\n p.[IsVisibleToOtherAgencies],\r\n p.[PID],\r\n p.[PIN],\r\n p.[LandArea],\r\n p.[LandLegalDescription],\r\n p.[Zoning],\r\n p.[ZoningPotential],\r\n p.[NotOwned],\r\n\tCONVERT(VARCHAR(40), CAST(Location.Long AS DECIMAL(18, 14))) + \u0027, \u0027 + CONVERT(VARCHAR(40), CAST(Location.Lat AS DECIMAL(18, 14))) AS Location,\r\n CASE \r\n WHEN a.AdministrativeArea \u003d \u0027The Corporation of the City of Nelson\u0027 THEN 188\r\n WHEN a.AdministrativeArea \u003d \u0027Township of Langley\u0027 THEN 150\r\n WHEN a.AdministrativeArea \u003d \u0027District of North Vancouver\u0027 THEN 196\r\n WHEN a.AdministrativeArea \u003d \u0027Coombs\u0027 THEN 483\r\n WHEN a.AdministrativeArea \u003d \u0027Brookmere\u0027 THEN 481\r\n WHEN a.AdministrativeArea \u003d \u0027Thornhill\u0027 THEN 501\r\n WHEN a.AdministrativeArea \u003d \u0027Two Mile\u0027 THEN 502\r\n WHEN a.AdministrativeArea \u003d \u0027Crofton\u0027 THEN 484\r\n WHEN a.AdministrativeArea \u003d \u0027East Sooke\u0027 THEN 485\r\n WHEN a.AdministrativeArea \u003d \u0027Mudge Island\u0027 THEN 492\r\n WHEN a.AdministrativeArea \u003d \u0027Coal Harbour\u0027 THEN 482\r\n WHEN a.AdministrativeArea \u003d \u0027Miworth\u0027 THEN 490\r\n WHEN a.AdministrativeArea \u003d \u0027Lake Errock\u0027 THEN 489\r\n WHEN a.AdministrativeArea \u003d \u0027Black Creek\u0027 THEN 479\r\n WHEN a.AdministrativeArea \u003d \u0027Whaletown\u0027 THEN 504\r\n WHEN a.AdministrativeArea \u003d \u0027Quathiaski Cove\u0027 THEN 494\r\n WHEN a.AdministrativeArea \u003d \u0027Big Bay in Stuart Island\u0027 THEN 478\r\n WHEN a.AdministrativeArea \u003d \u0027Surge Narrows in Read Island\u0027 THEN 500\r\n WHEN a.AdministrativeArea \u003d \u0027Rock Bay in Sayward\u0027 THEN 497\r\n WHEN a.AdministrativeArea \u003d \u0027Granite Bay in Quadra Island\u0027 THEN 487\r\n WHEN a.AdministrativeArea \u003d \u0027Moberly Lake\u0027 THEN 491\r\n WHEN a.AdministrativeArea \u003d \u0027Quatsino\u0027 THEN 495\r\n WHEN a.AdministrativeArea \u003d \u0027Bouchie Lake\u0027 THEN 480\r\n WHEN a.AdministrativeArea \u003d \u0027West Lake\u0027 THEN 503\r\n WHEN a.AdministrativeArea \u003d \u0027Salmon Valley\u0027 THEN 498\t\t\r\n WHEN a.AdministrativeArea \u003d \u0027Red Rock\u0027 THEN 496\r\n WHEN a.AdministrativeArea \u003d \u0027Stoner\u0027 THEN 499\r\n WHEN a.AdministrativeArea \u003d \u0027Pineview FFG\u0027 THEN 493\r\n WHEN a.AdministrativeArea \u003d \u0027Wonowon\u0027 THEN 506\r\n WHEN a.AdministrativeArea \u003d \u0027Halfway River\u0027 THEN 488\r\n WHEN a.AdministrativeArea \u003d \u0027Giscome\u0027 THEN 486\r\n WHEN a.AdministrativeArea \u003d \u0027Willow River\u0027 THEN 505\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lower Nicola\u0027 THEN 314\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Belcarra\u0027 THEN 425\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Tsawwassen\u0027 THEN 315\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Anmore\u0027 THEN 432\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lake Cowichan\u0027 THEN 442\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027North Cowichan\u0027 THEN 450\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Port Edward\u0027 THEN 347\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Spallumcheen\u0027 THEN 318\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Jumbo Glacier Mountain Resort Municipality\u0027 THEN 438\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Kent\u0027 THEN 439\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Highlands\u0027 THEN 348\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Slocan\u0027 THEN 380\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Warfield\u0027 THEN 448\r\n ELSE aa.Id \r\n END AS AdministrativeAreaId, \r\n\ta.AdministrativeArea,\r\n\ta.Address1, \r\n\ta.Postal,\r\n\tpp.ParcelId as ParentID,\r\n\t0 as PropertyTypeID\r\nFROM \r\n [pims].[dbo].[Parcels] p\r\n\tINNER JOIN Addresses a\r\n\tON p.AddressId \u003d a.Id\r\n\tLEFT OUTER JOIN AdministrativeAreas aa\r\n\tON aa.Name \u003d a.AdministrativeArea\r\n    LEFT OUTER JOIN ParcelParcels pp\r\n    ON pp.SubdivisionId \u003d p.Id": { - "targetName": "parcel", + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Projects": { + "targetName": "project", "mappingType": "existing", "attributes": { "id": { @@ -4278,102 +4504,140 @@ "targetName": "\"UpdatedOn\"", "mappingType": "existing" }, + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "projectnumber": { + "targetName": "\"ProjectNumber\"", + "mappingType": "existing" + }, "Name": { "targetName": "\"Name\"", "mappingType": "existing" }, + "workflowid": { + "targetName": "\"WorkflowId\"", + "mappingType": "existing" + }, + "manager": { + "targetName": "\"Manager\"", + "mappingType": "existing" + }, + "reportedfiscalyear": { + "targetName": "\"ReportedFiscalYear\"", + "mappingType": "existing" + }, + "actualfiscalyear": { + "targetName": "\"ActualFiscalYear\"", + "mappingType": "existing" + }, + "agencyid": { + "targetName": "\"AgencyId\"", + "mappingType": "existing" + }, + "statusid": { + "targetName": "\"StatusId\"", + "mappingType": "existing" + }, "description": { "targetName": "\"Description\"", "mappingType": "existing" }, - "classificationid": { - "targetName": "\"ClassificationId\"", + "tierlevelid": { + "targetName": "\"TierLevelId\"", "mappingType": "existing" }, - "agencyid": { - "targetName": "\"AgencyId\"", + "riskid": { + "targetName": "\"RiskId\"", "mappingType": "existing" }, - "issensitive": { - "targetName": "\"IsSensitive\"", + "metadata": { + "targetName": "\"Metadata\"", "mappingType": "existing" }, - "isvisibletootheragencies": { - "targetName": "\"IsVisibleToOtherAgencies\"", + "submittedon": { + "targetName": "\"SubmittedOn\"", "mappingType": "existing" }, - "pid": { - "targetName": "\"PID\"", + "approvedon": { + "targetName": "\"ApprovedOn\"", "mappingType": "existing" }, - "pin": { - "targetName": "\"PIN\"", + "deniedon": { + "targetName": "\"DeniedOn\"", "mappingType": "existing" }, - "landarea": { - "targetName": "\"LandArea\"", + "cancelledon": { + "targetName": "\"CancelledOn\"", "mappingType": "existing" }, - "landlegaldescription": { - "targetName": "\"LandLegalDescription\"", + "completedon": { + "targetName": "\"CompletedOn\"", "mappingType": "existing" }, - "zoning": { - "targetName": "\"Zoning\"", + "netbook": { + "targetName": "\"NetBook\"", "mappingType": "existing" }, - "zoningpotential": { - "targetName": "\"ZoningPotential\"", + "market": { + "targetName": "\"Market\"", "mappingType": "existing" }, - "notowned": { - "targetName": "\"NotOwned\"", + "assessed": { + "targetName": "\"Assessed\"", "mappingType": "existing" }, - "Location": { - "targetName": "\"Location\"", + "appraised": { + "targetName": "\"Appraised\"", "mappingType": "existing" }, - "administrativeareaid": { - "targetName": "\"AdministrativeAreaId\"", + "projecttype": { + "targetName": "\"ProjectType\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT [ProjectId]\r\n ,[TaskId]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[IsCompleted]\r\n ,[CompletedOn]\r\n FROM [dbo].[ProjectTasks]": { + "targetName": "project_task", + "mappingType": "existing", + "attributes": { + "projectid": { + "targetName": "\"ProjectId\"", "mappingType": "existing" }, - "administrativearea": { - "targetName": "\"AdministrativeArea\"", - "mappingType": "skip" + "taskid": { + "targetName": "\"TaskId\"", + "mappingType": "existing" }, - "address1": { - "targetName": "\"Address1\"", + "CreatedById\r\n ,[CreatedOn": { + "targetName": "\"CreatedById\"", "mappingType": "existing" }, - "postal": { - "targetName": "\"Postal\"", + "updatedbyid": { + "targetName": "\"UpdatedById\"", "mappingType": "existing" }, - "parentid": { - "targetName": "\"ParentParcelId\"", + "updatedon": { + "targetName": "\"UpdatedOn\"", "mappingType": "existing" }, - "propertytypeid": { - "targetName": "\"PropertyTypeID\"", + "iscompleted": { + "targetName": "\"IsCompleted\"", + "mappingType": "existing" + }, + "completedon": { + "targetName": "\"CompletedOn\"", "mappingType": "existing" } } }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [ParcelId]\r\n ,[Date]\r\n ,[Key]\r\n ,\r\n\t CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Firm]\r\n ,[Value]\r\n ,[Note]\r\n FROM [pims].[dbo].[ParcelEvaluations]": { - "targetName": "parcel_evaluation", + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [Id]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[IsFinal]\r\n ,[Name]\r\n ,[From]\r\n ,[To]\r\n ,[ReportType]\r\n FROM [dbo].[ProjectReports]": { + "targetName": "project_report", "mappingType": "existing", "attributes": { - "parcelid": { - "targetName": "\"ParcelId\"", - "mappingType": "existing" - }, - "Date": { - "targetName": "\"Date\"", - "mappingType": "existing" - }, - "Key": { - "targetName": "\"EvaluationKeyId\"", + "id": { + "targetName": "\"Id\"", "mappingType": "existing" }, "createdbyid": { @@ -4392,22 +4656,30 @@ "targetName": "\"UpdatedOn\"", "mappingType": "existing" }, - "firm": { - "targetName": "\"Firm\"", + "isfinal": { + "targetName": "\"IsFinal\"", "mappingType": "existing" }, - "value": { - "targetName": "\"Value\"", + "Name": { + "targetName": "\"Name\"", "mappingType": "existing" }, - "note": { - "targetName": "\"Note\"", + "From": { + "targetName": "\"From\"", + "mappingType": "existing" + }, + "To": { + "targetName": "\"To\"", + "mappingType": "existing" + }, + "reporttype": { + "targetName": "\"ReportTypeId\"", "mappingType": "existing" } } }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT p.[Id],\r\n\tCASE \r\n\t WHEN p.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t ELSE p.[CreatedById]\r\n\tEND AS [CreatedById],\r\n p.[CreatedOn],\r\n p.[UpdatedById],\r\n p.[UpdatedOn],\r\n p.[Name],\r\n p.[Description],\r\n p.[ClassificationId],\r\n p.BuildingConstructionTypeId,\r\n p.[AgencyId],\r\n p.[IsSensitive],\r\n p.[IsVisibleToOtherAgencies],\r\n\tp.BuildingFloorCount,\r\n\tp.BuildingPredominateUseId,\r\n\tp.BuildingTenancy,\r\n\tp.RentableArea,\r\n\tp.BuildingOccupantTypeId,\r\n\tp.LeaseExpiry,\r\n\tp.OccupantName,\r\n\tp.TransferLeaseOnSale,\r\n\tp.BuildingTenancyUpdatedOn,\r\n\tp.EncumbranceReason,\r\n\tp.LeasedLandMetadata,\r\n\tp.TotalArea,\r\n\tCONVERT(VARCHAR(40), CAST(Location.Long AS DECIMAL(18, 14))) + \u0027, \u0027 + CONVERT(VARCHAR(40), CAST(Location.Lat AS DECIMAL(18, 14))) AS Location,\r\n\tCASE \r\n WHEN a.AdministrativeArea \u003d \u0027The Corporation of the City of Nelson\u0027 THEN 188\r\n WHEN a.AdministrativeArea \u003d \u0027Township of Langley\u0027 THEN 150\r\n WHEN a.AdministrativeArea \u003d \u0027District of North Vancouver\u0027 THEN 196\r\n WHEN a.AdministrativeArea \u003d \u0027Coombs\u0027 THEN 483\r\n WHEN a.AdministrativeArea \u003d \u0027Brookmere\u0027 THEN 481\r\n WHEN a.AdministrativeArea \u003d \u0027Thornhill\u0027 THEN 501\r\n WHEN a.AdministrativeArea \u003d \u0027Two Mile\u0027 THEN 502\r\n WHEN a.AdministrativeArea \u003d \u0027Crofton\u0027 THEN 484\r\n WHEN a.AdministrativeArea \u003d \u0027East Sooke\u0027 THEN 485\r\n WHEN a.AdministrativeArea \u003d \u0027Mudge Island\u0027 THEN 492\r\n WHEN a.AdministrativeArea \u003d \u0027Coal Harbour\u0027 THEN 482\r\n WHEN a.AdministrativeArea \u003d \u0027Miworth\u0027 THEN 490\r\n WHEN a.AdministrativeArea \u003d \u0027Lake Errock\u0027 THEN 489\r\n WHEN a.AdministrativeArea \u003d \u0027Black Creek\u0027 THEN 479\r\n WHEN a.AdministrativeArea \u003d \u0027Whaletown\u0027 THEN 504\r\n WHEN a.AdministrativeArea \u003d \u0027Quathiaski Cove\u0027 THEN 494\r\n WHEN a.AdministrativeArea \u003d \u0027Big Bay in Stuart Island\u0027 THEN 478\r\n WHEN a.AdministrativeArea \u003d \u0027Surge Narrows in Read Island\u0027 THEN 500\r\n WHEN a.AdministrativeArea \u003d \u0027Rock Bay in Sayward\u0027 THEN 497\r\n WHEN a.AdministrativeArea \u003d \u0027Granite Bay in Quadra Island\u0027 THEN 487\r\n WHEN a.AdministrativeArea \u003d \u0027Moberly Lake\u0027 THEN 491\r\n WHEN a.AdministrativeArea \u003d \u0027Quatsino\u0027 THEN 495\r\n WHEN a.AdministrativeArea \u003d \u0027Bouchie Lake\u0027 THEN 480\r\n WHEN a.AdministrativeArea \u003d \u0027West Lake\u0027 THEN 503\r\n WHEN a.AdministrativeArea \u003d \u0027Salmon Valley\u0027 THEN 498\t\t\r\n WHEN a.AdministrativeArea \u003d \u0027Red Rock\u0027 THEN 496\r\n WHEN a.AdministrativeArea \u003d \u0027Stoner\u0027 THEN 499\r\n WHEN a.AdministrativeArea \u003d \u0027Pineview FFG\u0027 THEN 493\r\n WHEN a.AdministrativeArea \u003d \u0027Wonowon\u0027 THEN 506\r\n WHEN a.AdministrativeArea \u003d \u0027Halfway River\u0027 THEN 488\r\n WHEN a.AdministrativeArea \u003d \u0027Giscome\u0027 THEN 486\r\n WHEN a.AdministrativeArea \u003d \u0027Willow River\u0027 THEN 505\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lower Nicola\u0027 THEN 314\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Belcarra\u0027 THEN 425\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Tsawwassen\u0027 THEN 315\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Anmore\u0027 THEN 432\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lake Cowichan\u0027 THEN 442\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027North Cowichan\u0027 THEN 450\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Port Edward\u0027 THEN 347\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Spallumcheen\u0027 THEN 318\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Jumbo Glacier Mountain Resort Municipality\u0027 THEN 438\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Kent\u0027 THEN 439\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Highlands\u0027 THEN 348\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Slocan\u0027 THEN 380\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Warfield\u0027 THEN 448\r\n ELSE aa.Id \r\n END AS AdministrativeAreaId, \r\n\ta.Address1, \r\n\ta.Postal,\r\n\t1 as PropertyTypeID\r\nFROM \r\n [pims].[dbo].Buildings p\r\n\tINNER JOIN Addresses a\r\n\tON p.AddressId \u003d a.Id\r\n\tLEFT OUTER JOIN AdministrativeAreas aa\r\n\tON aa.Name \u003d a.AdministrativeArea\r\nWHERE p.BuildingPredominateUseId \u003c\u003d 54": { - "targetName": "building", + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectSnapshots": { + "targetName": "project_snapshot", "mappingType": "existing", "attributes": { "id": { @@ -4430,118 +4702,138 @@ "targetName": "\"UpdatedOn\"", "mappingType": "existing" }, - "Name": { - "targetName": "\"Name\"", - "mappingType": "existing" + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" }, - "description": { - "targetName": "\"Description\"", + "projectid": { + "targetName": "\"ProjectId\"", "mappingType": "existing" }, - "classificationid": { - "targetName": "\"ClassificationId\"", + "netbook": { + "targetName": "\"NetBook\"", "mappingType": "existing" }, - "buildingconstructiontypeid": { - "targetName": "\"BuildingConstructionTypeId\"", + "market": { + "targetName": "\"Market\"", "mappingType": "existing" }, - "agencyid": { - "targetName": "\"AgencyId\"", + "assessed": { + "targetName": "\"Assessed\"", "mappingType": "existing" }, - "issensitive": { - "targetName": "\"IsSensitive\"", + "appraised": { + "targetName": "\"Appraised\"", "mappingType": "existing" }, - "isvisibletootheragencies": { - "targetName": "\"IsVisibleToOtherAgencies\"", + "snapshoton": { + "targetName": "\"SnapshotOn\"", "mappingType": "existing" }, - "buildingfloorcount": { - "targetName": "\"BuildingFloorCount\"", + "metadata": { + "targetName": "\"Metadata\"", "mappingType": "existing" - }, - "buildingpredominateuseid": { - "targetName": "\"BuildingPredominateUseId\"", + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectStatusHistory": { + "targetName": "project_status_history", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", "mappingType": "existing" }, - "buildingtenancy": { - "targetName": "\"BuildingTenancy\"", + "createdbyid": { + "targetName": "\"CreatedById\"", "mappingType": "existing" }, - "rentablearea": { - "targetName": "\"RentableArea\"", + "createdon": { + "targetName": "\"CreatedOn\"", "mappingType": "existing" }, - "buildingoccupanttypeid": { - "targetName": "\"BuildingOccupantTypeId\"", + "updatedbyid": { + "targetName": "\"UpdatedById\"", "mappingType": "existing" }, - "leaseexpiry": { - "targetName": "\"LeaseExpiry\"", + "updatedon": { + "targetName": "\"UpdatedOn\"", "mappingType": "existing" }, - "occupantname": { - "targetName": "\"OccupantName\"", + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "projectid": { + "targetName": "\"ProjectId\"", "mappingType": "existing" }, - "transferleaseonsale": { - "targetName": "\"TransferLeaseOnSale\"", + "workflowid": { + "targetName": "\"WorkflowId\"", "mappingType": "existing" }, - "buildingtenancyupdatedon": { - "targetName": "\"BuildingTenancyUpdatedOn\"", + "statusid": { + "targetName": "\"StatusId\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectProperties": { + "targetName": "project_property", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", "mappingType": "existing" }, - "encumbrancereason": { - "targetName": "\"EncumbranceReason\"", + "createdbyid": { + "targetName": "\"CreatedById\"", "mappingType": "existing" }, - "leasedlandmetadata": { - "targetName": "\"LeasedLandMetadata\"", + "createdon": { + "targetName": "\"CreatedOn\"", "mappingType": "existing" }, - "totalarea": { - "targetName": "\"TotalArea\"", + "updatedbyid": { + "targetName": "\"UpdatedById\"", "mappingType": "existing" }, - "Location": { - "targetName": "\"Location\"", + "updatedon": { + "targetName": "\"UpdatedOn\"", "mappingType": "existing" }, - "administrativeareaid": { - "targetName": "\"AdministrativeAreaId\"", + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "projectid": { + "targetName": "\"ProjectId\"", "mappingType": "existing" }, - "address1": { - "targetName": "\"Address1\"", + "propertytype": { + "targetName": "\"PropertyTypeId\"", "mappingType": "existing" }, - "postal": { - "targetName": "\"Postal\"", + "parcelid": { + "targetName": "\"ParcelId\"", "mappingType": "existing" }, - "propertytypeid": { - "targetName": "\"PropertyTypeID\"", + "buildingid": { + "targetName": "\"BuildingId\"", "mappingType": "existing" } } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [BuildingId]\r\n ,[Date]\r\n ,[Key]\r\n ,\r\n\t CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Value]\r\n ,[Note]\r\n FROM [pims].[dbo].[BuildingEvaluations]\r\nWHERE BuildingId IN (\r\n\tSELECT b.Id \r\n\tFROM Buildings b\r\n\tWHERE b.BuildingPredominateUseId \u003c\u003d 54\r\n)": { - "targetName": "building_evaluation", + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT [ProjectId]\r\n ,[AgencyId]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[OfferAmount]\r\n ,[NotificationId]\r\n ,[Response]\r\n ,[ReceivedOn]\r\n ,[Note]\r\n FROM [dbo].[ProjectAgencyResponses]": { + "targetName": "project_agency_response", "mappingType": "existing", "attributes": { - "buildingid": { - "targetName": "\"BuildingId\"", - "mappingType": "existing" - }, - "Date": { - "targetName": "\"Date\"", + "projectid": { + "targetName": "\"ProjectId\"", "mappingType": "existing" }, - "Key": { - "targetName": "\"EvaluationKeyId\"", + "agencyid": { + "targetName": "\"AgencyId\"", "mappingType": "existing" }, "createdbyid": { @@ -4560,8 +4852,20 @@ "targetName": "\"UpdatedOn\"", "mappingType": "existing" }, - "value": { - "targetName": "\"Value\"", + "offeramount": { + "targetName": "\"OfferAmount\"", + "mappingType": "existing" + }, + "notificationid": { + "targetName": "\"NotificationId\"", + "mappingType": "existing" + }, + "response": { + "targetName": "\"Response\"", + "mappingType": "existing" + }, + "receivedon": { + "targetName": "\"ReceivedOn\"", "mappingType": "existing" }, "note": { @@ -4570,16 +4874,12 @@ } } }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT pb.*\r\n FROM [pims].[dbo].ParcelBuildings pb\r\n INNER JOIN Buildings b\r\n ON b.Id \u003d pb.BuildingId\r\n WHERE b.BuildingPredominateUseId \u003c\u003d 54": { - "targetName": "parcel_building", + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectNumbers": { + "targetName": "project_number", "mappingType": "existing", "attributes": { - "parcelid": { - "targetName": "\"ParcelId\"", - "mappingType": "existing" - }, - "buildingid": { - "targetName": "\"BuildingId\"", + "id": { + "targetName": "\"Id\"", "mappingType": "existing" }, "createdbyid": { @@ -4604,66 +4904,50 @@ } } }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [ParcelId]\r\n ,[FiscalYear]\r\n ,[Key]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Value]\r\n ,[Note]\r\n ,[EffectiveDate]\r\n FROM [dbo].[ParcelFiscals]": { - "targetName": "parcel_fiscal", + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [Id]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[ProjectId]\r\n ,[NoteType]\r\n ,[Note]\r\n FROM [dbo].[ProjectNotes]": { + "targetName": "project_note", "mappingType": "existing", "attributes": { - "parcelid": { - "targetName": "parcelid", - "mappingType": "existing" - }, - "fiscalyear": { - "targetName": "fiscalyear", - "mappingType": "existing" - }, - "Key": { - "targetName": "\"FiscalKeyId\"", + "id": { + "targetName": "\"Id\"", "mappingType": "existing" }, "createdbyid": { - "targetName": "createdbyid", + "targetName": "\"CreatedById\"", "mappingType": "existing" }, "createdon": { - "targetName": "createdon", + "targetName": "\"CreatedOn\"", "mappingType": "existing" }, "updatedbyid": { - "targetName": "updatedbyid", + "targetName": "\"UpdatedById\"", "mappingType": "existing" }, "updatedon": { - "targetName": "updatedon", + "targetName": "\"UpdatedOn\"", "mappingType": "existing" }, - "value": { - "targetName": "value", + "projectid": { + "targetName": "\"ProjectId\"", "mappingType": "existing" }, - "note": { - "targetName": "note", + "notetype": { + "targetName": "\"NoteType\"", "mappingType": "existing" }, - "effectivedate": { - "targetName": "effectivedate", + "note": { + "targetName": "\"Note\"", "mappingType": "existing" } } }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\n SELECT BuildingId,\r\n FiscalYear,\r\n [Key],\r\n CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById],\r\n CreatedOn,\r\n UpdatedById,\r\n UpdatedOn,\r\n [Value],\r\n Note,\r\n EffectiveDate\r\n FROM BuildingFiscals \r\n \r\nWHERE BuildingId IN (\r\n\tSELECT b.Id \r\n\tFROM Buildings b\r\n\tWHERE b.BuildingPredominateUseId \u003c\u003d 54\r\n)": { - "targetName": "building_fiscal", + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/NotificationQueue": { + "targetName": "notification_queue", "mappingType": "existing", "attributes": { - "buildingid": { - "targetName": "\"BuildingId\"", - "mappingType": "existing" - }, - "fiscalyear": { - "targetName": "\"FiscalYear\"", - "mappingType": "existing" - }, - "Key": { - "targetName": "\"FiscalKeyId\"", + "id": { + "targetName": "\"Id\"", "mappingType": "existing" }, "createdbyid": { @@ -4682,96 +4966,76 @@ "targetName": "\"UpdatedOn\"", "mappingType": "existing" }, - "value": { - "targetName": "\"Value\"", - "mappingType": "existing" + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" }, - "note": { - "targetName": "\"Note\"", + "Key": { + "targetName": "\"Key\"", "mappingType": "existing" }, - "effectivedate": { - "targetName": "\"EffectiveDate\"", - "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT [ProjectId]\r\n ,[TaskId]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[IsCompleted]\r\n ,[CompletedOn]\r\n FROM [dbo].[ProjectTasks]": { - "targetName": "project_task", - "mappingType": "existing", - "attributes": { - "projectid": { - "targetName": "\"ProjectId\"", + "status": { + "targetName": "\"Status\"", "mappingType": "existing" }, - "taskid": { - "targetName": "\"TaskId\"", + "priority": { + "targetName": "\"Priority\"", "mappingType": "existing" }, - "CreatedById\r\n ,[CreatedOn": { - "targetName": "\"CreatedById\"", + "Encoding": { + "targetName": "\"Encoding\"", "mappingType": "existing" }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", + "sendon": { + "targetName": "\"SendOn\"", "mappingType": "existing" }, - "updatedon": { - "targetName": "\"UpdatedOn\"", + "To": { + "targetName": "\"To\"", "mappingType": "existing" }, - "iscompleted": { - "targetName": "\"IsCompleted\"", + "subject": { + "targetName": "\"Subject\"", "mappingType": "existing" }, - "completedon": { - "targetName": "\"CompletedOn\"", - "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [Id]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[IsFinal]\r\n ,[Name]\r\n ,[From]\r\n ,[To]\r\n ,[ReportType]\r\n FROM [dbo].[ProjectReports]": { - "targetName": "project_report", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "\"Id\"", + "bodytype": { + "targetName": "\"BodyType\"", "mappingType": "existing" }, - "createdbyid": { - "targetName": "\"CreatedById\"", + "body": { + "targetName": "\"Body\"", "mappingType": "existing" }, - "createdon": { - "targetName": "\"CreatedOn\"", + "bcc": { + "targetName": "\"Bcc\"", "mappingType": "existing" }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", + "cc": { + "targetName": "\"Cc\"", "mappingType": "existing" }, - "updatedon": { - "targetName": "\"UpdatedOn\"", + "tag": { + "targetName": "\"Tag\"", "mappingType": "existing" }, - "isfinal": { - "targetName": "\"IsFinal\"", + "projectid": { + "targetName": "\"ProjectId\"", "mappingType": "existing" }, - "Name": { - "targetName": "\"Name\"", + "toagencyid": { + "targetName": "\"ToAgencyId\"", "mappingType": "existing" }, - "From": { - "targetName": "\"From\"", + "templateid": { + "targetName": "\"TemplateId\"", "mappingType": "existing" }, - "To": { - "targetName": "\"To\"", + "chesmessageid": { + "targetName": "\"ChesMessageId\"", "mappingType": "existing" }, - "reporttype": { - "targetName": "\"ReportTypeId\"", + "chestransactionid": { + "targetName": "\"ChesTransactionId\"", "mappingType": "existing" } } @@ -5353,5 +5617,114 @@ "consumer": "database_consumer" } } + }, + "ffb584f8-e245-4b85-b70f-6ccf505e7928": { + "task": "dataExport", + "label": "ProjectAgencyResponsesExport", + "description": "", + "taskFolder": "Testing", + "createTime": "202402161327", + "updateTime": "202402161327", + "state": { + "producers": [ + { + "type": "databaseTransferProducer", + "location": { + "type": "query", + "project": "General", + "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", + "query": "\r\nSELECT [ProjectId]\r\n ,[AgencyId]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[OfferAmount]\r\n ,[NotificationId]\r\n ,[Response]\r\n ,[ReceivedOn]\r\n ,[Note]\r\n FROM [dbo].[ProjectAgencyResponses]" + } + } + ], + "consumers": [ + { + "type": "databaseTransferConsumer" + } + ], + "configuration": { + "maxJobCount": 1, + "showFinalMessage": true, + "DatabaseTransferProducer": { + "extractType": "SEGMENTS", + "segmentSize": 1000, + "fetchSize": 10000, + "openNewConnections": false, + "queryRowCount": false, + "selectedColumnsOnly": false, + "selectedRowsOnly": false + }, + "DatabaseTransferConsumer": { + "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", + "openNewConnections": true, + "useTransactions": true, + "commitAfterRows": 1000, + "useMultiRowInsert": false, + "multiRowInsertBatch": 500, + "skipBindValues": false, + "disableUsingBatches": true, + "ignoreDuplicateRows": false, + "transferAutoGeneratedColumns": true, + "disableReferentialIntegrity": true, + "useBulkLoad": false, + "truncateBeforeLoad": false, + "openTableOnFinish": true, + "mappings": { + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT [ProjectId]\r\n ,[AgencyId]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[OfferAmount]\r\n ,[NotificationId]\r\n ,[Response]\r\n ,[ReceivedOn]\r\n ,[Note]\r\n FROM [dbo].[ProjectAgencyResponses]": { + "targetName": "project_agency_response", + "mappingType": "existing", + "attributes": { + "projectid": { + "targetName": "\"ProjectId\"", + "mappingType": "existing" + }, + "agencyid": { + "targetName": "\"AgencyId\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "offeramount": { + "targetName": "\"OfferAmount\"", + "mappingType": "existing" + }, + "notificationid": { + "targetName": "\"NotificationId\"", + "mappingType": "existing" + }, + "response": { + "targetName": "\"Response\"", + "mappingType": "existing" + }, + "receivedon": { + "targetName": "\"ReceivedOn\"", + "mappingType": "existing" + }, + "note": { + "targetName": "\"Note\"", + "mappingType": "existing" + } + } + } + } + }, + "producer": "database_producer", + "consumer": "database_consumer" + } + } } } \ No newline at end of file From 2eaf796296783c49a8aec4c1aa9c1402abdd63df Mon Sep 17 00:00:00 2001 From: Lawrence Lau Date: Fri, 16 Feb 2024 15:11:42 -0800 Subject: [PATCH 09/11] cleaning up the tasks.json to only have the PIMS ETL task --- tools/dbeaver/tasks.json | 5958 ++++++-------------------------------- 1 file changed, 849 insertions(+), 5109 deletions(-) diff --git a/tools/dbeaver/tasks.json b/tools/dbeaver/tasks.json index dc0ae8f7f9..9450cb4b77 100644 --- a/tools/dbeaver/tasks.json +++ b/tools/dbeaver/tasks.json @@ -3,206 +3,92 @@ "PIMS ETL": {}, "Testing": {} }, - "17bfe16e-c625-419f-9bf0-5757084320d2": { + "5ecb8524-d561-4531-9c6e-82e38afb697e": { "task": "dataExport", - "label": "UsersExport2", - "description": "testing", - "taskFolder": "Testing", - "createTime": "202401081615", - "updateTime": "202401081615", + "label": "PIMS ETL", + "description": "Export of the Agencies, Roles, Claims, Users, and User Roles", + "taskFolder": "PIMS ETL", + "createTime": "202402131336", + "updateTime": "202402131336", "state": { "producers": [ + { + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Agencies" + } + }, { "type": "databaseTransferProducer", "location": { "type": "query", "project": "General", "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", - "query": "SELECT \r\n u.[Id],\r\n\t CASE \r\n\t\tWHEN u.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE u.[CreatedById]\r\n\t END AS [CreatedById],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n \r\n\t CASE \r\n\t\tWHEN urd.[CreatedOn] IS NULL THEN GETDATE()\r\n\t\tELSE urd.[CreatedOn]\r\n\t END AS [CreatedOn],\r\n urd.UserId,\r\n ua.AgencyId, \r\n STRING_AGG(urd.RoleName, \u0027, \u0027) AS Roles,\r\n CASE \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%System Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial Reporter%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial%\u0027 THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Agency Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Analyst%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Manager%\u0027 THEN \u002700000000-0000-0000-0000-000000000001\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister Assistant%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Executive Director%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%View Only Properties%\u0027 THEN \u002700000000-0000-0000-0000-000000000002\u0027\r\n\t \r\n END AS UserType\r\nFROM Users u\r\nLEFT JOIN (\r\n SELECT \r\n ur.UserId,\r\n MAX(ur.CreatedOn) AS CreatedOn,\r\n STRING_AGG(r.Name, \u0027, \u0027) AS RoleName\r\n FROM [pims].[dbo].[UserRoles] ur\r\n INNER JOIN Roles r ON ur.RoleId \u003d r.Id\r\n GROUP BY ur.UserId\r\n) AS urd ON u.Id \u003d urd.UserId\r\n\r\nLEFT OUTER JOIN (\r\n SELECT UserId, MIN(AgencyId) AS AgencyId\r\n FROM UserAgencies\r\n GROUP BY UserId\r\n) ua_min ON u.Id \u003d ua_min.UserId\r\nLEFT OUTER JOIN UserAgencies ua ON u.Id \u003d ua.UserId AND ua.AgencyId \u003d ua_min.AgencyId\r\n\r\nWHERE u.Id \u003c\u003e \u002700000000-0000-0000-0000-000000000000\u0027\r\nGROUP BY u.[Id],\r\n u.[CreatedById],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n urd.CreatedOn, \r\n urd.UserId, \r\n ua.AgencyId\r\nORDER BY urd.CreatedOn ASC;" + "defaultCatalog": "pims", + "defaultSchema": "dbo", + "query": "\r\nSELECT \r\n u.[Id],\r\n \r\n\t CASE \r\n\t\tWHEN u.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE u.[CreatedById]\r\n\t END AS [CreatedById],\r\n \r\n\t CASE \r\n\t\tWHEN u.IsDisabled \u003d 0 THEN \u0027Active\u0027\r\n\t\tELSE \u0027Disabled\u0027\r\n\t END AS [Status],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n urd.CreatedOn,\r\n urd.UserId,\r\n ua.AgencyId, \r\n STRING_AGG(urd.RoleName, \u0027, \u0027) AS Roles,\r\n CASE \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%System Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial Reporter%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial%\u0027 THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Agency Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Analyst%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Manager%\u0027 THEN \u002700000000-0000-0000-0000-000000000001\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister Assistant%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Executive Director%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%View Only Properties%\u0027 THEN \u002700000000-0000-0000-0000-000000000002\u0027\r\n\t \r\n END AS UserType\r\nFROM Users u\r\nLEFT JOIN (\r\n SELECT \r\n ur.UserId,\r\n MAX(ur.CreatedOn) AS CreatedOn,\r\n STRING_AGG(r.Name, \u0027, \u0027) AS RoleName\r\n FROM [pims].[dbo].[UserRoles] ur\r\n INNER JOIN Roles r ON ur.RoleId \u003d r.Id\r\n GROUP BY ur.UserId\r\n) AS urd ON u.Id \u003d urd.UserId\r\n\r\nLEFT OUTER JOIN (\r\n SELECT UserId, MIN(AgencyId) AS AgencyId\r\n FROM UserAgencies\r\n GROUP BY UserId\r\n) ua_min ON u.Id \u003d ua_min.UserId\r\nLEFT OUTER JOIN UserAgencies ua ON u.Id \u003d ua.UserId AND ua.AgencyId \u003d ua_min.AgencyId\r\n\r\nWHERE u.Id \u003c\u003e \u002700000000-0000-0000-0000-000000000000\u0027\r\n\r\nGROUP BY u.[Id],\r\n u.[CreatedById],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n urd.CreatedOn, \r\n urd.UserId, \r\n ua.AgencyId\r\nORDER BY urd.CreatedOn ASC" } - } - ], - "consumers": [ + }, { - "type": "databaseTransferConsumer" - } - ], - "configuration": { - "maxJobCount": 1, - "showFinalMessage": true, - "DatabaseTransferProducer": { - "extractType": "SEGMENTS", - "segmentSize": 100, - "fetchSize": 10000, - "openNewConnections": false, - "queryRowCount": false, - "selectedColumnsOnly": false, - "selectedRowsOnly": false + "type": "databaseTransferProducer", + "location": { + "type": "query", + "project": "General", + "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", + "defaultCatalog": "pims", + "query": "\r\nSELECT p.[Id],\r\n\t CASE \r\n\t\tWHEN p.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE p.[CreatedById]\r\n\t END AS [CreatedById],\r\n p.[CreatedOn],\r\n p.[UpdatedById],\r\n p.[UpdatedOn],\r\n p.[Name],\r\n p.[Description],\r\n p.[ClassificationId],\r\n p.[AgencyId],\r\n p.[IsSensitive],\r\n p.[IsVisibleToOtherAgencies],\r\n p.[PID],\r\n p.[PIN],\r\n p.[LandArea],\r\n p.[LandLegalDescription],\r\n p.[Zoning],\r\n p.[ZoningPotential],\r\n p.[NotOwned],\r\n\tCONVERT(VARCHAR(40), CAST(Location.Long AS DECIMAL(18, 14))) + \u0027, \u0027 + CONVERT(VARCHAR(40), CAST(Location.Lat AS DECIMAL(18, 14))) AS Location,\r\n CASE \r\n WHEN a.AdministrativeArea \u003d \u0027The Corporation of the City of Nelson\u0027 THEN 188\r\n WHEN a.AdministrativeArea \u003d \u0027Township of Langley\u0027 THEN 150\r\n WHEN a.AdministrativeArea \u003d \u0027District of North Vancouver\u0027 THEN 196\r\n WHEN a.AdministrativeArea \u003d \u0027Coombs\u0027 THEN 483\r\n WHEN a.AdministrativeArea \u003d \u0027Brookmere\u0027 THEN 481\r\n WHEN a.AdministrativeArea \u003d \u0027Thornhill\u0027 THEN 501\r\n WHEN a.AdministrativeArea \u003d \u0027Two Mile\u0027 THEN 502\r\n WHEN a.AdministrativeArea \u003d \u0027Crofton\u0027 THEN 484\r\n WHEN a.AdministrativeArea \u003d \u0027East Sooke\u0027 THEN 485\r\n WHEN a.AdministrativeArea \u003d \u0027Mudge Island\u0027 THEN 492\r\n WHEN a.AdministrativeArea \u003d \u0027Coal Harbour\u0027 THEN 482\r\n WHEN a.AdministrativeArea \u003d \u0027Miworth\u0027 THEN 490\r\n WHEN a.AdministrativeArea \u003d \u0027Lake Errock\u0027 THEN 489\r\n WHEN a.AdministrativeArea \u003d \u0027Black Creek\u0027 THEN 479\r\n WHEN a.AdministrativeArea \u003d \u0027Whaletown\u0027 THEN 504\r\n WHEN a.AdministrativeArea \u003d \u0027Quathiaski Cove\u0027 THEN 494\r\n WHEN a.AdministrativeArea \u003d \u0027Big Bay in Stuart Island\u0027 THEN 478\r\n WHEN a.AdministrativeArea \u003d \u0027Surge Narrows in Read Island\u0027 THEN 500\r\n WHEN a.AdministrativeArea \u003d \u0027Rock Bay in Sayward\u0027 THEN 497\r\n WHEN a.AdministrativeArea \u003d \u0027Granite Bay in Quadra Island\u0027 THEN 487\r\n WHEN a.AdministrativeArea \u003d \u0027Moberly Lake\u0027 THEN 491\r\n WHEN a.AdministrativeArea \u003d \u0027Quatsino\u0027 THEN 495\r\n WHEN a.AdministrativeArea \u003d \u0027Bouchie Lake\u0027 THEN 480\r\n WHEN a.AdministrativeArea \u003d \u0027West Lake\u0027 THEN 503\r\n WHEN a.AdministrativeArea \u003d \u0027Salmon Valley\u0027 THEN 498\t\t\r\n WHEN a.AdministrativeArea \u003d \u0027Red Rock\u0027 THEN 496\r\n WHEN a.AdministrativeArea \u003d \u0027Stoner\u0027 THEN 499\r\n WHEN a.AdministrativeArea \u003d \u0027Pineview FFG\u0027 THEN 493\r\n WHEN a.AdministrativeArea \u003d \u0027Wonowon\u0027 THEN 506\r\n WHEN a.AdministrativeArea \u003d \u0027Halfway River\u0027 THEN 488\r\n WHEN a.AdministrativeArea \u003d \u0027Giscome\u0027 THEN 486\r\n WHEN a.AdministrativeArea \u003d \u0027Willow River\u0027 THEN 505\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lower Nicola\u0027 THEN 314\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Belcarra\u0027 THEN 425\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Tsawwassen\u0027 THEN 315\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Anmore\u0027 THEN 432\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lake Cowichan\u0027 THEN 442\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027North Cowichan\u0027 THEN 450\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Port Edward\u0027 THEN 347\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Spallumcheen\u0027 THEN 318\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Jumbo Glacier Mountain Resort Municipality\u0027 THEN 438\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Kent\u0027 THEN 439\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Highlands\u0027 THEN 348\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Slocan\u0027 THEN 380\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Warfield\u0027 THEN 448\r\n ELSE aa.Id \r\n END AS AdministrativeAreaId, \r\n\ta.AdministrativeArea,\r\n\ta.Address1, \r\n\ta.Postal,\r\n\tpp.ParcelId as ParentID,\r\n\t0 as PropertyTypeID\r\nFROM \r\n [pims].[dbo].[Parcels] p\r\n\tINNER JOIN Addresses a\r\n\tON p.AddressId \u003d a.Id\r\n\tLEFT OUTER JOIN AdministrativeAreas aa\r\n\tON aa.Name \u003d a.AdministrativeArea\r\n    LEFT OUTER JOIN ParcelParcels pp\r\n    ON pp.SubdivisionId \u003d p.Id" + } }, - "DatabaseTransferConsumer": { - "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", - "openNewConnections": true, - "useTransactions": true, - "commitAfterRows": 1000, - "useMultiRowInsert": false, - "multiRowInsertBatch": 500, - "skipBindValues": false, - "disableUsingBatches": false, - "ignoreDuplicateRows": false, - "transferAutoGeneratedColumns": true, - "disableReferentialIntegrity": false, - "useBulkLoad": true, - "truncateBeforeLoad": false, - "openTableOnFinish": true, - "mappings": { - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT \r\n u.[Id],\r\n\t CASE \r\n\t\tWHEN u.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE u.[CreatedById]\r\n\t END AS [CreatedById],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n \r\n\t CASE \r\n\t\tWHEN urd.[CreatedOn] IS NULL THEN GETDATE()\r\n\t\tELSE urd.[CreatedOn]\r\n\t END AS [CreatedOn],\r\n urd.UserId,\r\n ua.AgencyId, \r\n STRING_AGG(urd.RoleName, \u0027, \u0027) AS Roles,\r\n CASE \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%System Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial Reporter%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial%\u0027 THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Agency Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Analyst%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Manager%\u0027 THEN \u002700000000-0000-0000-0000-000000000001\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister Assistant%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Executive Director%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%View Only Properties%\u0027 THEN \u002700000000-0000-0000-0000-000000000002\u0027\r\n\t \r\n END AS UserType\r\nFROM Users u\r\nLEFT JOIN (\r\n SELECT \r\n ur.UserId,\r\n MAX(ur.CreatedOn) AS CreatedOn,\r\n STRING_AGG(r.Name, \u0027, \u0027) AS RoleName\r\n FROM [pims].[dbo].[UserRoles] ur\r\n INNER JOIN Roles r ON ur.RoleId \u003d r.Id\r\n GROUP BY ur.UserId\r\n) AS urd ON u.Id \u003d urd.UserId\r\n\r\nLEFT OUTER JOIN (\r\n SELECT UserId, MIN(AgencyId) AS AgencyId\r\n FROM UserAgencies\r\n GROUP BY UserId\r\n) ua_min ON u.Id \u003d ua_min.UserId\r\nLEFT OUTER JOIN UserAgencies ua ON u.Id \u003d ua.UserId AND ua.AgencyId \u003d ua_min.AgencyId\r\n\r\nWHERE u.Id \u003c\u003e \u002700000000-0000-0000-0000-000000000000\u0027\r\nGROUP BY u.[Id],\r\n u.[CreatedById],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n urd.CreatedOn, \r\n urd.UserId, \r\n ua.AgencyId\r\nORDER BY urd.CreatedOn ASC;": { - "targetName": "user", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "id", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "createdbyid", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "updatedbyid", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "updatedon", - "mappingType": "existing" - }, - "username": { - "targetName": "username", - "mappingType": "existing" - }, - "displayname": { - "targetName": "displayname", - "mappingType": "existing" - }, - "firstname": { - "targetName": "firstname", - "mappingType": "existing" - }, - "middlename": { - "targetName": "middlename", - "mappingType": "existing" - }, - "lastname": { - "targetName": "lastname", - "mappingType": "existing" - }, - "email": { - "targetName": "email", - "mappingType": "existing" - }, - "Position": { - "targetName": "Position", - "mappingType": "existing" - }, - "isdisabled": { - "targetName": "isdisabled", - "mappingType": "existing" - }, - "emailverified": { - "targetName": "emailverified", - "mappingType": "existing" - }, - "note": { - "targetName": "note", - "mappingType": "existing" - }, - "issystem": { - "targetName": "issystem", - "mappingType": "existing" - }, - "lastlogin": { - "targetName": "lastlogin", - "mappingType": "existing" - }, - "approvedbyid": { - "targetName": "approvedbyid", - "mappingType": "existing" - }, - "approvedon": { - "targetName": "approvedon", - "mappingType": "existing" - }, - "keycloakuserid": { - "targetName": "keycloakuserid", - "mappingType": "existing" - }, - "createdon": { - "targetName": "createdon", - "mappingType": "existing" - }, - "userid": { - "targetName": "userid", - "mappingType": "skip" - }, - "agencyid": { - "targetName": "agencyid", - "mappingType": "existing" - }, - "roles": { - "targetName": "roles", - "mappingType": "skip" - }, - "usertype": { - "targetName": "\"RoleId\"", - "mappingType": "existing" - } - } - } + { + "type": "databaseTransferProducer", + "location": { + "type": "query", + "project": "General", + "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", + "defaultCatalog": "pims", + "query": "SELECT p.[Id],\r\n\tCASE \r\n\t WHEN p.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t ELSE p.[CreatedById]\r\n\tEND AS [CreatedById],\r\n p.[CreatedOn],\r\n p.[UpdatedById],\r\n p.[UpdatedOn],\r\n p.[Name],\r\n p.[Description],\r\n p.[ClassificationId],\r\n p.BuildingConstructionTypeId,\r\n p.[AgencyId],\r\n p.[IsSensitive],\r\n p.[IsVisibleToOtherAgencies],\r\n\tp.BuildingFloorCount,\r\n\tp.BuildingPredominateUseId,\r\n\tp.BuildingTenancy,\r\n\tp.RentableArea,\r\n\tp.BuildingOccupantTypeId,\r\n\tp.LeaseExpiry,\r\n\tp.OccupantName,\r\n\tp.TransferLeaseOnSale,\r\n\tp.BuildingTenancyUpdatedOn,\r\n\tp.EncumbranceReason,\r\n\tp.LeasedLandMetadata,\r\n\tp.TotalArea,\r\n\tCONVERT(VARCHAR(40), CAST(Location.Long AS DECIMAL(18, 14))) + \u0027, \u0027 + CONVERT(VARCHAR(40), CAST(Location.Lat AS DECIMAL(18, 14))) AS Location,\r\n\tCASE \r\n WHEN a.AdministrativeArea \u003d \u0027The Corporation of the City of Nelson\u0027 THEN 188\r\n WHEN a.AdministrativeArea \u003d \u0027Township of Langley\u0027 THEN 150\r\n WHEN a.AdministrativeArea \u003d \u0027District of North Vancouver\u0027 THEN 196\r\n WHEN a.AdministrativeArea \u003d \u0027Coombs\u0027 THEN 483\r\n WHEN a.AdministrativeArea \u003d \u0027Brookmere\u0027 THEN 481\r\n WHEN a.AdministrativeArea \u003d \u0027Thornhill\u0027 THEN 501\r\n WHEN a.AdministrativeArea \u003d \u0027Two Mile\u0027 THEN 502\r\n WHEN a.AdministrativeArea \u003d \u0027Crofton\u0027 THEN 484\r\n WHEN a.AdministrativeArea \u003d \u0027East Sooke\u0027 THEN 485\r\n WHEN a.AdministrativeArea \u003d \u0027Mudge Island\u0027 THEN 492\r\n WHEN a.AdministrativeArea \u003d \u0027Coal Harbour\u0027 THEN 482\r\n WHEN a.AdministrativeArea \u003d \u0027Miworth\u0027 THEN 490\r\n WHEN a.AdministrativeArea \u003d \u0027Lake Errock\u0027 THEN 489\r\n WHEN a.AdministrativeArea \u003d \u0027Black Creek\u0027 THEN 479\r\n WHEN a.AdministrativeArea \u003d \u0027Whaletown\u0027 THEN 504\r\n WHEN a.AdministrativeArea \u003d \u0027Quathiaski Cove\u0027 THEN 494\r\n WHEN a.AdministrativeArea \u003d \u0027Big Bay in Stuart Island\u0027 THEN 478\r\n WHEN a.AdministrativeArea \u003d \u0027Surge Narrows in Read Island\u0027 THEN 500\r\n WHEN a.AdministrativeArea \u003d \u0027Rock Bay in Sayward\u0027 THEN 497\r\n WHEN a.AdministrativeArea \u003d \u0027Granite Bay in Quadra Island\u0027 THEN 487\r\n WHEN a.AdministrativeArea \u003d \u0027Moberly Lake\u0027 THEN 491\r\n WHEN a.AdministrativeArea \u003d \u0027Quatsino\u0027 THEN 495\r\n WHEN a.AdministrativeArea \u003d \u0027Bouchie Lake\u0027 THEN 480\r\n WHEN a.AdministrativeArea \u003d \u0027West Lake\u0027 THEN 503\r\n WHEN a.AdministrativeArea \u003d \u0027Salmon Valley\u0027 THEN 498\t\t\r\n WHEN a.AdministrativeArea \u003d \u0027Red Rock\u0027 THEN 496\r\n WHEN a.AdministrativeArea \u003d \u0027Stoner\u0027 THEN 499\r\n WHEN a.AdministrativeArea \u003d \u0027Pineview FFG\u0027 THEN 493\r\n WHEN a.AdministrativeArea \u003d \u0027Wonowon\u0027 THEN 506\r\n WHEN a.AdministrativeArea \u003d \u0027Halfway River\u0027 THEN 488\r\n WHEN a.AdministrativeArea \u003d \u0027Giscome\u0027 THEN 486\r\n WHEN a.AdministrativeArea \u003d \u0027Willow River\u0027 THEN 505\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lower Nicola\u0027 THEN 314\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Belcarra\u0027 THEN 425\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Tsawwassen\u0027 THEN 315\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Anmore\u0027 THEN 432\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lake Cowichan\u0027 THEN 442\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027North Cowichan\u0027 THEN 450\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Port Edward\u0027 THEN 347\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Spallumcheen\u0027 THEN 318\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Jumbo Glacier Mountain Resort Municipality\u0027 THEN 438\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Kent\u0027 THEN 439\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Highlands\u0027 THEN 348\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Slocan\u0027 THEN 380\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Warfield\u0027 THEN 448\r\n ELSE aa.Id \r\n END AS AdministrativeAreaId, \r\n\ta.Address1, \r\n\ta.Postal,\r\n\t1 as PropertyTypeID\r\nFROM \r\n [pims].[dbo].Buildings p\r\n\tINNER JOIN Addresses a\r\n\tON p.AddressId \u003d a.Id\r\n\tLEFT OUTER JOIN AdministrativeAreas aa\r\n\tON aa.Name \u003d a.AdministrativeArea\r\nWHERE p.BuildingPredominateUseId \u003c\u003d 54" } }, - "producer": "database_producer", - "consumer": "database_consumer" - } - } - }, - "ceb4321d-91ce-47f2-a9e3-4fab069d876e": { - "task": "dataExport", - "label": "ClaimsExport", - "description": "just the roles and claims export", - "taskFolder": "Testing", - "createTime": "202401081619", - "updateTime": "202401081619", - "state": { - "producers": [ { "type": "databaseTransferProducer", "location": { - "type": "entity", + "type": "query", "project": "General", - "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Users" + "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", + "defaultCatalog": "pims", + "query": "\r\nSELECT pb.*\r\n FROM [pims].[dbo].ParcelBuildings pb\r\n INNER JOIN Buildings b\r\n ON b.Id \u003d pb.BuildingId\r\n WHERE b.BuildingPredominateUseId \u003c\u003d 54" } }, { "type": "databaseTransferProducer", "location": { - "type": "entity", + "type": "query", "project": "General", - "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Roles" + "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", + "defaultCatalog": "pims", + "query": "SELECT [ParcelId]\r\n ,[Date]\r\n ,[Key]\r\n ,\r\n\t CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Firm]\r\n ,[Value]\r\n ,[Note]\r\n FROM [pims].[dbo].[ParcelEvaluations]" } }, { "type": "databaseTransferProducer", "location": { - "type": "entity", + "type": "query", "project": "General", - "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Claims" + "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", + "defaultCatalog": "pims", + "query": "SELECT [ParcelId]\r\n ,[FiscalYear]\r\n ,[Key]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Value]\r\n ,[Note]\r\n ,[EffectiveDate]\r\n FROM [dbo].[ParcelFiscals]" } }, { "type": "databaseTransferProducer", "location": { - "type": "entity", + "type": "query", "project": "General", - "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/RoleClaims" + "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", + "defaultCatalog": "pims", + "query": "\r\n SELECT BuildingId,\r\n FiscalYear,\r\n [Key],\r\n CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById],\r\n CreatedOn,\r\n UpdatedById,\r\n UpdatedOn,\r\n [Value],\r\n Note,\r\n EffectiveDate\r\n FROM BuildingFiscals \r\n \r\nWHERE BuildingId IN (\r\n\tSELECT b.Id \r\n\tFROM Buildings b\r\n\tWHERE b.BuildingPredominateUseId \u003c\u003d 54\r\n)" } }, { @@ -212,148 +98,187 @@ "project": "General", "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", "defaultCatalog": "pims", - "defaultSchema": "dbo", - "query": "SELECT [Id]\r\n ,[CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Name]\r\n ,[IsDisabled]\r\n ,[SortOrder]\r\n ,[Abbreviation]\r\n ,[BoundaryType]\r\n FROM [pims].[dbo].[AdministrativeAreas]\r\n WHERE Name LIKE \u0027%Regional District%\u0027" + "query": "SELECT [BuildingId]\r\n ,[Date]\r\n ,[Key]\r\n ,\r\n\t CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Value]\r\n ,[Note]\r\n FROM [pims].[dbo].[BuildingEvaluations]\r\nWHERE BuildingId IN (\r\n\tSELECT b.Id \r\n\tFROM Buildings b\r\n\tWHERE b.BuildingPredominateUseId \u003c\u003d 54\r\n)" } - } - ], - "consumers": [ + }, { - "type": "databaseTransferConsumer" + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Projects" + } }, { - "type": "databaseTransferConsumer" + "type": "databaseTransferProducer", + "location": { + "type": "query", + "project": "General", + "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", + "defaultCatalog": "pims", + "query": "\r\nSELECT [ProjectId]\r\n ,[TaskId]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[IsCompleted]\r\n ,[CompletedOn]\r\n FROM [dbo].[ProjectTasks]" + } }, { - "type": "databaseTransferConsumer" + "type": "databaseTransferProducer", + "location": { + "type": "query", + "project": "General", + "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", + "defaultCatalog": "pims", + "query": "SELECT [Id]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[IsFinal]\r\n ,[Name]\r\n ,[From]\r\n ,[To]\r\n ,[ReportType]\r\n FROM [dbo].[ProjectReports]" + } }, { - "type": "databaseTransferConsumer" + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectSnapshots" + } }, { - "type": "databaseTransferConsumer" - } - ], - "configuration": { - "maxJobCount": 1.0, - "showFinalMessage": true, - "DatabaseTransferProducer": { - "extractType": "SEGMENTS", - "segmentSize": 100.0, - "fetchSize": 10000.0, - "openNewConnections": false, - "queryRowCount": false, - "selectedColumnsOnly": false, - "selectedRowsOnly": false + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectStatusHistory" + } }, - "DatabaseTransferConsumer": { - "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", - "openNewConnections": true, - "useTransactions": true, - "commitAfterRows": 1000.0, - "useMultiRowInsert": false, - "multiRowInsertBatch": 500.0, - "skipBindValues": false, - "disableUsingBatches": false, - "ignoreDuplicateRows": false, - "transferAutoGeneratedColumns": true, - "disableReferentialIntegrity": false, - "useBulkLoad": true, - "truncateBeforeLoad": false, + { + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectProperties" + } + }, + { + "type": "databaseTransferProducer", + "location": { + "type": "query", + "project": "General", + "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", + "defaultCatalog": "pims", + "query": "\r\nSELECT [ProjectId]\r\n ,[AgencyId]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[OfferAmount]\r\n ,[NotificationId]\r\n ,[Response]\r\n ,[ReceivedOn]\r\n ,[Note]\r\n FROM [dbo].[ProjectAgencyResponses]" + } + }, + { + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectNumbers" + } + }, + { + "type": "databaseTransferProducer", + "location": { + "type": "query", + "project": "General", + "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", + "defaultCatalog": "pims", + "query": "SELECT [Id]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[ProjectId]\r\n ,[NoteType]\r\n ,[Note]\r\n FROM [dbo].[ProjectNotes]" + } + }, + { + "type": "databaseTransferProducer", + "location": { + "type": "entity", + "project": "General", + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/NotificationQueue" + } + } + ], + "consumers": [ + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + }, + { + "type": "databaseTransferConsumer" + } + ], + "configuration": { + "maxJobCount": 1, + "showFinalMessage": true, + "DatabaseTransferProducer": { + "extractType": "SEGMENTS", + "segmentSize": 1000, + "fetchSize": 10000, + "openNewConnections": false, + "queryRowCount": false, + "selectedColumnsOnly": false, + "selectedRowsOnly": false + }, + "DatabaseTransferConsumer": { + "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", + "openNewConnections": true, + "useTransactions": true, + "commitAfterRows": 1000, + "useMultiRowInsert": false, + "multiRowInsertBatch": 500, + "skipBindValues": false, + "disableUsingBatches": true, + "ignoreDuplicateRows": false, + "transferAutoGeneratedColumns": true, + "disableReferentialIntegrity": true, + "useBulkLoad": false, + "truncateBeforeLoad": false, "openTableOnFinish": true, "mappings": { - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Users": { - "targetName": "users", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "\"Id\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - }, - "username": { - "targetName": "\"Username\"", - "mappingType": "existing" - }, - "displayname": { - "targetName": "\"DisplayName\"", - "mappingType": "existing" - }, - "firstname": { - "targetName": "\"FirstName\"", - "mappingType": "existing" - }, - "middlename": { - "targetName": "\"MiddleName\"", - "mappingType": "existing" - }, - "lastname": { - "targetName": "\"LastName\"", - "mappingType": "existing" - }, - "email": { - "targetName": "\"Email\"", - "mappingType": "existing" - }, - "Position": { - "targetName": "\"Position\"", - "mappingType": "existing" - }, - "isdisabled": { - "targetName": "\"IsDisabled\"", - "mappingType": "existing" - }, - "emailverified": { - "targetName": "\"EmailVerified\"", - "mappingType": "existing" - }, - "note": { - "targetName": "\"Note\"", - "mappingType": "existing" - }, - "issystem": { - "targetName": "\"IsSystem\"", - "mappingType": "existing" - }, - "lastlogin": { - "targetName": "\"LastLogin\"", - "mappingType": "existing" - }, - "approvedbyid": { - "targetName": "\"ApprovedById\"", - "mappingType": "existing" - }, - "approvedon": { - "targetName": "\"ApprovedOn\"", - "mappingType": "existing" - }, - "keycloakuserid": { - "targetName": "\"KeycloakUserId\"", - "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Roles": { - "targetName": "roles", + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Agencies": { + "targetName": "agency", "mappingType": "existing", "attributes": { "id": { @@ -362,7 +287,12 @@ }, "createdbyid": { "targetName": "\"CreatedById\"", - "mappingType": "existing" + "mappingType": "existing", + "transformer": "constant", + "transformerProperties": { + "constant": "00000000-0000-0000-0000-000000000000" + }, + "transformerPropertiesNames": "constant" }, "createdon": { "targetName": "\"CreatedOn\"", @@ -392,4248 +322,144 @@ "targetName": "\"SortOrder\"", "mappingType": "existing" }, - "keycloakgroupid": { - "targetName": "\"KeycloakGroupId\"", + "code": { + "targetName": "\"Code\"", "mappingType": "existing" }, "description": { "targetName": "\"Description\"", "mappingType": "existing" }, - "ispublic": { - "targetName": "\"IsPublic\"", - "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Claims": { - "targetName": "claims", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "\"Id\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing" - }, - "createdon": { - "targetName": "\"CreatedOn\"", + "parentid": { + "targetName": "\"ParentId\"", "mappingType": "existing" }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", + "email": { + "targetName": "\"Email\"", "mappingType": "existing" }, - "updatedon": { - "targetName": "\"UpdatedOn\"", + "sendemail": { + "targetName": "\"SendEmail\"", "mappingType": "existing" }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - }, - "Name": { - "targetName": "\"Name\"", + "addressto": { + "targetName": "\"AddressTo\"", "mappingType": "existing" }, - "keycloakroleid": { - "targetName": "\"KeycloakRoleId\"", - "mappingType": "existing" - }, - "description": { - "targetName": "\"Description\"", - "mappingType": "existing" - }, - "isdisabled": { - "targetName": "\"IsDisabled\"", - "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/RoleClaims": { - "targetName": "role_claims", - "mappingType": "existing", - "attributes": { - "roleid": { - "targetName": "\"RoleId\"", - "mappingType": "existing" - }, - "claimid": { - "targetName": "\"ClaimId\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [Id]\r\n ,[CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Name]\r\n ,[IsDisabled]\r\n ,[SortOrder]\r\n ,[Abbreviation]\r\n ,[BoundaryType]\r\n FROM [pims].[dbo].[AdministrativeAreas]\r\n WHERE Name LIKE \u0027%Regional District%\u0027": { - "targetName": "regional_districts", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "\"Id\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing", - "transformer": "constant", - "transformerProperties": { - "constant": "00000000-0000-0000-0000-000000000000" - }, - "transformerPropertiesNames": "constant" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "Name": { - "targetName": "\"Name\"", - "mappingType": "existing" - }, - "isdisabled": { - "targetName": "\"IsDisabled\"", - "mappingType": "skip" - }, - "sortorder": { - "targetName": "\"SortOrder\"", - "mappingType": "skip" - }, - "abbreviation": { - "targetName": "\"Abbreviation\"", - "mappingType": "skip" - }, - "boundarytype": { - "targetName": "\"BoundaryType\"", - "mappingType": "skip" - } - } - } - } - }, - "producer": "database_producer", - "consumer": "database_consumer" - } - } - }, - "7c8adf62-1021-47ab-a564-64f1967d6a65": { - "task": "dataExport", - "label": "PIMSExport", - "description": "Will be all the tables for PIMS", - "taskFolder": "PIMS ETL", - "createTime": "202401091557", - "updateTime": "202401091557", - "state": { - "producers": [ - { - "type": "databaseTransferProducer", - "location": { - "type": "entity", - "project": "General", - "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Roles" - } - }, - { - "type": "databaseTransferProducer", - "location": { - "type": "entity", - "project": "General", - "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Claims" - } - }, - { - "type": "databaseTransferProducer", - "location": { - "type": "entity", - "project": "General", - "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/RoleClaims" - } - }, - { - "type": "databaseTransferProducer", - "location": { - "type": "entity", - "project": "General", - "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Agencies" - } - }, - { - "type": "databaseTransferProducer", - "location": { - "type": "entity", - "project": "General", - "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/BuildingConstructionTypes" - } - }, - { - "type": "databaseTransferProducer", - "location": { - "type": "entity", - "project": "General", - "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/BuildingOccupantTypes" - } - }, - { - "type": "databaseTransferProducer", - "location": { - "type": "entity", - "project": "General", - "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/BuildingPredominateUses" - } - }, - { - "type": "databaseTransferProducer", - "location": { - "type": "entity", - "project": "General", - "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/NotificationTemplates" - } - }, - { - "type": "databaseTransferProducer", - "location": { - "type": "entity", - "project": "General", - "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectNumbers" - } - }, - { - "type": "databaseTransferProducer", - "location": { - "type": "entity", - "project": "General", - "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectRisks" - } - }, - { - "type": "databaseTransferProducer", - "location": { - "type": "entity", - "project": "General", - "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectStatus" - } - }, - { - "type": "databaseTransferProducer", - "location": { - "type": "entity", - "project": "General", - "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/PropertyClassifications" - } - }, - { - "type": "databaseTransferProducer", - "location": { - "type": "entity", - "project": "General", - "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/PropertyTypes" - } - }, - { - "type": "databaseTransferProducer", - "location": { - "type": "entity", - "project": "General", - "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Provinces" - } - }, - { - "type": "databaseTransferProducer", - "location": { - "type": "entity", - "project": "General", - "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Tasks" - } - }, - { - "type": "databaseTransferProducer", - "location": { - "type": "entity", - "project": "General", - "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/TierLevels" - } - }, - { - "type": "databaseTransferProducer", - "location": { - "type": "entity", - "project": "General", - "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Workflows" - } - }, - { - "type": "databaseTransferProducer", - "location": { - "type": "entity", - "project": "General", - "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/WorkflowProjectStatus" - } - }, - { - "type": "databaseTransferProducer", - "location": { - "type": "entity", - "project": "General", - "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Projects" - } - }, - { - "type": "databaseTransferProducer", - "location": { - "type": "query", - "project": "General", - "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", - "defaultCatalog": "pims", - "defaultSchema": "dbo", - "query": "SELECT [Id]\r\n ,[CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Name]\r\n FROM [pims].[dbo].[AdministrativeAreas]\r\n WHERE Name LIKE \u0027%District%\u0027 OR Name LIKE \u0027%Stikine Region%\u0027" - } - }, - { - "type": "databaseTransferProducer", - "location": { - "type": "query", - "project": "General", - "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", - "defaultCatalog": "pims", - "defaultSchema": "dbo", - "query": "SELECT TOP (1000) [Id]\r\n ,u.[CreatedById]\r\n ,u.[CreatedOn]\r\n ,u.[UpdatedById]\r\n ,u.[UpdatedOn]\r\n ,[Username]\r\n ,[DisplayName]\r\n ,[FirstName]\r\n ,[MiddleName]\r\n ,[LastName]\r\n ,[Email]\r\n ,[Position]\r\n ,[IsDisabled]\r\n ,[EmailVerified]\r\n ,[Note]\r\n ,[IsSystem]\r\n ,[LastLogin]\r\n ,[ApprovedById]\r\n ,[ApprovedOn]\r\n ,[KeycloakUserId]\r\n\t , ua.AgencyId\r\n FROM [pims].[dbo].[Users] u\r\n INNER JOIN UserAgencies ua\r\n ON u.Id \u003d ua.UserId" - } - } - ], - "consumers": [ - { - "type": "databaseTransferConsumer" - }, - { - "type": "databaseTransferConsumer" - }, - { - "type": "databaseTransferConsumer" - }, - { - "type": "databaseTransferConsumer" - }, - { - "type": "databaseTransferConsumer" - }, - { - "type": "databaseTransferConsumer" - }, - { - "type": "databaseTransferConsumer" - }, - { - "type": "databaseTransferConsumer" - }, - { - "type": "databaseTransferConsumer" - }, - { - "type": "databaseTransferConsumer" - }, - { - "type": "databaseTransferConsumer" - }, - { - "type": "databaseTransferConsumer" - }, - { - "type": "databaseTransferConsumer" - }, - { - "type": "databaseTransferConsumer" - }, - { - "type": "databaseTransferConsumer" - }, - { - "type": "databaseTransferConsumer" - }, - { - "type": "databaseTransferConsumer" - }, - { - "type": "databaseTransferConsumer" - }, - { - "type": "databaseTransferConsumer" - }, - { - "type": "databaseTransferConsumer" - }, - { - "type": "databaseTransferConsumer" - } - ], - "configuration": { - "maxJobCount": 1.0, - "showFinalMessage": true, - "DatabaseTransferProducer": { - "extractType": "SEGMENTS", - "segmentSize": 100.0, - "fetchSize": 10000.0, - "openNewConnections": false, - "queryRowCount": false, - "selectedColumnsOnly": false, - "selectedRowsOnly": false - }, - "DatabaseTransferConsumer": { - "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", - "openNewConnections": true, - "useTransactions": true, - "commitAfterRows": 1000.0, - "useMultiRowInsert": false, - "multiRowInsertBatch": 500.0, - "skipBindValues": false, - "disableUsingBatches": false, - "ignoreDuplicateRows": false, - "transferAutoGeneratedColumns": true, - "disableReferentialIntegrity": false, - "useBulkLoad": true, - "truncateBeforeLoad": false, - "openTableOnFinish": true, - "mappings": { - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Roles": { - "targetName": "roles", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "\"Id\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - }, - "Name": { - "targetName": "\"Name\"", - "mappingType": "existing" - }, - "isdisabled": { - "targetName": "\"IsDisabled\"", - "mappingType": "existing" - }, - "sortorder": { - "targetName": "\"SortOrder\"", - "mappingType": "existing" - }, - "keycloakgroupid": { - "targetName": "\"KeycloakGroupId\"", - "mappingType": "existing" - }, - "description": { - "targetName": "\"Description\"", - "mappingType": "existing" - }, - "ispublic": { - "targetName": "\"IsPublic\"", - "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Claims": { - "targetName": "claims", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "\"Id\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - }, - "Name": { - "targetName": "\"Name\"", - "mappingType": "existing" - }, - "keycloakroleid": { - "targetName": "\"KeycloakRoleId\"", - "mappingType": "existing" - }, - "description": { - "targetName": "\"Description\"", - "mappingType": "existing" - }, - "isdisabled": { - "targetName": "\"IsDisabled\"", - "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/RoleClaims": { - "targetName": "role_claims", - "mappingType": "existing", - "attributes": { - "roleid": { - "targetName": "\"RoleId\"", - "mappingType": "existing" - }, - "claimid": { - "targetName": "\"ClaimId\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Agencies": { - "targetName": "agencies", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "\"Id\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - }, - "Name": { - "targetName": "\"Name\"", - "mappingType": "existing" - }, - "isdisabled": { - "targetName": "\"IsDisabled\"", - "mappingType": "existing" - }, - "sortorder": { - "targetName": "\"SortOrder\"", - "mappingType": "existing" - }, - "code": { - "targetName": "\"Code\"", - "mappingType": "existing" - }, - "description": { - "targetName": "\"Description\"", - "mappingType": "existing" - }, - "parentid": { - "targetName": "\"ParentId\"", - "mappingType": "existing" - }, - "email": { - "targetName": "\"Email\"", - "mappingType": "existing" - }, - "sendemail": { - "targetName": "\"SendEmail\"", - "mappingType": "existing" - }, - "addressto": { - "targetName": "\"AddressTo\"", - "mappingType": "existing" - }, - "ccemail": { - "targetName": "\"CCEmail\"", - "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/BuildingConstructionTypes": { - "targetName": "building_construction_types", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "\"Id\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - }, - "Name": { - "targetName": "\"Name\"", - "mappingType": "existing" - }, - "isdisabled": { - "targetName": "\"IsDisabled\"", - "mappingType": "existing" - }, - "sortorder": { - "targetName": "\"SortOrder\"", - "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/BuildingOccupantTypes": { - "targetName": "building_occupant_types", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "\"Id\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - }, - "Name": { - "targetName": "\"Name\"", - "mappingType": "existing" - }, - "isdisabled": { - "targetName": "\"IsDisabled\"", - "mappingType": "existing" - }, - "sortorder": { - "targetName": "\"SortOrder\"", - "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/BuildingPredominateUses": { - "targetName": "building_predominate_uses", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "\"Id\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - }, - "Name": { - "targetName": "\"Name\"", - "mappingType": "existing" - }, - "isdisabled": { - "targetName": "\"IsDisabled\"", - "mappingType": "existing" - }, - "sortorder": { - "targetName": "\"SortOrder\"", - "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/NotificationTemplates": { - "targetName": "notification_templates", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "\"Id\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - }, - "Name": { - "targetName": "\"Name\"", - "mappingType": "existing" - }, - "description": { - "targetName": "\"Description\"", - "mappingType": "existing" - }, - "To": { - "targetName": "\"To\"", - "mappingType": "existing" - }, - "cc": { - "targetName": "\"Cc\"", - "mappingType": "existing" - }, - "bcc": { - "targetName": "\"Bcc\"", - "mappingType": "existing" - }, - "audience": { - "targetName": "\"Audience\"", - "mappingType": "existing" - }, - "Encoding": { - "targetName": "\"Encoding\"", - "mappingType": "existing" - }, - "bodytype": { - "targetName": "\"BodyType\"", - "mappingType": "existing" - }, - "priority": { - "targetName": "\"Priority\"", - "mappingType": "existing" - }, - "subject": { - "targetName": "\"Subject\"", - "mappingType": "existing" - }, - "body": { - "targetName": "\"Body\"", - "mappingType": "existing" - }, - "isdisabled": { - "targetName": "\"IsDisabled\"", - "mappingType": "existing" - }, - "tag": { - "targetName": "\"Tag\"", - "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectNumbers": { - "targetName": "project_numbers", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "\"Id\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectRisks": { - "targetName": "project_risks", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "\"Id\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - }, - "Name": { - "targetName": "\"Name\"", - "mappingType": "existing" - }, - "isdisabled": { - "targetName": "\"IsDisabled\"", - "mappingType": "existing" - }, - "sortorder": { - "targetName": "\"SortOrder\"", - "mappingType": "existing" - }, - "code": { - "targetName": "\"Code\"", - "mappingType": "existing" - }, - "description": { - "targetName": "\"Description\"", - "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectStatus": { - "targetName": "project_status", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "\"Id\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - }, - "Name": { - "targetName": "\"Name\"", - "mappingType": "existing" - }, - "isdisabled": { - "targetName": "\"IsDisabled\"", - "mappingType": "existing" - }, - "sortorder": { - "targetName": "\"SortOrder\"", - "mappingType": "existing" - }, - "code": { - "targetName": "\"Code\"", - "mappingType": "existing" - }, - "groupname": { - "targetName": "\"GroupName\"", - "mappingType": "existing" - }, - "description": { - "targetName": "\"Description\"", - "mappingType": "existing" - }, - "ismilestone": { - "targetName": "\"IsMilestone\"", - "mappingType": "existing" - }, - "isterminal": { - "targetName": "\"IsTerminal\"", - "mappingType": "existing" - }, - "route": { - "targetName": "\"Route\"", - "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/PropertyClassifications": { - "targetName": "property_classifications", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "\"Id\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - }, - "Name": { - "targetName": "\"Name\"", - "mappingType": "existing" - }, - "isdisabled": { - "targetName": "\"IsDisabled\"", - "mappingType": "existing" - }, - "sortorder": { - "targetName": "\"SortOrder\"", - "mappingType": "existing" - }, - "isvisible": { - "targetName": "\"IsVisible\"", - "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/PropertyTypes": { - "targetName": "property_types", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "\"Id\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - }, - "Name": { - "targetName": "\"Name\"", - "mappingType": "existing" - }, - "isdisabled": { - "targetName": "\"IsDisabled\"", - "mappingType": "existing" - }, - "sortorder": { - "targetName": "\"SortOrder\"", - "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Provinces": { - "targetName": "provinces", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "\"Id\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - }, - "Name": { - "targetName": "\"Name\"", - "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Tasks": { - "targetName": "tasks", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "\"Id\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - }, - "Name": { - "targetName": "\"Name\"", - "mappingType": "existing" - }, - "isdisabled": { - "targetName": "\"IsDisabled\"", - "mappingType": "existing" - }, - "sortorder": { - "targetName": "\"SortOrder\"", - "mappingType": "existing" - }, - "description": { - "targetName": "\"Description\"", - "mappingType": "existing" - }, - "isoptional": { - "targetName": "\"IsOptional\"", - "mappingType": "existing" - }, - "statusid": { - "targetName": "\"StatusId\"", - "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/TierLevels": { - "targetName": "tier_levels", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "\"Id\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - }, - "Name": { - "targetName": "\"Name\"", - "mappingType": "existing" - }, - "isdisabled": { - "targetName": "\"IsDisabled\"", - "mappingType": "existing" - }, - "sortorder": { - "targetName": "\"SortOrder\"", - "mappingType": "existing" - }, - "description": { - "targetName": "\"Description\"", - "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Workflows": { - "targetName": "workflows", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "\"Id\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - }, - "Name": { - "targetName": "\"Name\"", - "mappingType": "existing" - }, - "isdisabled": { - "targetName": "\"IsDisabled\"", - "mappingType": "existing" - }, - "sortorder": { - "targetName": "\"SortOrder\"", - "mappingType": "existing" - }, - "code": { - "targetName": "\"Code\"", - "mappingType": "existing" - }, - "description": { - "targetName": "\"Description\"", - "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/WorkflowProjectStatus": { - "targetName": "workflow_project_status", - "mappingType": "existing", - "attributes": { - "workflowid": { - "targetName": "\"WorkflowId\"", - "mappingType": "existing" - }, - "statusid": { - "targetName": "\"StatusId\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - }, - "sortorder": { - "targetName": "\"SortOrder\"", - "mappingType": "existing" - }, - "isoptional": { - "targetName": "\"IsOptional\"", - "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Projects": { - "targetName": "projects", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "\"Id\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - }, - "projectnumber": { - "targetName": "\"ProjectNumber\"", - "mappingType": "existing" - }, - "Name": { - "targetName": "\"Name\"", - "mappingType": "existing" - }, - "workflowid": { - "targetName": "\"WorkflowId\"", - "mappingType": "existing" - }, - "manager": { - "targetName": "\"Manager\"", - "mappingType": "existing" - }, - "reportedfiscalyear": { - "targetName": "\"ReportedFiscalYear\"", - "mappingType": "existing" - }, - "actualfiscalyear": { - "targetName": "\"ActualFiscalYear\"", - "mappingType": "existing" - }, - "agencyid": { - "targetName": "\"AgencyId\"", - "mappingType": "existing" - }, - "statusid": { - "targetName": "\"StatusId\"", - "mappingType": "existing" - }, - "description": { - "targetName": "\"Description\"", - "mappingType": "existing" - }, - "tierlevelid": { - "targetName": "\"TierLevelId\"", - "mappingType": "existing" - }, - "riskid": { - "targetName": "\"RiskId\"", - "mappingType": "existing" - }, - "metadata": { - "targetName": "\"Metadata\"", - "mappingType": "existing" - }, - "submittedon": { - "targetName": "\"SubmittedOn\"", - "mappingType": "existing" - }, - "approvedon": { - "targetName": "\"ApprovedOn\"", - "mappingType": "existing" - }, - "deniedon": { - "targetName": "\"DeniedOn\"", - "mappingType": "existing" - }, - "cancelledon": { - "targetName": "\"CancelledOn\"", - "mappingType": "existing" - }, - "completedon": { - "targetName": "\"CompletedOn\"", - "mappingType": "existing" - }, - "netbook": { - "targetName": "\"NetBook\"", - "mappingType": "existing" - }, - "market": { - "targetName": "\"Market\"", - "mappingType": "existing" - }, - "assessed": { - "targetName": "\"Assessed\"", - "mappingType": "existing" - }, - "appraised": { - "targetName": "\"Appraised\"", - "mappingType": "existing" - }, - "projecttype": { - "targetName": "\"ProjectType\"", - "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [Id]\r\n ,[CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Name]\r\n FROM [pims].[dbo].[AdministrativeAreas]\r\n WHERE Name LIKE \u0027%District%\u0027 OR Name LIKE \u0027%Stikine Region%\u0027": { - "targetName": "regional_districts", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "\"Id\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing", - "transformer": "constant", - "transformerProperties": { - "constant": "00000000-0000-0000-0000-000000000000" - }, - "transformerPropertiesNames": "constant" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "Name": { - "targetName": "\"Name\"", - "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT TOP (1000) [Id]\r\n ,u.[CreatedById]\r\n ,u.[CreatedOn]\r\n ,u.[UpdatedById]\r\n ,u.[UpdatedOn]\r\n ,[Username]\r\n ,[DisplayName]\r\n ,[FirstName]\r\n ,[MiddleName]\r\n ,[LastName]\r\n ,[Email]\r\n ,[Position]\r\n ,[IsDisabled]\r\n ,[EmailVerified]\r\n ,[Note]\r\n ,[IsSystem]\r\n ,[LastLogin]\r\n ,[ApprovedById]\r\n ,[ApprovedOn]\r\n ,[KeycloakUserId]\r\n\t , ua.AgencyId\r\n FROM [pims].[dbo].[Users] u\r\n INNER JOIN UserAgencies ua\r\n ON u.Id \u003d ua.UserId": { - "targetName": "users", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "\"Id\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "username": { - "targetName": "\"Username\"", - "mappingType": "existing" - }, - "displayname": { - "targetName": "\"DisplayName\"", - "mappingType": "existing" - }, - "firstname": { - "targetName": "\"FirstName\"", - "mappingType": "existing" - }, - "middlename": { - "targetName": "\"MiddleName\"", - "mappingType": "existing" - }, - "lastname": { - "targetName": "\"LastName\"", - "mappingType": "existing" - }, - "email": { - "targetName": "\"Email\"", - "mappingType": "existing" - }, - "Position": { - "targetName": "\"Position\"", - "mappingType": "existing" - }, - "isdisabled": { - "targetName": "\"IsDisabled\"", - "mappingType": "existing" - }, - "emailverified": { - "targetName": "\"EmailVerified\"", - "mappingType": "existing" - }, - "note": { - "targetName": "\"Note\"", - "mappingType": "existing" - }, - "issystem": { - "targetName": "\"IsSystem\"", - "mappingType": "existing" - }, - "lastlogin": { - "targetName": "\"LastLogin\"", - "mappingType": "existing" - }, - "approvedbyid": { - "targetName": "\"ApprovedById\"", - "mappingType": "existing" - }, - "approvedon": { - "targetName": "\"ApprovedOn\"", - "mappingType": "existing" - }, - "keycloakuserid": { - "targetName": "\"KeycloakUserId\"", - "mappingType": "existing" - }, - "agencyid": { - "targetName": "\"AgencyId\"", - "mappingType": "existing" - } - } - } - } - }, - "producer": "database_producer", - "consumer": "database_consumer" - } - } - }, - "4ae69b40-4031-423a-a3f9-293ffdae2c07": { - "task": "dataExport", - "label": "Export Parcel#2", - "description": "testing", - "taskFolder": "Testing", - "createTime": "202401101407", - "updateTime": "202401101407", - "state": { - "producers": [ - { - "type": "databaseTransferProducer", - "location": { - "type": "query", - "project": "General", - "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", - "defaultCatalog": "pims", - "defaultSchema": "dbo", - "query": "SELECT p.[Id],\r\n p.[CreatedById],\r\n p.[CreatedOn],\r\n p.[UpdatedById],\r\n p.[UpdatedOn],\r\n p.[Name],\r\n p.[Description],\r\n p.[ClassificationId],\r\n p.[AgencyId],\r\n p.[IsSensitive],\r\n p.[IsVisibleToOtherAgencies],\r\n p.[PID],\r\n p.[PIN],\r\n p.[LandArea],\r\n p.[LandLegalDescription],\r\n p.[Zoning],\r\n p.[ZoningPotential],\r\n p.[NotOwned],\r\n\tCONVERT(VARCHAR(40), CAST(Location.Long AS DECIMAL(18, 14))) + \u0027, \u0027 + CONVERT(VARCHAR(40), CAST(Location.Lat AS DECIMAL(18, 14))) AS Location,\r\n\taa.Id as AdministrativeAreaId,\r\n\ta.Address1, \r\n\ta.Postal\r\nFROM \r\n [pims].[dbo].[Parcels] p\r\n\tINNER JOIN Addresses a\r\n\tON p.AddressId \u003d a.Id\r\n\tINNER JOIN AdministrativeAreas aa\r\n\tON aa.Name \u003d a.AdministrativeArea\r\nWHERE aa.Id NOT IN (\r\n\r\nSELECT Id\r\nFROM AdministrativeAreas a\r\nWHERE a.Name NOT IN (\r\nSELECT [Name]\r\n FROM [pims].[dbo].[AdminAreaswithRegionalDistricts]\r\n )\r\n and a.Name NOT LIKE \u0027%District%\u0027 and a.Name NOT LIKE \u0027%Test%\u0027\r\n) AND aa.Id NOT IN (94, 78, 288, 2478, 2479)\r\nAND aa.Id \u003c\u003d 500 -- limit it so we\u0027re not importing parcels whose admin area is a regional district" - } - } - ], - "consumers": [ - { - "type": "databaseTransferConsumer" - } - ], - "configuration": { - "maxJobCount": 1.0, - "showFinalMessage": true, - "DatabaseTransferProducer": { - "extractType": "SEGMENTS", - "segmentSize": 100.0, - "fetchSize": 10000.0, - "openNewConnections": false, - "queryRowCount": false, - "selectedColumnsOnly": false, - "selectedRowsOnly": false - }, - "DatabaseTransferConsumer": { - "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", - "openNewConnections": true, - "useTransactions": true, - "commitAfterRows": 1000.0, - "useMultiRowInsert": false, - "multiRowInsertBatch": 500.0, - "skipBindValues": false, - "disableUsingBatches": true, - "ignoreDuplicateRows": false, - "transferAutoGeneratedColumns": true, - "disableReferentialIntegrity": false, - "useBulkLoad": false, - "truncateBeforeLoad": false, - "openTableOnFinish": true, - "mappings": { - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT p.[Id],\r\n p.[CreatedById],\r\n p.[CreatedOn],\r\n p.[UpdatedById],\r\n p.[UpdatedOn],\r\n p.[Name],\r\n p.[Description],\r\n p.[ClassificationId],\r\n p.[AgencyId],\r\n p.[IsSensitive],\r\n p.[IsVisibleToOtherAgencies],\r\n p.[PID],\r\n p.[PIN],\r\n p.[LandArea],\r\n p.[LandLegalDescription],\r\n p.[Zoning],\r\n p.[ZoningPotential],\r\n p.[NotOwned],\r\n\tCONVERT(VARCHAR(40), CAST(Location.Long AS DECIMAL(18, 14))) + \u0027, \u0027 + CONVERT(VARCHAR(40), CAST(Location.Lat AS DECIMAL(18, 14))) AS Location,\r\n\taa.Id as AdministrativeAreaId,\r\n\ta.Address1, \r\n\ta.Postal\r\nFROM \r\n [pims].[dbo].[Parcels] p\r\n\tINNER JOIN Addresses a\r\n\tON p.AddressId \u003d a.Id\r\n\tINNER JOIN AdministrativeAreas aa\r\n\tON aa.Name \u003d a.AdministrativeArea\r\nWHERE aa.Id NOT IN (\r\n\r\nSELECT Id\r\nFROM AdministrativeAreas a\r\nWHERE a.Name NOT IN (\r\nSELECT [Name]\r\n FROM [pims].[dbo].[AdminAreaswithRegionalDistricts]\r\n )\r\n and a.Name NOT LIKE \u0027%District%\u0027 and a.Name NOT LIKE \u0027%Test%\u0027\r\n) AND aa.Id NOT IN (94, 78, 288, 2478, 2479)\r\nAND aa.Id \u003c\u003d 500 -- limit it so we\u0027re not importing parcels whose admin area is a regional district": { - "targetName": "parcels", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "id", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "createdbyid", - "mappingType": "existing" - }, - "createdon": { - "targetName": "createdon", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "updatedbyid", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "updatedon", - "mappingType": "existing" - }, - "Name": { - "targetName": "Name", - "mappingType": "existing" - }, - "description": { - "targetName": "description", - "mappingType": "existing" - }, - "classificationid": { - "targetName": "classificationid", - "mappingType": "existing" - }, - "agencyid": { - "targetName": "agencyid", - "mappingType": "existing" - }, - "issensitive": { - "targetName": "issensitive", - "mappingType": "existing" - }, - "isvisibletootheragencies": { - "targetName": "isvisibletootheragencies", - "mappingType": "existing" - }, - "pid": { - "targetName": "pid", - "mappingType": "existing" - }, - "pin": { - "targetName": "pin", - "mappingType": "existing" - }, - "landarea": { - "targetName": "landarea", - "mappingType": "existing" - }, - "landlegaldescription": { - "targetName": "landlegaldescription", - "mappingType": "existing" - }, - "zoning": { - "targetName": "zoning", - "mappingType": "existing" - }, - "zoningpotential": { - "targetName": "zoningpotential", - "mappingType": "existing" - }, - "notowned": { - "targetName": "notowned", - "mappingType": "existing" - }, - "Location": { - "targetName": "Location", - "mappingType": "existing" - }, - "administrativeareaid": { - "targetName": "administrativeareaid", - "mappingType": "existing" - }, - "address1": { - "targetName": "address1", - "mappingType": "existing" - }, - "postal": { - "targetName": "postal", - "mappingType": "existing" - } - } - } - } - }, - "producer": "database_producer", - "consumer": "database_consumer" - } - } - }, - "ed9a5934-5e7d-49ee-8542-f94a23eacbe3": { - "task": "dataExport", - "label": "AdminAreasExport", - "description": "AdminAreasExport", - "taskFolder": "Testing", - "createTime": "202401151014", - "updateTime": "202401151014", - "state": { - "producers": [ - { - "type": "databaseTransferProducer", - "location": { - "type": "query", - "project": "General", - "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", - "defaultCatalog": "pims", - "defaultSchema": "dbo", - "query": "\r\n SELECT b.Id, CAST(\u00272023-01-17 17:58:40.246\u0027 AS datetime)\r\n as CreatedOn, null as UpdatedOn, ar.Name, 0 as IsDisabled, 0 as SortOrder, null as Abbreviation, null as BoundaryType, \u002700000000-0000-0000-0000-000000000000\u0027 as CreatedById, null as UpdatedById, a.Id AS RD_Id\r\n FROM [pims].[dbo].[AdminAreaswithRegionalDistricts] ar\r\n LEFT OUTER JOIN AdministrativeAreas a\r\n ON ar.RD_NAME \u003d a.Name\r\n LEFT OUTER JOIN AdministrativeAreas b\r\n ON b.Name \u003d ar.Name\r\n WHERE ar.RD_NAME \u003c\u003e \u00270\u0027 and b.Id \u003e\u003d 1\r\n ORDER BY ar.Name\r\n" - } - } - ], - "consumers": [ - { - "type": "databaseTransferConsumer" - } - ], - "configuration": { - "maxJobCount": 1.0, - "showFinalMessage": true, - "DatabaseTransferProducer": { - "extractType": "SEGMENTS", - "segmentSize": 1000.0, - "fetchSize": 10000.0, - "openNewConnections": false, - "queryRowCount": false, - "selectedColumnsOnly": false, - "selectedRowsOnly": false - }, - "DatabaseTransferConsumer": { - "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", - "openNewConnections": true, - "useTransactions": true, - "commitAfterRows": 1000.0, - "useMultiRowInsert": false, - "multiRowInsertBatch": 500.0, - "skipBindValues": false, - "disableUsingBatches": false, - "ignoreDuplicateRows": false, - "transferAutoGeneratedColumns": true, - "disableReferentialIntegrity": false, - "useBulkLoad": true, - "truncateBeforeLoad": false, - "openTableOnFinish": true, - "mappings": { - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\n SELECT b.Id, CAST(\u00272023-01-17 17:58:40.246\u0027 AS datetime)\r\n as CreatedOn, null as UpdatedOn, ar.Name, 0 as IsDisabled, 0 as SortOrder, null as Abbreviation, null as BoundaryType, \u002700000000-0000-0000-0000-000000000000\u0027 as CreatedById, null as UpdatedById, a.Id AS RD_Id\r\n FROM [pims].[dbo].[AdminAreaswithRegionalDistricts] ar\r\n LEFT OUTER JOIN AdministrativeAreas a\r\n ON ar.RD_NAME \u003d a.Name\r\n LEFT OUTER JOIN AdministrativeAreas b\r\n ON b.Name \u003d ar.Name\r\n WHERE ar.RD_NAME \u003c\u003e \u00270\u0027 and b.Id \u003e\u003d 1\r\n ORDER BY ar.Name\r\n": { - "targetName": "administrative_areas", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "id", - "mappingType": "existing" - }, - "createdon": { - "targetName": "createdon", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "updatedon", - "mappingType": "existing" - }, - "Name": { - "targetName": "Name", - "mappingType": "existing" - }, - "isdisabled": { - "targetName": "isdisabled", - "mappingType": "existing" - }, - "sortorder": { - "targetName": "sortorder", - "mappingType": "existing" - }, - "abbreviation": { - "targetName": "abbreviation", - "mappingType": "existing" - }, - "boundarytype": { - "targetName": "boundarytype", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "createdbyid", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "updatedbyid", - "mappingType": "existing" - }, - "rd_id": { - "targetName": "\"RegionalDistrictId\"", - "mappingType": "existing" - } - } - } - } - }, - "producer": "database_producer", - "consumer": "database_consumer" - } - } - }, - "49fa42d1-ee3a-4f6c-a1ad-a6ff2f2b0ccf": { - "task": "dataExport", - "label": "Parcels Export", - "description": "testing", - "taskFolder": "Testing", - "createTime": "202401191634", - "updateTime": "202401191634", - "state": { - "producers": [ - { - "type": "databaseTransferProducer", - "location": { - "type": "query", - "project": "General", - "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", - "defaultCatalog": "pims", - "defaultSchema": "dbo", - "query": "\r\nSELECT p.[Id],\r\n\t CASE \r\n\t\tWHEN p.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE p.[CreatedById]\r\n\t END AS [CreatedById],\r\n p.[CreatedOn],\r\n p.[UpdatedById],\r\n p.[UpdatedOn],\r\n p.[Name],\r\n p.[Description],\r\n p.[ClassificationId],\r\n p.[AgencyId],\r\n p.[IsSensitive],\r\n p.[IsVisibleToOtherAgencies],\r\n p.[PID],\r\n p.[PIN],\r\n p.[LandArea],\r\n p.[LandLegalDescription],\r\n p.[Zoning],\r\n p.[ZoningPotential],\r\n p.[NotOwned],\r\n\tCONVERT(VARCHAR(40), CAST(Location.Long AS DECIMAL(18, 14))) + \u0027, \u0027 + CONVERT(VARCHAR(40), CAST(Location.Lat AS DECIMAL(18, 14))) AS Location,\r\n CASE \r\n WHEN a.AdministrativeArea \u003d \u0027The Corporation of the City of Nelson\u0027 THEN 188\r\n WHEN a.AdministrativeArea \u003d \u0027Township of Langley\u0027 THEN 150\r\n WHEN a.AdministrativeArea \u003d \u0027District of North Vancouver\u0027 THEN 196\r\n WHEN a.AdministrativeArea \u003d \u0027Coombs\u0027 THEN 483\r\n WHEN a.AdministrativeArea \u003d \u0027Brookmere\u0027 THEN 481\r\n WHEN a.AdministrativeArea \u003d \u0027Thornhill\u0027 THEN 501\r\n WHEN a.AdministrativeArea \u003d \u0027Two Mile\u0027 THEN 502\r\n WHEN a.AdministrativeArea \u003d \u0027Crofton\u0027 THEN 484\r\n WHEN a.AdministrativeArea \u003d \u0027East Sooke\u0027 THEN 485\r\n WHEN a.AdministrativeArea \u003d \u0027Mudge Island\u0027 THEN 492\r\n WHEN a.AdministrativeArea \u003d \u0027Coal Harbour\u0027 THEN 482\r\n WHEN a.AdministrativeArea \u003d \u0027Miworth\u0027 THEN 490\r\n WHEN a.AdministrativeArea \u003d \u0027Lake Errock\u0027 THEN 489\r\n WHEN a.AdministrativeArea \u003d \u0027Black Creek\u0027 THEN 479\r\n WHEN a.AdministrativeArea \u003d \u0027Whaletown\u0027 THEN 504\r\n WHEN a.AdministrativeArea \u003d \u0027Quathiaski Cove\u0027 THEN 494\r\n WHEN a.AdministrativeArea \u003d \u0027Big Bay in Stuart Island\u0027 THEN 478\r\n WHEN a.AdministrativeArea \u003d \u0027Surge Narrows in Read Island\u0027 THEN 500\r\n WHEN a.AdministrativeArea \u003d \u0027Rock Bay in Sayward\u0027 THEN 497\r\n WHEN a.AdministrativeArea \u003d \u0027Granite Bay in Quadra Island\u0027 THEN 487\r\n WHEN a.AdministrativeArea \u003d \u0027Moberly Lake\u0027 THEN 491\r\n WHEN a.AdministrativeArea \u003d \u0027Quatsino\u0027 THEN 495\r\n WHEN a.AdministrativeArea \u003d \u0027Bouchie Lake\u0027 THEN 480\r\n WHEN a.AdministrativeArea \u003d \u0027West Lake\u0027 THEN 503\r\n WHEN a.AdministrativeArea \u003d \u0027Salmon Valley\u0027 THEN 498\t\t\r\n WHEN a.AdministrativeArea \u003d \u0027Red Rock\u0027 THEN 496\r\n WHEN a.AdministrativeArea \u003d \u0027Stoner\u0027 THEN 499\r\n WHEN a.AdministrativeArea \u003d \u0027Pineview FFG\u0027 THEN 493\r\n WHEN a.AdministrativeArea \u003d \u0027Wonowon\u0027 THEN 506\r\n WHEN a.AdministrativeArea \u003d \u0027Halfway River\u0027 THEN 488\r\n WHEN a.AdministrativeArea \u003d \u0027Giscome\u0027 THEN 486\r\n WHEN a.AdministrativeArea \u003d \u0027Willow River\u0027 THEN 505\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lower Nicola\u0027 THEN 314\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Belcarra\u0027 THEN 425\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Tsawwassen\u0027 THEN 315\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Anmore\u0027 THEN 432\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lake Cowichan\u0027 THEN 442\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027North Cowichan\u0027 THEN 450\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Port Edward\u0027 THEN 347\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Spallumcheen\u0027 THEN 318\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Jumbo Glacier Mountain Resort Municipality\u0027 THEN 438\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Kent\u0027 THEN 439\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Highlands\u0027 THEN 348\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Slocan\u0027 THEN 380\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Warfield\u0027 THEN 448\r\n ELSE aa.Id \r\n END AS AdministrativeAreaId, \r\n\ta.AdministrativeArea,\r\n\ta.Address1, \r\n\ta.Postal,\r\n\tpp.ParcelId as ParentID,\r\n\t0 as PropertyTypeID\r\nFROM \r\n [pims].[dbo].[Parcels] p\r\n\tINNER JOIN Addresses a\r\n\tON p.AddressId \u003d a.Id\r\n\tLEFT OUTER JOIN AdministrativeAreas aa\r\n\tON aa.Name \u003d a.AdministrativeArea\r\n    LEFT OUTER JOIN ParcelParcels pp\r\n    ON pp.SubdivisionId \u003d p.Id" - } - } - ], - "consumers": [ - { - "type": "databaseTransferConsumer" - } - ], - "configuration": { - "maxJobCount": 1, - "showFinalMessage": true, - "DatabaseTransferProducer": { - "extractType": "SEGMENTS", - "segmentSize": 1000, - "fetchSize": 10000, - "openNewConnections": false, - "queryRowCount": false, - "selectedColumnsOnly": false, - "selectedRowsOnly": false - }, - "DatabaseTransferConsumer": { - "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", - "openNewConnections": true, - "useTransactions": true, - "commitAfterRows": 1000, - "useMultiRowInsert": false, - "multiRowInsertBatch": 500, - "skipBindValues": false, - "disableUsingBatches": true, - "ignoreDuplicateRows": false, - "transferAutoGeneratedColumns": true, - "disableReferentialIntegrity": false, - "useBulkLoad": false, - "truncateBeforeLoad": false, - "openTableOnFinish": true, - "mappings": { - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT p.[Id],\r\n\t CASE \r\n\t\tWHEN p.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE p.[CreatedById]\r\n\t END AS [CreatedById],\r\n p.[CreatedOn],\r\n p.[UpdatedById],\r\n p.[UpdatedOn],\r\n p.[Name],\r\n p.[Description],\r\n p.[ClassificationId],\r\n p.[AgencyId],\r\n p.[IsSensitive],\r\n p.[IsVisibleToOtherAgencies],\r\n p.[PID],\r\n p.[PIN],\r\n p.[LandArea],\r\n p.[LandLegalDescription],\r\n p.[Zoning],\r\n p.[ZoningPotential],\r\n p.[NotOwned],\r\n\tCONVERT(VARCHAR(40), CAST(Location.Long AS DECIMAL(18, 14))) + \u0027, \u0027 + CONVERT(VARCHAR(40), CAST(Location.Lat AS DECIMAL(18, 14))) AS Location,\r\n CASE \r\n WHEN a.AdministrativeArea \u003d \u0027The Corporation of the City of Nelson\u0027 THEN 188\r\n WHEN a.AdministrativeArea \u003d \u0027Township of Langley\u0027 THEN 150\r\n WHEN a.AdministrativeArea \u003d \u0027District of North Vancouver\u0027 THEN 196\r\n WHEN a.AdministrativeArea \u003d \u0027Coombs\u0027 THEN 483\r\n WHEN a.AdministrativeArea \u003d \u0027Brookmere\u0027 THEN 481\r\n WHEN a.AdministrativeArea \u003d \u0027Thornhill\u0027 THEN 501\r\n WHEN a.AdministrativeArea \u003d \u0027Two Mile\u0027 THEN 502\r\n WHEN a.AdministrativeArea \u003d \u0027Crofton\u0027 THEN 484\r\n WHEN a.AdministrativeArea \u003d \u0027East Sooke\u0027 THEN 485\r\n WHEN a.AdministrativeArea \u003d \u0027Mudge Island\u0027 THEN 492\r\n WHEN a.AdministrativeArea \u003d \u0027Coal Harbour\u0027 THEN 482\r\n WHEN a.AdministrativeArea \u003d \u0027Miworth\u0027 THEN 490\r\n WHEN a.AdministrativeArea \u003d \u0027Lake Errock\u0027 THEN 489\r\n WHEN a.AdministrativeArea \u003d \u0027Black Creek\u0027 THEN 479\r\n WHEN a.AdministrativeArea \u003d \u0027Whaletown\u0027 THEN 504\r\n WHEN a.AdministrativeArea \u003d \u0027Quathiaski Cove\u0027 THEN 494\r\n WHEN a.AdministrativeArea \u003d \u0027Big Bay in Stuart Island\u0027 THEN 478\r\n WHEN a.AdministrativeArea \u003d \u0027Surge Narrows in Read Island\u0027 THEN 500\r\n WHEN a.AdministrativeArea \u003d \u0027Rock Bay in Sayward\u0027 THEN 497\r\n WHEN a.AdministrativeArea \u003d \u0027Granite Bay in Quadra Island\u0027 THEN 487\r\n WHEN a.AdministrativeArea \u003d \u0027Moberly Lake\u0027 THEN 491\r\n WHEN a.AdministrativeArea \u003d \u0027Quatsino\u0027 THEN 495\r\n WHEN a.AdministrativeArea \u003d \u0027Bouchie Lake\u0027 THEN 480\r\n WHEN a.AdministrativeArea \u003d \u0027West Lake\u0027 THEN 503\r\n WHEN a.AdministrativeArea \u003d \u0027Salmon Valley\u0027 THEN 498\t\t\r\n WHEN a.AdministrativeArea \u003d \u0027Red Rock\u0027 THEN 496\r\n WHEN a.AdministrativeArea \u003d \u0027Stoner\u0027 THEN 499\r\n WHEN a.AdministrativeArea \u003d \u0027Pineview FFG\u0027 THEN 493\r\n WHEN a.AdministrativeArea \u003d \u0027Wonowon\u0027 THEN 506\r\n WHEN a.AdministrativeArea \u003d \u0027Halfway River\u0027 THEN 488\r\n WHEN a.AdministrativeArea \u003d \u0027Giscome\u0027 THEN 486\r\n WHEN a.AdministrativeArea \u003d \u0027Willow River\u0027 THEN 505\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lower Nicola\u0027 THEN 314\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Belcarra\u0027 THEN 425\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Tsawwassen\u0027 THEN 315\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Anmore\u0027 THEN 432\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lake Cowichan\u0027 THEN 442\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027North Cowichan\u0027 THEN 450\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Port Edward\u0027 THEN 347\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Spallumcheen\u0027 THEN 318\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Jumbo Glacier Mountain Resort Municipality\u0027 THEN 438\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Kent\u0027 THEN 439\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Highlands\u0027 THEN 348\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Slocan\u0027 THEN 380\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Warfield\u0027 THEN 448\r\n ELSE aa.Id \r\n END AS AdministrativeAreaId, \r\n\ta.AdministrativeArea,\r\n\ta.Address1, \r\n\ta.Postal,\r\n\tpp.ParcelId as ParentID,\r\n\t0 as PropertyTypeID\r\nFROM \r\n [pims].[dbo].[Parcels] p\r\n\tINNER JOIN Addresses a\r\n\tON p.AddressId \u003d a.Id\r\n\tLEFT OUTER JOIN AdministrativeAreas aa\r\n\tON aa.Name \u003d a.AdministrativeArea\r\n    LEFT OUTER JOIN ParcelParcels pp\r\n    ON pp.SubdivisionId \u003d p.Id": { - "targetName": "parcel", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "id", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "createdbyid", - "mappingType": "existing" - }, - "createdon": { - "targetName": "createdon", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "updatedbyid", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "updatedon", - "mappingType": "existing" - }, - "Name": { - "targetName": "Name", - "mappingType": "existing" - }, - "description": { - "targetName": "description", - "mappingType": "existing" - }, - "classificationid": { - "targetName": "classificationid", - "mappingType": "existing" - }, - "agencyid": { - "targetName": "agencyid", - "mappingType": "existing" - }, - "issensitive": { - "targetName": "issensitive", - "mappingType": "existing" - }, - "isvisibletootheragencies": { - "targetName": "isvisibletootheragencies", - "mappingType": "existing" - }, - "pid": { - "targetName": "pid", - "mappingType": "existing" - }, - "pin": { - "targetName": "pin", - "mappingType": "existing" - }, - "landarea": { - "targetName": "landarea", - "mappingType": "existing" - }, - "landlegaldescription": { - "targetName": "landlegaldescription", - "mappingType": "existing" - }, - "zoning": { - "targetName": "zoning", - "mappingType": "existing" - }, - "zoningpotential": { - "targetName": "zoningpotential", - "mappingType": "existing" - }, - "notowned": { - "targetName": "notowned", - "mappingType": "existing" - }, - "Location": { - "targetName": "Location", - "mappingType": "existing" - }, - "administrativeareaid": { - "targetName": "administrativeareaid", - "mappingType": "existing" - }, - "administrativearea": { - "targetName": "administrativearea", - "mappingType": "existing" - }, - "address1": { - "targetName": "address1", - "mappingType": "existing" - }, - "postal": { - "targetName": "postal", - "mappingType": "existing" - }, - "parentid": { - "targetName": "parentid", - "mappingType": "existing" - }, - "propertytypeid": { - "targetName": "propertytypeid", - "mappingType": "existing" - } - } - } - } - }, - "producer": "database_producer", - "consumer": "database_consumer" - } - } - }, - "c711aced-f90c-449c-85b6-3a09df40c1a2": { - "task": "dataExport", - "label": "BuildingsExport", - "description": "", - "taskFolder": "Testing", - "createTime": "202401191638", - "updateTime": "202401191638", - "state": { - "producers": [ - { - "type": "databaseTransferProducer", - "location": { - "type": "query", - "project": "General", - "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", - "query": "SELECT p.[Id],\r\n\tCASE \r\n\t WHEN p.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t ELSE p.[CreatedById]\r\n\tEND AS [CreatedById],\r\n p.[CreatedOn],\r\n p.[UpdatedById],\r\n p.[UpdatedOn],\r\n p.[Name],\r\n p.[Description],\r\n p.[ClassificationId],\r\n p.BuildingConstructionTypeId,\r\n p.[AgencyId],\r\n p.[IsSensitive],\r\n p.[IsVisibleToOtherAgencies],\r\n\tp.BuildingFloorCount,\r\n\tp.BuildingPredominateUseId,\r\n\tp.BuildingTenancy,\r\n\tp.RentableArea,\r\n\tp.BuildingOccupantTypeId,\r\n\tp.LeaseExpiry,\r\n\tp.OccupantName,\r\n\tp.TransferLeaseOnSale,\r\n\tp.BuildingTenancyUpdatedOn,\r\n\tp.EncumbranceReason,\r\n\tp.LeasedLandMetadata,\r\n\tp.TotalArea,\r\n\tCONVERT(VARCHAR(40), CAST(Location.Long AS DECIMAL(18, 14))) + \u0027, \u0027 + CONVERT(VARCHAR(40), CAST(Location.Lat AS DECIMAL(18, 14))) AS Location,\r\n\tCASE \r\n WHEN a.AdministrativeArea \u003d \u0027The Corporation of the City of Nelson\u0027 THEN 188\r\n WHEN a.AdministrativeArea \u003d \u0027Township of Langley\u0027 THEN 150\r\n WHEN a.AdministrativeArea \u003d \u0027District of North Vancouver\u0027 THEN 196\r\n WHEN a.AdministrativeArea \u003d \u0027Coombs\u0027 THEN 483\r\n WHEN a.AdministrativeArea \u003d \u0027Brookmere\u0027 THEN 481\r\n WHEN a.AdministrativeArea \u003d \u0027Thornhill\u0027 THEN 501\r\n WHEN a.AdministrativeArea \u003d \u0027Two Mile\u0027 THEN 502\r\n WHEN a.AdministrativeArea \u003d \u0027Crofton\u0027 THEN 484\r\n WHEN a.AdministrativeArea \u003d \u0027East Sooke\u0027 THEN 485\r\n WHEN a.AdministrativeArea \u003d \u0027Mudge Island\u0027 THEN 492\r\n WHEN a.AdministrativeArea \u003d \u0027Coal Harbour\u0027 THEN 482\r\n WHEN a.AdministrativeArea \u003d \u0027Miworth\u0027 THEN 490\r\n WHEN a.AdministrativeArea \u003d \u0027Lake Errock\u0027 THEN 489\r\n WHEN a.AdministrativeArea \u003d \u0027Black Creek\u0027 THEN 479\r\n WHEN a.AdministrativeArea \u003d \u0027Whaletown\u0027 THEN 504\r\n WHEN a.AdministrativeArea \u003d \u0027Quathiaski Cove\u0027 THEN 494\r\n WHEN a.AdministrativeArea \u003d \u0027Big Bay in Stuart Island\u0027 THEN 478\r\n WHEN a.AdministrativeArea \u003d \u0027Surge Narrows in Read Island\u0027 THEN 500\r\n WHEN a.AdministrativeArea \u003d \u0027Rock Bay in Sayward\u0027 THEN 497\r\n WHEN a.AdministrativeArea \u003d \u0027Granite Bay in Quadra Island\u0027 THEN 487\r\n WHEN a.AdministrativeArea \u003d \u0027Moberly Lake\u0027 THEN 491\r\n WHEN a.AdministrativeArea \u003d \u0027Quatsino\u0027 THEN 495\r\n WHEN a.AdministrativeArea \u003d \u0027Bouchie Lake\u0027 THEN 480\r\n WHEN a.AdministrativeArea \u003d \u0027West Lake\u0027 THEN 503\r\n WHEN a.AdministrativeArea \u003d \u0027Salmon Valley\u0027 THEN 498\t\t\r\n WHEN a.AdministrativeArea \u003d \u0027Red Rock\u0027 THEN 496\r\n WHEN a.AdministrativeArea \u003d \u0027Stoner\u0027 THEN 499\r\n WHEN a.AdministrativeArea \u003d \u0027Pineview FFG\u0027 THEN 493\r\n WHEN a.AdministrativeArea \u003d \u0027Wonowon\u0027 THEN 506\r\n WHEN a.AdministrativeArea \u003d \u0027Halfway River\u0027 THEN 488\r\n WHEN a.AdministrativeArea \u003d \u0027Giscome\u0027 THEN 486\r\n WHEN a.AdministrativeArea \u003d \u0027Willow River\u0027 THEN 505\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lower Nicola\u0027 THEN 314\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Belcarra\u0027 THEN 425\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Tsawwassen\u0027 THEN 315\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Anmore\u0027 THEN 432\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lake Cowichan\u0027 THEN 442\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027North Cowichan\u0027 THEN 450\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Port Edward\u0027 THEN 347\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Spallumcheen\u0027 THEN 318\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Jumbo Glacier Mountain Resort Municipality\u0027 THEN 438\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Kent\u0027 THEN 439\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Highlands\u0027 THEN 348\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Slocan\u0027 THEN 380\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Warfield\u0027 THEN 448\r\n ELSE aa.Id \r\n END AS AdministrativeAreaId, \r\n\ta.Address1, \r\n\ta.Postal,\r\n\t1 as PropertyTypeID\r\nFROM \r\n [pims].[dbo].Buildings p\r\n\tINNER JOIN Addresses a\r\n\tON p.AddressId \u003d a.Id\r\n\tLEFT OUTER JOIN AdministrativeAreas aa\r\n\tON aa.Name \u003d a.AdministrativeArea\r\nWHERE p.BuildingPredominateUseId \u003c\u003d 54" - } - } - ], - "consumers": [ - { - "type": "databaseTransferConsumer" - } - ], - "configuration": { - "maxJobCount": 1, - "showFinalMessage": true, - "DatabaseTransferProducer": { - "extractType": "SEGMENTS", - "segmentSize": 1000, - "fetchSize": 10000, - "openNewConnections": false, - "queryRowCount": false, - "selectedColumnsOnly": false, - "selectedRowsOnly": false - }, - "DatabaseTransferConsumer": { - "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", - "openNewConnections": true, - "useTransactions": true, - "commitAfterRows": 1000, - "useMultiRowInsert": false, - "multiRowInsertBatch": 500, - "skipBindValues": false, - "disableUsingBatches": true, - "ignoreDuplicateRows": false, - "transferAutoGeneratedColumns": true, - "disableReferentialIntegrity": false, - "useBulkLoad": false, - "truncateBeforeLoad": false, - "openTableOnFinish": true, - "mappings": { - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT p.[Id],\r\n\tCASE \r\n\t WHEN p.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t ELSE p.[CreatedById]\r\n\tEND AS [CreatedById],\r\n p.[CreatedOn],\r\n p.[UpdatedById],\r\n p.[UpdatedOn],\r\n p.[Name],\r\n p.[Description],\r\n p.[ClassificationId],\r\n p.BuildingConstructionTypeId,\r\n p.[AgencyId],\r\n p.[IsSensitive],\r\n p.[IsVisibleToOtherAgencies],\r\n\tp.BuildingFloorCount,\r\n\tp.BuildingPredominateUseId,\r\n\tp.BuildingTenancy,\r\n\tp.RentableArea,\r\n\tp.BuildingOccupantTypeId,\r\n\tp.LeaseExpiry,\r\n\tp.OccupantName,\r\n\tp.TransferLeaseOnSale,\r\n\tp.BuildingTenancyUpdatedOn,\r\n\tp.EncumbranceReason,\r\n\tp.LeasedLandMetadata,\r\n\tp.TotalArea,\r\n\tCONVERT(VARCHAR(40), CAST(Location.Long AS DECIMAL(18, 14))) + \u0027, \u0027 + CONVERT(VARCHAR(40), CAST(Location.Lat AS DECIMAL(18, 14))) AS Location,\r\n\tCASE \r\n WHEN a.AdministrativeArea \u003d \u0027The Corporation of the City of Nelson\u0027 THEN 188\r\n WHEN a.AdministrativeArea \u003d \u0027Township of Langley\u0027 THEN 150\r\n WHEN a.AdministrativeArea \u003d \u0027District of North Vancouver\u0027 THEN 196\r\n WHEN a.AdministrativeArea \u003d \u0027Coombs\u0027 THEN 483\r\n WHEN a.AdministrativeArea \u003d \u0027Brookmere\u0027 THEN 481\r\n WHEN a.AdministrativeArea \u003d \u0027Thornhill\u0027 THEN 501\r\n WHEN a.AdministrativeArea \u003d \u0027Two Mile\u0027 THEN 502\r\n WHEN a.AdministrativeArea \u003d \u0027Crofton\u0027 THEN 484\r\n WHEN a.AdministrativeArea \u003d \u0027East Sooke\u0027 THEN 485\r\n WHEN a.AdministrativeArea \u003d \u0027Mudge Island\u0027 THEN 492\r\n WHEN a.AdministrativeArea \u003d \u0027Coal Harbour\u0027 THEN 482\r\n WHEN a.AdministrativeArea \u003d \u0027Miworth\u0027 THEN 490\r\n WHEN a.AdministrativeArea \u003d \u0027Lake Errock\u0027 THEN 489\r\n WHEN a.AdministrativeArea \u003d \u0027Black Creek\u0027 THEN 479\r\n WHEN a.AdministrativeArea \u003d \u0027Whaletown\u0027 THEN 504\r\n WHEN a.AdministrativeArea \u003d \u0027Quathiaski Cove\u0027 THEN 494\r\n WHEN a.AdministrativeArea \u003d \u0027Big Bay in Stuart Island\u0027 THEN 478\r\n WHEN a.AdministrativeArea \u003d \u0027Surge Narrows in Read Island\u0027 THEN 500\r\n WHEN a.AdministrativeArea \u003d \u0027Rock Bay in Sayward\u0027 THEN 497\r\n WHEN a.AdministrativeArea \u003d \u0027Granite Bay in Quadra Island\u0027 THEN 487\r\n WHEN a.AdministrativeArea \u003d \u0027Moberly Lake\u0027 THEN 491\r\n WHEN a.AdministrativeArea \u003d \u0027Quatsino\u0027 THEN 495\r\n WHEN a.AdministrativeArea \u003d \u0027Bouchie Lake\u0027 THEN 480\r\n WHEN a.AdministrativeArea \u003d \u0027West Lake\u0027 THEN 503\r\n WHEN a.AdministrativeArea \u003d \u0027Salmon Valley\u0027 THEN 498\t\t\r\n WHEN a.AdministrativeArea \u003d \u0027Red Rock\u0027 THEN 496\r\n WHEN a.AdministrativeArea \u003d \u0027Stoner\u0027 THEN 499\r\n WHEN a.AdministrativeArea \u003d \u0027Pineview FFG\u0027 THEN 493\r\n WHEN a.AdministrativeArea \u003d \u0027Wonowon\u0027 THEN 506\r\n WHEN a.AdministrativeArea \u003d \u0027Halfway River\u0027 THEN 488\r\n WHEN a.AdministrativeArea \u003d \u0027Giscome\u0027 THEN 486\r\n WHEN a.AdministrativeArea \u003d \u0027Willow River\u0027 THEN 505\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lower Nicola\u0027 THEN 314\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Belcarra\u0027 THEN 425\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Tsawwassen\u0027 THEN 315\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Anmore\u0027 THEN 432\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lake Cowichan\u0027 THEN 442\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027North Cowichan\u0027 THEN 450\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Port Edward\u0027 THEN 347\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Spallumcheen\u0027 THEN 318\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Jumbo Glacier Mountain Resort Municipality\u0027 THEN 438\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Kent\u0027 THEN 439\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Highlands\u0027 THEN 348\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Slocan\u0027 THEN 380\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Warfield\u0027 THEN 448\r\n ELSE aa.Id \r\n END AS AdministrativeAreaId, \r\n\ta.Address1, \r\n\ta.Postal,\r\n\t1 as PropertyTypeID\r\nFROM \r\n [pims].[dbo].Buildings p\r\n\tINNER JOIN Addresses a\r\n\tON p.AddressId \u003d a.Id\r\n\tLEFT OUTER JOIN AdministrativeAreas aa\r\n\tON aa.Name \u003d a.AdministrativeArea\r\nWHERE p.BuildingPredominateUseId \u003c\u003d 54": { - "targetName": "building", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "id", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "createdbyid", - "mappingType": "existing" - }, - "createdon": { - "targetName": "createdon", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "updatedbyid", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "updatedon", - "mappingType": "existing" - }, - "Name": { - "targetName": "Name", - "mappingType": "existing" - }, - "description": { - "targetName": "description", - "mappingType": "existing" - }, - "classificationid": { - "targetName": "classificationid", - "mappingType": "existing" - }, - "buildingconstructiontypeid": { - "targetName": "buildingconstructiontypeid", - "mappingType": "existing" - }, - "agencyid": { - "targetName": "agencyid", - "mappingType": "existing" - }, - "issensitive": { - "targetName": "issensitive", - "mappingType": "existing" - }, - "isvisibletootheragencies": { - "targetName": "isvisibletootheragencies", - "mappingType": "existing" - }, - "buildingfloorcount": { - "targetName": "buildingfloorcount", - "mappingType": "existing" - }, - "buildingpredominateuseid": { - "targetName": "buildingpredominateuseid", - "mappingType": "existing" - }, - "buildingtenancy": { - "targetName": "buildingtenancy", - "mappingType": "existing" - }, - "rentablearea": { - "targetName": "rentablearea", - "mappingType": "existing" - }, - "buildingoccupanttypeid": { - "targetName": "buildingoccupanttypeid", - "mappingType": "existing" - }, - "leaseexpiry": { - "targetName": "leaseexpiry", - "mappingType": "existing" - }, - "occupantname": { - "targetName": "occupantname", - "mappingType": "existing" - }, - "transferleaseonsale": { - "targetName": "transferleaseonsale", - "mappingType": "existing" - }, - "buildingtenancyupdatedon": { - "targetName": "buildingtenancyupdatedon", - "mappingType": "existing" - }, - "encumbrancereason": { - "targetName": "encumbrancereason", - "mappingType": "existing" - }, - "leasedlandmetadata": { - "targetName": "leasedlandmetadata", - "mappingType": "existing" - }, - "totalarea": { - "targetName": "totalarea", - "mappingType": "existing" - }, - "Location": { - "targetName": "Location", - "mappingType": "existing" - }, - "administrativeareaid": { - "targetName": "administrativeareaid", - "mappingType": "existing" - }, - "address1": { - "targetName": "address1", - "mappingType": "existing" - }, - "postal": { - "targetName": "postal", - "mappingType": "existing" - }, - "propertytypeid": { - "targetName": "propertytypeid", - "mappingType": "existing" - } - } - } - } - }, - "producer": "database_producer", - "consumer": "database_consumer" - } - } - }, - "1181bce6-993f-4a79-b9a6-658b9faa5405": { - "task": "dataExport", - "label": "ParcelBuildingsExport", - "description": "", - "taskFolder": "Testing", - "createTime": "202401191656", - "updateTime": "202401191656", - "state": { - "producers": [ - { - "type": "databaseTransferProducer", - "location": { - "type": "query", - "project": "General", - "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", - "query": "\r\nSELECT pb.*\r\n FROM [pims].[dbo].ParcelBuildings pb\r\n INNER JOIN Buildings b\r\n ON b.Id \u003d pb.BuildingId\r\n WHERE b.BuildingPredominateUseId \u003c\u003d 54" - } - } - ], - "consumers": [ - { - "type": "databaseTransferConsumer" - } - ], - "configuration": { - "maxJobCount": 1, - "showFinalMessage": true, - "DatabaseTransferProducer": { - "extractType": "SEGMENTS", - "segmentSize": 100, - "fetchSize": 10000, - "openNewConnections": false, - "queryRowCount": false, - "selectedColumnsOnly": false, - "selectedRowsOnly": false - }, - "DatabaseTransferConsumer": { - "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", - "openNewConnections": true, - "useTransactions": true, - "commitAfterRows": 1000, - "useMultiRowInsert": false, - "multiRowInsertBatch": 500, - "skipBindValues": false, - "disableUsingBatches": true, - "ignoreDuplicateRows": false, - "transferAutoGeneratedColumns": true, - "disableReferentialIntegrity": false, - "useBulkLoad": false, - "truncateBeforeLoad": false, - "openTableOnFinish": true, - "mappings": { - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ParcelBuildings": { - "targetName": "parcel_buildings", - "mappingType": "create", - "attributes": { - "parcelid": { - "targetName": "\"ParcelId\"", - "mappingType": "create" - }, - "buildingid": { - "targetName": "\"BuildingId\"", - "mappingType": "create" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "create" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "create" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "create" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "create" - }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT pb.*\r\n FROM [pims].[dbo].ParcelBuildings pb\r\n INNER JOIN Buildings b\r\n ON b.Id \u003d pb.BuildingId\r\n WHERE b.BuildingPredominateUseId \u003c\u003d 54": { - "targetName": "parcel_building", - "mappingType": "existing", - "attributes": { - "parcelid": { - "targetName": "parcelid", - "mappingType": "existing" - }, - "buildingid": { - "targetName": "buildingid", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "createdbyid", - "mappingType": "existing" - }, - "createdon": { - "targetName": "createdon", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "updatedbyid", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "updatedon", - "mappingType": "existing" - }, - "rowversion": { - "targetName": "rowversion", - "mappingType": "skip" - } - } - } - } - }, - "producer": "database_producer", - "consumer": "database_consumer" - } - } - }, - "22df018a-1bd5-45b6-80f4-6c3882d7f933": { - "task": "dataExport", - "label": "ProjectNotesExport", - "description": "", - "taskFolder": "Testing", - "createTime": "202401241318", - "updateTime": "202401241318", - "state": { - "producers": [ - { - "type": "databaseTransferProducer", - "location": { - "type": "entity", - "project": "General", - "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectNotes" - } - } - ], - "consumers": [ - { - "type": "databaseTransferConsumer" - } - ], - "configuration": { - "maxJobCount": 1.0, - "showFinalMessage": true, - "DatabaseTransferProducer": { - "extractType": "SEGMENTS", - "segmentSize": 100.0, - "fetchSize": 10000.0, - "openNewConnections": false, - "queryRowCount": false, - "selectedColumnsOnly": false, - "selectedRowsOnly": false - }, - "DatabaseTransferConsumer": { - "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", - "openNewConnections": true, - "useTransactions": true, - "commitAfterRows": 1000.0, - "useMultiRowInsert": false, - "multiRowInsertBatch": 500.0, - "skipBindValues": false, - "disableUsingBatches": true, - "ignoreDuplicateRows": false, - "transferAutoGeneratedColumns": true, - "disableReferentialIntegrity": false, - "useBulkLoad": false, - "truncateBeforeLoad": false, - "openTableOnFinish": true, - "mappings": { - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectNotes": { - "targetName": "project_notes", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "\"Id\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - }, - "projectid": { - "targetName": "\"ProjectId\"", - "mappingType": "existing" - }, - "notetype": { - "targetName": "\"NoteType\"", - "mappingType": "existing" - }, - "note": { - "targetName": "\"Note\"", - "mappingType": "existing" - } - } - } - } - }, - "producer": "database_producer", - "consumer": "database_consumer" - } - } - }, - "ae48a9c7-29e3-4306-a46f-9e39d09bd222": { - "task": "dataExport", - "label": "ProjectPropertiesExport", - "description": "", - "taskFolder": "Testing", - "createTime": "202401241343", - "updateTime": "202401241343", - "state": { - "producers": [ - { - "type": "databaseTransferProducer", - "location": { - "type": "entity", - "project": "General", - "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectProperties" - } - } - ], - "consumers": [ - { - "type": "databaseTransferConsumer" - } - ], - "configuration": { - "maxJobCount": 1.0, - "showFinalMessage": true, - "DatabaseTransferProducer": { - "extractType": "SEGMENTS", - "segmentSize": 100.0, - "fetchSize": 10000.0, - "openNewConnections": false, - "queryRowCount": false, - "selectedColumnsOnly": false, - "selectedRowsOnly": false - }, - "DatabaseTransferConsumer": { - "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", - "openNewConnections": true, - "useTransactions": true, - "commitAfterRows": 1000.0, - "useMultiRowInsert": false, - "multiRowInsertBatch": 500.0, - "skipBindValues": false, - "disableUsingBatches": true, - "ignoreDuplicateRows": false, - "transferAutoGeneratedColumns": true, - "disableReferentialIntegrity": false, - "useBulkLoad": false, - "truncateBeforeLoad": false, - "openTableOnFinish": true, - "mappings": { - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectProperties": { - "targetName": "project_properties", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "\"Id\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - }, - "projectid": { - "targetName": "\"ProjectId\"", - "mappingType": "existing" - }, - "propertytype": { - "targetName": "\"PropertyType\"", - "mappingType": "existing" - }, - "parcelid": { - "targetName": "\"ParcelId\"", - "mappingType": "existing" - }, - "buildingid": { - "targetName": "\"BuildingId\"", - "mappingType": "existing" - } - } - } - } - }, - "producer": "database_producer", - "consumer": "database_consumer" - } - } - }, - "aa631119-d9f8-42ce-bbd1-12e569881a65": { - "task": "dataExport", - "label": "ProjectReportsExport", - "description": "", - "taskFolder": "Testing", - "createTime": "202401241346", - "updateTime": "202401241346", - "state": { - "producers": [ - { - "type": "databaseTransferProducer", - "location": { - "type": "entity", - "project": "General", - "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectReports" - } - } - ], - "consumers": [ - { - "type": "databaseTransferConsumer" - } - ], - "configuration": { - "maxJobCount": 1.0, - "showFinalMessage": true, - "DatabaseTransferProducer": { - "extractType": "SEGMENTS", - "segmentSize": 100.0, - "fetchSize": 10000.0, - "openNewConnections": false, - "queryRowCount": false, - "selectedColumnsOnly": false, - "selectedRowsOnly": false - }, - "DatabaseTransferConsumer": { - "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", - "openNewConnections": true, - "useTransactions": true, - "commitAfterRows": 1000.0, - "useMultiRowInsert": false, - "multiRowInsertBatch": 500.0, - "skipBindValues": false, - "disableUsingBatches": true, - "ignoreDuplicateRows": false, - "transferAutoGeneratedColumns": true, - "disableReferentialIntegrity": false, - "useBulkLoad": false, - "truncateBeforeLoad": false, - "openTableOnFinish": true, - "mappings": { - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectReports": { - "targetName": "project_reports", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "\"Id\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - }, - "isfinal": { - "targetName": "\"IsFinal\"", - "mappingType": "existing" - }, - "Name": { - "targetName": "\"Name\"", - "mappingType": "existing" - }, - "From": { - "targetName": "\"From\"", - "mappingType": "existing" - }, - "To": { - "targetName": "\"To\"", - "mappingType": "existing" - }, - "reporttype": { - "targetName": "\"ReportType\"", - "mappingType": "existing" - } - } - } - } - }, - "producer": "database_producer", - "consumer": "database_consumer" - } - } - }, - "b19e87da-a606-480b-849a-8bf791b2ed5b": { - "task": "dataExport", - "label": "ProjectSnapshotsExport", - "description": "", - "taskFolder": "Testing", - "createTime": "202401241422", - "updateTime": "202401241422", - "state": { - "producers": [ - { - "type": "databaseTransferProducer", - "location": { - "type": "entity", - "project": "General", - "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectSnapshots" - } - } - ], - "consumers": [ - { - "type": "databaseTransferConsumer" - } - ], - "configuration": { - "maxJobCount": 1.0, - "showFinalMessage": true, - "DatabaseTransferProducer": { - "extractType": "SEGMENTS", - "segmentSize": 100.0, - "fetchSize": 10000.0, - "openNewConnections": false, - "queryRowCount": false, - "selectedColumnsOnly": false, - "selectedRowsOnly": false - }, - "DatabaseTransferConsumer": { - "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", - "openNewConnections": true, - "useTransactions": true, - "commitAfterRows": 1000.0, - "useMultiRowInsert": false, - "multiRowInsertBatch": 500.0, - "skipBindValues": false, - "disableUsingBatches": true, - "ignoreDuplicateRows": false, - "transferAutoGeneratedColumns": true, - "disableReferentialIntegrity": false, - "useBulkLoad": false, - "truncateBeforeLoad": false, - "openTableOnFinish": true, - "mappings": { - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectSnapshots": { - "targetName": "project_snapshots", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "\"Id\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - }, - "projectid": { - "targetName": "\"ProjectId\"", - "mappingType": "existing" - }, - "netbook": { - "targetName": "\"NetBook\"", - "mappingType": "existing" - }, - "market": { - "targetName": "\"Market\"", - "mappingType": "existing" - }, - "assessed": { - "targetName": "\"Assessed\"", - "mappingType": "existing" - }, - "appraised": { - "targetName": "\"Appraised\"", - "mappingType": "existing" - }, - "snapshoton": { - "targetName": "\"SnapshotOn\"", - "mappingType": "existing" - }, - "metadata": { - "targetName": "\"Metadata\"", - "mappingType": "existing" - } - } - } - } - }, - "producer": "database_producer", - "consumer": "database_consumer" - } - } - }, - "54f1f570-f0cc-4993-a63f-7b6c8a089f27": { - "task": "dataExport", - "label": "ProjectStatusHistory", - "description": "", - "taskFolder": "Testing", - "createTime": "202401241441", - "updateTime": "202401241441", - "state": { - "producers": [ - { - "type": "databaseTransferProducer", - "location": { - "type": "entity", - "project": "General", - "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectStatusHistory" - } - } - ], - "consumers": [ - { - "type": "databaseTransferConsumer" - } - ], - "configuration": { - "maxJobCount": 1, - "showFinalMessage": true, - "DatabaseTransferProducer": { - "extractType": "SEGMENTS", - "segmentSize": 100, - "fetchSize": 10000, - "openNewConnections": false, - "queryRowCount": false, - "selectedColumnsOnly": false, - "selectedRowsOnly": false - }, - "DatabaseTransferConsumer": { - "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", - "openNewConnections": true, - "useTransactions": true, - "commitAfterRows": 1000, - "useMultiRowInsert": false, - "multiRowInsertBatch": 500, - "skipBindValues": false, - "disableUsingBatches": true, - "ignoreDuplicateRows": false, - "transferAutoGeneratedColumns": true, - "disableReferentialIntegrity": false, - "useBulkLoad": false, - "truncateBeforeLoad": false, - "openTableOnFinish": true, - "mappings": { - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectStatusHistory": { - "targetName": "project_status_history", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "\"Id\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - }, - "projectid": { - "targetName": "\"ProjectId\"", - "mappingType": "existing" - }, - "workflowid": { - "targetName": "\"WorkflowId\"", - "mappingType": "existing" - }, - "statusid": { - "targetName": "\"StatusId\"", - "mappingType": "existing" - } - } - } - } - }, - "producer": "database_producer", - "consumer": "database_consumer" - } - } - }, - "0b54fcb6-78e2-4a0a-aa2d-ec86d344927e": { - "task": "dataExport", - "label": "ProjectTasksExport", - "description": "", - "taskFolder": "Testing", - "createTime": "202401241456", - "updateTime": "202401241456", - "state": { - "producers": [ - { - "type": "databaseTransferProducer", - "location": { - "type": "entity", - "project": "General", - "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectTasks" - } - } - ], - "consumers": [ - { - "type": "databaseTransferConsumer" - } - ], - "configuration": { - "maxJobCount": 1.0, - "showFinalMessage": true, - "DatabaseTransferProducer": { - "extractType": "SEGMENTS", - "segmentSize": 100.0, - "fetchSize": 10000.0, - "openNewConnections": false, - "queryRowCount": false, - "selectedColumnsOnly": false, - "selectedRowsOnly": false - }, - "DatabaseTransferConsumer": { - "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", - "openNewConnections": true, - "useTransactions": true, - "commitAfterRows": 1000.0, - "useMultiRowInsert": false, - "multiRowInsertBatch": 500.0, - "skipBindValues": false, - "disableUsingBatches": true, - "ignoreDuplicateRows": false, - "transferAutoGeneratedColumns": true, - "disableReferentialIntegrity": false, - "useBulkLoad": false, - "truncateBeforeLoad": false, - "openTableOnFinish": true, - "mappings": { - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectTasks": { - "targetName": "project_tasks", - "mappingType": "existing", - "attributes": { - "projectid": { - "targetName": "\"ProjectId\"", - "mappingType": "existing" - }, - "taskid": { - "targetName": "\"TaskId\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - }, - "iscompleted": { - "targetName": "\"IsCompleted\"", - "mappingType": "existing" - }, - "completedon": { - "targetName": "\"CompletedOn\"", - "mappingType": "existing" - } - } - } - } - }, - "producer": "database_producer", - "consumer": "database_consumer" - } - } - }, - "684797d1-c851-4bf8-8033-882800c980e8": { - "task": "dataExport", - "label": "AgenciesRolesClaimsUsersExport", - "description": "Export of the Agencies, Roles, Claims, Users, and User Roles", - "taskFolder": "PIMS ETL", - "createTime": "202401311411", - "updateTime": "202401311411", - "state": { - "producers": [ - { - "type": "databaseTransferProducer", - "location": { - "type": "query", - "project": "General", - "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", - "defaultCatalog": "pims", - "defaultSchema": "dbo", - "query": "\r\nSELECT \r\n u.[Id],\r\n \r\n\t CASE \r\n\t\tWHEN u.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE u.[CreatedById]\r\n\t END AS [CreatedById],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n urd.CreatedOn,\r\n urd.UserId,\r\n ua.AgencyId, \r\n STRING_AGG(urd.RoleName, \u0027, \u0027) AS Roles,\r\n CASE \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%System Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial Reporter%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial%\u0027 THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Agency Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Analyst%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Manager%\u0027 THEN \u002700000000-0000-0000-0000-000000000001\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister Assistant%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Executive Director%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%View Only Properties%\u0027 THEN \u002700000000-0000-0000-0000-000000000002\u0027\r\n\t \r\n END AS UserType\r\nFROM Users u\r\nLEFT JOIN (\r\n SELECT \r\n ur.UserId,\r\n MAX(ur.CreatedOn) AS CreatedOn,\r\n STRING_AGG(r.Name, \u0027, \u0027) AS RoleName\r\n FROM [pims].[dbo].[UserRoles] ur\r\n INNER JOIN Roles r ON ur.RoleId \u003d r.Id\r\n GROUP BY ur.UserId\r\n) AS urd ON u.Id \u003d urd.UserId\r\n\r\nLEFT OUTER JOIN (\r\n SELECT UserId, MIN(AgencyId) AS AgencyId\r\n FROM UserAgencies\r\n GROUP BY UserId\r\n) ua_min ON u.Id \u003d ua_min.UserId\r\nLEFT OUTER JOIN UserAgencies ua ON u.Id \u003d ua.UserId AND ua.AgencyId \u003d ua_min.AgencyId\r\n\r\nWHERE u.Id \u003c\u003e \u002700000000-0000-0000-0000-000000000000\u0027\r\n\r\nGROUP BY u.[Id],\r\n u.[CreatedById],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n urd.CreatedOn, \r\n urd.UserId, \r\n ua.AgencyId\r\nORDER BY urd.CreatedOn ASC" - } - }, - { - "type": "databaseTransferProducer", - "location": { - "type": "entity", - "project": "General", - "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Agencies" - } - } - ], - "consumers": [ - { - "type": "databaseTransferConsumer" - }, - { - "type": "databaseTransferConsumer" - } - ], - "configuration": { - "maxJobCount": 1, - "showFinalMessage": true, - "DatabaseTransferProducer": { - "extractType": "SEGMENTS", - "segmentSize": 100, - "fetchSize": 10000, - "openNewConnections": false, - "queryRowCount": false, - "selectedColumnsOnly": false, - "selectedRowsOnly": false - }, - "DatabaseTransferConsumer": { - "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", - "openNewConnections": true, - "useTransactions": true, - "commitAfterRows": 1000, - "useMultiRowInsert": false, - "multiRowInsertBatch": 500, - "skipBindValues": false, - "disableUsingBatches": true, - "ignoreDuplicateRows": false, - "transferAutoGeneratedColumns": true, - "disableReferentialIntegrity": true, - "useBulkLoad": false, - "truncateBeforeLoad": false, - "openTableOnFinish": true, - "mappings": { - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT \r\n u.[Id],\r\n \r\n\t CASE \r\n\t\tWHEN u.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE u.[CreatedById]\r\n\t END AS [CreatedById],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n urd.CreatedOn,\r\n urd.UserId,\r\n ua.AgencyId, \r\n STRING_AGG(urd.RoleName, \u0027, \u0027) AS Roles,\r\n CASE \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%System Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial Reporter%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial%\u0027 THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Agency Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Analyst%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Manager%\u0027 THEN \u002700000000-0000-0000-0000-000000000001\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister Assistant%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Executive Director%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%View Only Properties%\u0027 THEN \u002700000000-0000-0000-0000-000000000002\u0027\r\n\t \r\n END AS UserType\r\nFROM Users u\r\nLEFT JOIN (\r\n SELECT \r\n ur.UserId,\r\n MAX(ur.CreatedOn) AS CreatedOn,\r\n STRING_AGG(r.Name, \u0027, \u0027) AS RoleName\r\n FROM [pims].[dbo].[UserRoles] ur\r\n INNER JOIN Roles r ON ur.RoleId \u003d r.Id\r\n GROUP BY ur.UserId\r\n) AS urd ON u.Id \u003d urd.UserId\r\n\r\nLEFT OUTER JOIN (\r\n SELECT UserId, MIN(AgencyId) AS AgencyId\r\n FROM UserAgencies\r\n GROUP BY UserId\r\n) ua_min ON u.Id \u003d ua_min.UserId\r\nLEFT OUTER JOIN UserAgencies ua ON u.Id \u003d ua.UserId AND ua.AgencyId \u003d ua_min.AgencyId\r\n\r\nWHERE u.Id \u003c\u003e \u002700000000-0000-0000-0000-000000000000\u0027\r\n\r\nGROUP BY u.[Id],\r\n u.[CreatedById],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n urd.CreatedOn, \r\n urd.UserId, \r\n ua.AgencyId\r\nORDER BY urd.CreatedOn ASC": { - "targetName": "user", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "id", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "createdbyid", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "updatedbyid", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "updatedon", - "mappingType": "existing" - }, - "username": { - "targetName": "username", - "mappingType": "existing" - }, - "displayname": { - "targetName": "displayname", - "mappingType": "existing" - }, - "firstname": { - "targetName": "firstname", - "mappingType": "existing" - }, - "middlename": { - "targetName": "middlename", - "mappingType": "existing" - }, - "lastname": { - "targetName": "lastname", - "mappingType": "existing" - }, - "email": { - "targetName": "email", - "mappingType": "existing" - }, - "Position": { - "targetName": "Position", - "mappingType": "existing" - }, - "isdisabled": { - "targetName": "isdisabled", - "mappingType": "existing" - }, - "emailverified": { - "targetName": "emailverified", - "mappingType": "existing" - }, - "note": { - "targetName": "note", - "mappingType": "existing" - }, - "issystem": { - "targetName": "issystem", - "mappingType": "existing" - }, - "lastlogin": { - "targetName": "lastlogin", - "mappingType": "existing" - }, - "approvedbyid": { - "targetName": "approvedbyid", - "mappingType": "existing" - }, - "approvedon": { - "targetName": "approvedon", - "mappingType": "existing" - }, - "keycloakuserid": { - "targetName": "keycloakuserid", - "mappingType": "existing" - }, - "createdon": { - "targetName": "createdon", - "mappingType": "existing" - }, - "userid": { - "targetName": "userid", - "mappingType": "skip" - }, - "agencyid": { - "targetName": "agencyid", - "mappingType": "existing" - }, - "roles": { - "targetName": "roles", - "mappingType": "skip" - }, - "usertype": { - "targetName": "\"RoleId\"", - "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT \r\n urd.CreatedOn,\r\n urd.UserId,\r\n STRING_AGG(urd.RoleName, \u0027, \u0027) AS Roles,\r\n CASE \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%System Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial Reporter%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial%\u0027 THEN \u0027Admin\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Agency Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Analyst%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Manager%\u0027 THEN \u0027General User\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister Assistant%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Executive Director%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%View Only Properties%\u0027 THEN \u0027Auditor\u0027\r\n \r\n ELSE \u0027Regular User\u0027 \r\n END AS UserType\r\nFROM (\r\n SELECT \r\n ur.UserId,\r\n MAX(ur.CreatedOn) AS CreatedOn,\r\n STRING_AGG(r.Name, \u0027, \u0027) AS RoleName\r\n FROM [pims].[dbo].[UserRoles] ur\r\n INNER JOIN Roles r ON ur.RoleId \u003d r.Id\r\n GROUP BY ur.UserId\r\n) AS urd\r\nGROUP BY urd.CreatedOn, urd.UserId;\r\n": { - "targetName": "user_roles", - "mappingType": "existing", - "attributes": { - "createdon": { - "targetName": "createdon", - "mappingType": "existing" - }, - "userid": { - "targetName": "userid", - "mappingType": "existing" - }, - "roles": { - "targetName": "roles", - "mappingType": "existing" - }, - "usertype": { - "targetName": "\"RoleId\"", - "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Agencies": { - "targetName": "agency", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "\"Id\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing", - "transformer": "constant", - "transformerProperties": { - "constant": "00000000-0000-0000-0000-000000000000" - }, - "transformerPropertiesNames": "constant" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - }, - "Name": { - "targetName": "\"Name\"", - "mappingType": "existing" - }, - "isdisabled": { - "targetName": "\"IsDisabled\"", - "mappingType": "existing" - }, - "sortorder": { - "targetName": "\"SortOrder\"", - "mappingType": "existing" - }, - "code": { - "targetName": "\"Code\"", - "mappingType": "existing" - }, - "description": { - "targetName": "\"Description\"", - "mappingType": "existing" - }, - "parentid": { - "targetName": "\"ParentId\"", - "mappingType": "existing" - }, - "email": { - "targetName": "\"Email\"", - "mappingType": "existing" - }, - "sendemail": { - "targetName": "\"SendEmail\"", - "mappingType": "existing" - }, - "addressto": { - "targetName": "\"AddressTo\"", - "mappingType": "existing" - }, - "ccemail": { - "targetName": "\"CCEmail\"", - "mappingType": "existing" - } - } - } - } - }, - "producer": "database_producer", - "consumer": "database_consumer" - } - } - }, - "5ecb8524-d561-4531-9c6e-82e38afb697e": { - "task": "dataExport", - "label": "PIMS ETL", - "description": "Export of the Agencies, Roles, Claims, Users, and User Roles", - "taskFolder": "PIMS ETL", - "createTime": "202402131336", - "updateTime": "202402131336", - "state": { - "producers": [ - { - "type": "databaseTransferProducer", - "location": { - "type": "entity", - "project": "General", - "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Agencies" - } - }, - { - "type": "databaseTransferProducer", - "location": { - "type": "query", - "project": "General", - "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", - "defaultCatalog": "pims", - "defaultSchema": "dbo", - "query": "\r\nSELECT \r\n u.[Id],\r\n \r\n\t CASE \r\n\t\tWHEN u.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE u.[CreatedById]\r\n\t END AS [CreatedById],\r\n \r\n\t CASE \r\n\t\tWHEN u.IsDisabled \u003d 0 THEN \u0027Active\u0027\r\n\t\tELSE \u0027Disabled\u0027\r\n\t END AS [Status],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n urd.CreatedOn,\r\n urd.UserId,\r\n ua.AgencyId, \r\n STRING_AGG(urd.RoleName, \u0027, \u0027) AS Roles,\r\n CASE \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%System Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial Reporter%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial%\u0027 THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Agency Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Analyst%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Manager%\u0027 THEN \u002700000000-0000-0000-0000-000000000001\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister Assistant%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Executive Director%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%View Only Properties%\u0027 THEN \u002700000000-0000-0000-0000-000000000002\u0027\r\n\t \r\n END AS UserType\r\nFROM Users u\r\nLEFT JOIN (\r\n SELECT \r\n ur.UserId,\r\n MAX(ur.CreatedOn) AS CreatedOn,\r\n STRING_AGG(r.Name, \u0027, \u0027) AS RoleName\r\n FROM [pims].[dbo].[UserRoles] ur\r\n INNER JOIN Roles r ON ur.RoleId \u003d r.Id\r\n GROUP BY ur.UserId\r\n) AS urd ON u.Id \u003d urd.UserId\r\n\r\nLEFT OUTER JOIN (\r\n SELECT UserId, MIN(AgencyId) AS AgencyId\r\n FROM UserAgencies\r\n GROUP BY UserId\r\n) ua_min ON u.Id \u003d ua_min.UserId\r\nLEFT OUTER JOIN UserAgencies ua ON u.Id \u003d ua.UserId AND ua.AgencyId \u003d ua_min.AgencyId\r\n\r\nWHERE u.Id \u003c\u003e \u002700000000-0000-0000-0000-000000000000\u0027\r\n\r\nGROUP BY u.[Id],\r\n u.[CreatedById],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n urd.CreatedOn, \r\n urd.UserId, \r\n ua.AgencyId\r\nORDER BY urd.CreatedOn ASC" - } - }, - { - "type": "databaseTransferProducer", - "location": { - "type": "query", - "project": "General", - "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", - "defaultCatalog": "pims", - "query": "\r\nSELECT p.[Id],\r\n\t CASE \r\n\t\tWHEN p.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE p.[CreatedById]\r\n\t END AS [CreatedById],\r\n p.[CreatedOn],\r\n p.[UpdatedById],\r\n p.[UpdatedOn],\r\n p.[Name],\r\n p.[Description],\r\n p.[ClassificationId],\r\n p.[AgencyId],\r\n p.[IsSensitive],\r\n p.[IsVisibleToOtherAgencies],\r\n p.[PID],\r\n p.[PIN],\r\n p.[LandArea],\r\n p.[LandLegalDescription],\r\n p.[Zoning],\r\n p.[ZoningPotential],\r\n p.[NotOwned],\r\n\tCONVERT(VARCHAR(40), CAST(Location.Long AS DECIMAL(18, 14))) + \u0027, \u0027 + CONVERT(VARCHAR(40), CAST(Location.Lat AS DECIMAL(18, 14))) AS Location,\r\n CASE \r\n WHEN a.AdministrativeArea \u003d \u0027The Corporation of the City of Nelson\u0027 THEN 188\r\n WHEN a.AdministrativeArea \u003d \u0027Township of Langley\u0027 THEN 150\r\n WHEN a.AdministrativeArea \u003d \u0027District of North Vancouver\u0027 THEN 196\r\n WHEN a.AdministrativeArea \u003d \u0027Coombs\u0027 THEN 483\r\n WHEN a.AdministrativeArea \u003d \u0027Brookmere\u0027 THEN 481\r\n WHEN a.AdministrativeArea \u003d \u0027Thornhill\u0027 THEN 501\r\n WHEN a.AdministrativeArea \u003d \u0027Two Mile\u0027 THEN 502\r\n WHEN a.AdministrativeArea \u003d \u0027Crofton\u0027 THEN 484\r\n WHEN a.AdministrativeArea \u003d \u0027East Sooke\u0027 THEN 485\r\n WHEN a.AdministrativeArea \u003d \u0027Mudge Island\u0027 THEN 492\r\n WHEN a.AdministrativeArea \u003d \u0027Coal Harbour\u0027 THEN 482\r\n WHEN a.AdministrativeArea \u003d \u0027Miworth\u0027 THEN 490\r\n WHEN a.AdministrativeArea \u003d \u0027Lake Errock\u0027 THEN 489\r\n WHEN a.AdministrativeArea \u003d \u0027Black Creek\u0027 THEN 479\r\n WHEN a.AdministrativeArea \u003d \u0027Whaletown\u0027 THEN 504\r\n WHEN a.AdministrativeArea \u003d \u0027Quathiaski Cove\u0027 THEN 494\r\n WHEN a.AdministrativeArea \u003d \u0027Big Bay in Stuart Island\u0027 THEN 478\r\n WHEN a.AdministrativeArea \u003d \u0027Surge Narrows in Read Island\u0027 THEN 500\r\n WHEN a.AdministrativeArea \u003d \u0027Rock Bay in Sayward\u0027 THEN 497\r\n WHEN a.AdministrativeArea \u003d \u0027Granite Bay in Quadra Island\u0027 THEN 487\r\n WHEN a.AdministrativeArea \u003d \u0027Moberly Lake\u0027 THEN 491\r\n WHEN a.AdministrativeArea \u003d \u0027Quatsino\u0027 THEN 495\r\n WHEN a.AdministrativeArea \u003d \u0027Bouchie Lake\u0027 THEN 480\r\n WHEN a.AdministrativeArea \u003d \u0027West Lake\u0027 THEN 503\r\n WHEN a.AdministrativeArea \u003d \u0027Salmon Valley\u0027 THEN 498\t\t\r\n WHEN a.AdministrativeArea \u003d \u0027Red Rock\u0027 THEN 496\r\n WHEN a.AdministrativeArea \u003d \u0027Stoner\u0027 THEN 499\r\n WHEN a.AdministrativeArea \u003d \u0027Pineview FFG\u0027 THEN 493\r\n WHEN a.AdministrativeArea \u003d \u0027Wonowon\u0027 THEN 506\r\n WHEN a.AdministrativeArea \u003d \u0027Halfway River\u0027 THEN 488\r\n WHEN a.AdministrativeArea \u003d \u0027Giscome\u0027 THEN 486\r\n WHEN a.AdministrativeArea \u003d \u0027Willow River\u0027 THEN 505\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lower Nicola\u0027 THEN 314\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Belcarra\u0027 THEN 425\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Tsawwassen\u0027 THEN 315\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Anmore\u0027 THEN 432\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lake Cowichan\u0027 THEN 442\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027North Cowichan\u0027 THEN 450\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Port Edward\u0027 THEN 347\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Spallumcheen\u0027 THEN 318\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Jumbo Glacier Mountain Resort Municipality\u0027 THEN 438\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Kent\u0027 THEN 439\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Highlands\u0027 THEN 348\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Slocan\u0027 THEN 380\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Warfield\u0027 THEN 448\r\n ELSE aa.Id \r\n END AS AdministrativeAreaId, \r\n\ta.AdministrativeArea,\r\n\ta.Address1, \r\n\ta.Postal,\r\n\tpp.ParcelId as ParentID,\r\n\t0 as PropertyTypeID\r\nFROM \r\n [pims].[dbo].[Parcels] p\r\n\tINNER JOIN Addresses a\r\n\tON p.AddressId \u003d a.Id\r\n\tLEFT OUTER JOIN AdministrativeAreas aa\r\n\tON aa.Name \u003d a.AdministrativeArea\r\n    LEFT OUTER JOIN ParcelParcels pp\r\n    ON pp.SubdivisionId \u003d p.Id" - } - }, - { - "type": "databaseTransferProducer", - "location": { - "type": "query", - "project": "General", - "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", - "defaultCatalog": "pims", - "query": "SELECT p.[Id],\r\n\tCASE \r\n\t WHEN p.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t ELSE p.[CreatedById]\r\n\tEND AS [CreatedById],\r\n p.[CreatedOn],\r\n p.[UpdatedById],\r\n p.[UpdatedOn],\r\n p.[Name],\r\n p.[Description],\r\n p.[ClassificationId],\r\n p.BuildingConstructionTypeId,\r\n p.[AgencyId],\r\n p.[IsSensitive],\r\n p.[IsVisibleToOtherAgencies],\r\n\tp.BuildingFloorCount,\r\n\tp.BuildingPredominateUseId,\r\n\tp.BuildingTenancy,\r\n\tp.RentableArea,\r\n\tp.BuildingOccupantTypeId,\r\n\tp.LeaseExpiry,\r\n\tp.OccupantName,\r\n\tp.TransferLeaseOnSale,\r\n\tp.BuildingTenancyUpdatedOn,\r\n\tp.EncumbranceReason,\r\n\tp.LeasedLandMetadata,\r\n\tp.TotalArea,\r\n\tCONVERT(VARCHAR(40), CAST(Location.Long AS DECIMAL(18, 14))) + \u0027, \u0027 + CONVERT(VARCHAR(40), CAST(Location.Lat AS DECIMAL(18, 14))) AS Location,\r\n\tCASE \r\n WHEN a.AdministrativeArea \u003d \u0027The Corporation of the City of Nelson\u0027 THEN 188\r\n WHEN a.AdministrativeArea \u003d \u0027Township of Langley\u0027 THEN 150\r\n WHEN a.AdministrativeArea \u003d \u0027District of North Vancouver\u0027 THEN 196\r\n WHEN a.AdministrativeArea \u003d \u0027Coombs\u0027 THEN 483\r\n WHEN a.AdministrativeArea \u003d \u0027Brookmere\u0027 THEN 481\r\n WHEN a.AdministrativeArea \u003d \u0027Thornhill\u0027 THEN 501\r\n WHEN a.AdministrativeArea \u003d \u0027Two Mile\u0027 THEN 502\r\n WHEN a.AdministrativeArea \u003d \u0027Crofton\u0027 THEN 484\r\n WHEN a.AdministrativeArea \u003d \u0027East Sooke\u0027 THEN 485\r\n WHEN a.AdministrativeArea \u003d \u0027Mudge Island\u0027 THEN 492\r\n WHEN a.AdministrativeArea \u003d \u0027Coal Harbour\u0027 THEN 482\r\n WHEN a.AdministrativeArea \u003d \u0027Miworth\u0027 THEN 490\r\n WHEN a.AdministrativeArea \u003d \u0027Lake Errock\u0027 THEN 489\r\n WHEN a.AdministrativeArea \u003d \u0027Black Creek\u0027 THEN 479\r\n WHEN a.AdministrativeArea \u003d \u0027Whaletown\u0027 THEN 504\r\n WHEN a.AdministrativeArea \u003d \u0027Quathiaski Cove\u0027 THEN 494\r\n WHEN a.AdministrativeArea \u003d \u0027Big Bay in Stuart Island\u0027 THEN 478\r\n WHEN a.AdministrativeArea \u003d \u0027Surge Narrows in Read Island\u0027 THEN 500\r\n WHEN a.AdministrativeArea \u003d \u0027Rock Bay in Sayward\u0027 THEN 497\r\n WHEN a.AdministrativeArea \u003d \u0027Granite Bay in Quadra Island\u0027 THEN 487\r\n WHEN a.AdministrativeArea \u003d \u0027Moberly Lake\u0027 THEN 491\r\n WHEN a.AdministrativeArea \u003d \u0027Quatsino\u0027 THEN 495\r\n WHEN a.AdministrativeArea \u003d \u0027Bouchie Lake\u0027 THEN 480\r\n WHEN a.AdministrativeArea \u003d \u0027West Lake\u0027 THEN 503\r\n WHEN a.AdministrativeArea \u003d \u0027Salmon Valley\u0027 THEN 498\t\t\r\n WHEN a.AdministrativeArea \u003d \u0027Red Rock\u0027 THEN 496\r\n WHEN a.AdministrativeArea \u003d \u0027Stoner\u0027 THEN 499\r\n WHEN a.AdministrativeArea \u003d \u0027Pineview FFG\u0027 THEN 493\r\n WHEN a.AdministrativeArea \u003d \u0027Wonowon\u0027 THEN 506\r\n WHEN a.AdministrativeArea \u003d \u0027Halfway River\u0027 THEN 488\r\n WHEN a.AdministrativeArea \u003d \u0027Giscome\u0027 THEN 486\r\n WHEN a.AdministrativeArea \u003d \u0027Willow River\u0027 THEN 505\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lower Nicola\u0027 THEN 314\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Belcarra\u0027 THEN 425\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Tsawwassen\u0027 THEN 315\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Anmore\u0027 THEN 432\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lake Cowichan\u0027 THEN 442\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027North Cowichan\u0027 THEN 450\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Port Edward\u0027 THEN 347\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Spallumcheen\u0027 THEN 318\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Jumbo Glacier Mountain Resort Municipality\u0027 THEN 438\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Kent\u0027 THEN 439\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Highlands\u0027 THEN 348\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Slocan\u0027 THEN 380\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Warfield\u0027 THEN 448\r\n ELSE aa.Id \r\n END AS AdministrativeAreaId, \r\n\ta.Address1, \r\n\ta.Postal,\r\n\t1 as PropertyTypeID\r\nFROM \r\n [pims].[dbo].Buildings p\r\n\tINNER JOIN Addresses a\r\n\tON p.AddressId \u003d a.Id\r\n\tLEFT OUTER JOIN AdministrativeAreas aa\r\n\tON aa.Name \u003d a.AdministrativeArea\r\nWHERE p.BuildingPredominateUseId \u003c\u003d 54" - } - }, - { - "type": "databaseTransferProducer", - "location": { - "type": "query", - "project": "General", - "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", - "defaultCatalog": "pims", - "query": "\r\nSELECT pb.*\r\n FROM [pims].[dbo].ParcelBuildings pb\r\n INNER JOIN Buildings b\r\n ON b.Id \u003d pb.BuildingId\r\n WHERE b.BuildingPredominateUseId \u003c\u003d 54" - } - }, - { - "type": "databaseTransferProducer", - "location": { - "type": "query", - "project": "General", - "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", - "defaultCatalog": "pims", - "query": "SELECT [ParcelId]\r\n ,[Date]\r\n ,[Key]\r\n ,\r\n\t CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Firm]\r\n ,[Value]\r\n ,[Note]\r\n FROM [pims].[dbo].[ParcelEvaluations]" - } - }, - { - "type": "databaseTransferProducer", - "location": { - "type": "query", - "project": "General", - "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", - "defaultCatalog": "pims", - "query": "SELECT [ParcelId]\r\n ,[FiscalYear]\r\n ,[Key]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Value]\r\n ,[Note]\r\n ,[EffectiveDate]\r\n FROM [dbo].[ParcelFiscals]" - } - }, - { - "type": "databaseTransferProducer", - "location": { - "type": "query", - "project": "General", - "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", - "defaultCatalog": "pims", - "query": "\r\n SELECT BuildingId,\r\n FiscalYear,\r\n [Key],\r\n CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById],\r\n CreatedOn,\r\n UpdatedById,\r\n UpdatedOn,\r\n [Value],\r\n Note,\r\n EffectiveDate\r\n FROM BuildingFiscals \r\n \r\nWHERE BuildingId IN (\r\n\tSELECT b.Id \r\n\tFROM Buildings b\r\n\tWHERE b.BuildingPredominateUseId \u003c\u003d 54\r\n)" - } - }, - { - "type": "databaseTransferProducer", - "location": { - "type": "query", - "project": "General", - "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", - "defaultCatalog": "pims", - "query": "SELECT [BuildingId]\r\n ,[Date]\r\n ,[Key]\r\n ,\r\n\t CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Value]\r\n ,[Note]\r\n FROM [pims].[dbo].[BuildingEvaluations]\r\nWHERE BuildingId IN (\r\n\tSELECT b.Id \r\n\tFROM Buildings b\r\n\tWHERE b.BuildingPredominateUseId \u003c\u003d 54\r\n)" - } - }, - { - "type": "databaseTransferProducer", - "location": { - "type": "entity", - "project": "General", - "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Projects" - } - }, - { - "type": "databaseTransferProducer", - "location": { - "type": "query", - "project": "General", - "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", - "defaultCatalog": "pims", - "query": "\r\nSELECT [ProjectId]\r\n ,[TaskId]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[IsCompleted]\r\n ,[CompletedOn]\r\n FROM [dbo].[ProjectTasks]" - } - }, - { - "type": "databaseTransferProducer", - "location": { - "type": "query", - "project": "General", - "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", - "defaultCatalog": "pims", - "query": "SELECT [Id]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[IsFinal]\r\n ,[Name]\r\n ,[From]\r\n ,[To]\r\n ,[ReportType]\r\n FROM [dbo].[ProjectReports]" - } - }, - { - "type": "databaseTransferProducer", - "location": { - "type": "entity", - "project": "General", - "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectSnapshots" - } - }, - { - "type": "databaseTransferProducer", - "location": { - "type": "entity", - "project": "General", - "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectStatusHistory" - } - }, - { - "type": "databaseTransferProducer", - "location": { - "type": "entity", - "project": "General", - "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectProperties" - } - }, - { - "type": "databaseTransferProducer", - "location": { - "type": "query", - "project": "General", - "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", - "defaultCatalog": "pims", - "query": "\r\nSELECT [ProjectId]\r\n ,[AgencyId]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[OfferAmount]\r\n ,[NotificationId]\r\n ,[Response]\r\n ,[ReceivedOn]\r\n ,[Note]\r\n FROM [dbo].[ProjectAgencyResponses]" - } - }, - { - "type": "databaseTransferProducer", - "location": { - "type": "entity", - "project": "General", - "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectNumbers" - } - }, - { - "type": "databaseTransferProducer", - "location": { - "type": "query", - "project": "General", - "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", - "defaultCatalog": "pims", - "query": "SELECT [Id]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[ProjectId]\r\n ,[NoteType]\r\n ,[Note]\r\n FROM [dbo].[ProjectNotes]" - } - }, - { - "type": "databaseTransferProducer", - "location": { - "type": "entity", - "project": "General", - "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/NotificationQueue" - } - } - ], - "consumers": [ - { - "type": "databaseTransferConsumer" - }, - { - "type": "databaseTransferConsumer" - }, - { - "type": "databaseTransferConsumer" - }, - { - "type": "databaseTransferConsumer" - }, - { - "type": "databaseTransferConsumer" - }, - { - "type": "databaseTransferConsumer" - }, - { - "type": "databaseTransferConsumer" - }, - { - "type": "databaseTransferConsumer" - }, - { - "type": "databaseTransferConsumer" - }, - { - "type": "databaseTransferConsumer" - }, - { - "type": "databaseTransferConsumer" - }, - { - "type": "databaseTransferConsumer" - }, - { - "type": "databaseTransferConsumer" - }, - { - "type": "databaseTransferConsumer" - }, - { - "type": "databaseTransferConsumer" - }, - { - "type": "databaseTransferConsumer" - }, - { - "type": "databaseTransferConsumer" - }, - { - "type": "databaseTransferConsumer" - }, - { - "type": "databaseTransferConsumer" - } - ], - "configuration": { - "maxJobCount": 1, - "showFinalMessage": true, - "DatabaseTransferProducer": { - "extractType": "SEGMENTS", - "segmentSize": 1000, - "fetchSize": 10000, - "openNewConnections": false, - "queryRowCount": false, - "selectedColumnsOnly": false, - "selectedRowsOnly": false - }, - "DatabaseTransferConsumer": { - "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", - "openNewConnections": true, - "useTransactions": true, - "commitAfterRows": 1000, - "useMultiRowInsert": false, - "multiRowInsertBatch": 500, - "skipBindValues": false, - "disableUsingBatches": true, - "ignoreDuplicateRows": false, - "transferAutoGeneratedColumns": true, - "disableReferentialIntegrity": true, - "useBulkLoad": false, - "truncateBeforeLoad": false, - "openTableOnFinish": true, - "mappings": { - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Agencies": { - "targetName": "agency", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "\"Id\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing", - "transformer": "constant", - "transformerProperties": { - "constant": "00000000-0000-0000-0000-000000000000" - }, - "transformerPropertiesNames": "constant" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - }, - "Name": { - "targetName": "\"Name\"", - "mappingType": "existing" - }, - "isdisabled": { - "targetName": "\"IsDisabled\"", - "mappingType": "existing" - }, - "sortorder": { - "targetName": "\"SortOrder\"", - "mappingType": "existing" - }, - "code": { - "targetName": "\"Code\"", - "mappingType": "existing" - }, - "description": { - "targetName": "\"Description\"", - "mappingType": "existing" - }, - "parentid": { - "targetName": "\"ParentId\"", - "mappingType": "existing" - }, - "email": { - "targetName": "\"Email\"", - "mappingType": "existing" - }, - "sendemail": { - "targetName": "\"SendEmail\"", - "mappingType": "existing" - }, - "addressto": { - "targetName": "\"AddressTo\"", - "mappingType": "existing" - }, - "ccemail": { - "targetName": "\"CCEmail\"", - "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT \r\n u.[Id],\r\n \r\n\t CASE \r\n\t\tWHEN u.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE u.[CreatedById]\r\n\t END AS [CreatedById],\r\n \r\n\t CASE \r\n\t\tWHEN u.IsDisabled \u003d 0 THEN \u0027Active\u0027\r\n\t\tELSE \u0027Disabled\u0027\r\n\t END AS [Status],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n urd.CreatedOn,\r\n urd.UserId,\r\n ua.AgencyId, \r\n STRING_AGG(urd.RoleName, \u0027, \u0027) AS Roles,\r\n CASE \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%System Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial Reporter%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial%\u0027 THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Agency Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Analyst%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Manager%\u0027 THEN \u002700000000-0000-0000-0000-000000000001\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister Assistant%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Executive Director%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%View Only Properties%\u0027 THEN \u002700000000-0000-0000-0000-000000000002\u0027\r\n\t \r\n END AS UserType\r\nFROM Users u\r\nLEFT JOIN (\r\n SELECT \r\n ur.UserId,\r\n MAX(ur.CreatedOn) AS CreatedOn,\r\n STRING_AGG(r.Name, \u0027, \u0027) AS RoleName\r\n FROM [pims].[dbo].[UserRoles] ur\r\n INNER JOIN Roles r ON ur.RoleId \u003d r.Id\r\n GROUP BY ur.UserId\r\n) AS urd ON u.Id \u003d urd.UserId\r\n\r\nLEFT OUTER JOIN (\r\n SELECT UserId, MIN(AgencyId) AS AgencyId\r\n FROM UserAgencies\r\n GROUP BY UserId\r\n) ua_min ON u.Id \u003d ua_min.UserId\r\nLEFT OUTER JOIN UserAgencies ua ON u.Id \u003d ua.UserId AND ua.AgencyId \u003d ua_min.AgencyId\r\n\r\nWHERE u.Id \u003c\u003e \u002700000000-0000-0000-0000-000000000000\u0027\r\n\r\nGROUP BY u.[Id],\r\n u.[CreatedById],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n urd.CreatedOn, \r\n urd.UserId, \r\n ua.AgencyId\r\nORDER BY urd.CreatedOn ASC": { - "targetName": "user", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "id", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "createdbyid", - "mappingType": "existing" - }, - "status": { - "targetName": "status", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "updatedbyid", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "updatedon", - "mappingType": "existing" - }, - "username": { - "targetName": "username", - "mappingType": "existing" - }, - "displayname": { - "targetName": "displayname", - "mappingType": "existing" - }, - "firstname": { - "targetName": "firstname", - "mappingType": "existing" - }, - "middlename": { - "targetName": "middlename", - "mappingType": "existing" - }, - "lastname": { - "targetName": "lastname", - "mappingType": "existing" - }, - "email": { - "targetName": "email", - "mappingType": "existing" - }, - "Position": { - "targetName": "Position", - "mappingType": "existing" - }, - "isdisabled": { - "targetName": "isdisabled", - "mappingType": "existing" - }, - "emailverified": { - "targetName": "emailverified", - "mappingType": "existing" - }, - "note": { - "targetName": "note", - "mappingType": "existing" - }, - "issystem": { - "targetName": "issystem", - "mappingType": "existing" - }, - "lastlogin": { - "targetName": "lastlogin", - "mappingType": "existing" - }, - "approvedbyid": { - "targetName": "approvedbyid", - "mappingType": "existing" - }, - "approvedon": { - "targetName": "approvedon", - "mappingType": "existing" - }, - "keycloakuserid": { - "targetName": "keycloakuserid", - "mappingType": "existing" - }, - "createdon": { - "targetName": "createdon", - "mappingType": "existing" - }, - "userid": { - "targetName": "userid", - "mappingType": "skip" - }, - "agencyid": { - "targetName": "agencyid", - "mappingType": "existing" - }, - "roles": { - "targetName": "roles", - "mappingType": "skip" - }, - "usertype": { - "targetName": "\"RoleId\"", - "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT p.[Id],\r\n\t CASE \r\n\t\tWHEN p.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE p.[CreatedById]\r\n\t END AS [CreatedById],\r\n p.[CreatedOn],\r\n p.[UpdatedById],\r\n p.[UpdatedOn],\r\n p.[Name],\r\n p.[Description],\r\n p.[ClassificationId],\r\n p.[AgencyId],\r\n p.[IsSensitive],\r\n p.[IsVisibleToOtherAgencies],\r\n p.[PID],\r\n p.[PIN],\r\n p.[LandArea],\r\n p.[LandLegalDescription],\r\n p.[Zoning],\r\n p.[ZoningPotential],\r\n p.[NotOwned],\r\n\tCONVERT(VARCHAR(40), CAST(Location.Long AS DECIMAL(18, 14))) + \u0027, \u0027 + CONVERT(VARCHAR(40), CAST(Location.Lat AS DECIMAL(18, 14))) AS Location,\r\n CASE \r\n WHEN a.AdministrativeArea \u003d \u0027The Corporation of the City of Nelson\u0027 THEN 188\r\n WHEN a.AdministrativeArea \u003d \u0027Township of Langley\u0027 THEN 150\r\n WHEN a.AdministrativeArea \u003d \u0027District of North Vancouver\u0027 THEN 196\r\n WHEN a.AdministrativeArea \u003d \u0027Coombs\u0027 THEN 483\r\n WHEN a.AdministrativeArea \u003d \u0027Brookmere\u0027 THEN 481\r\n WHEN a.AdministrativeArea \u003d \u0027Thornhill\u0027 THEN 501\r\n WHEN a.AdministrativeArea \u003d \u0027Two Mile\u0027 THEN 502\r\n WHEN a.AdministrativeArea \u003d \u0027Crofton\u0027 THEN 484\r\n WHEN a.AdministrativeArea \u003d \u0027East Sooke\u0027 THEN 485\r\n WHEN a.AdministrativeArea \u003d \u0027Mudge Island\u0027 THEN 492\r\n WHEN a.AdministrativeArea \u003d \u0027Coal Harbour\u0027 THEN 482\r\n WHEN a.AdministrativeArea \u003d \u0027Miworth\u0027 THEN 490\r\n WHEN a.AdministrativeArea \u003d \u0027Lake Errock\u0027 THEN 489\r\n WHEN a.AdministrativeArea \u003d \u0027Black Creek\u0027 THEN 479\r\n WHEN a.AdministrativeArea \u003d \u0027Whaletown\u0027 THEN 504\r\n WHEN a.AdministrativeArea \u003d \u0027Quathiaski Cove\u0027 THEN 494\r\n WHEN a.AdministrativeArea \u003d \u0027Big Bay in Stuart Island\u0027 THEN 478\r\n WHEN a.AdministrativeArea \u003d \u0027Surge Narrows in Read Island\u0027 THEN 500\r\n WHEN a.AdministrativeArea \u003d \u0027Rock Bay in Sayward\u0027 THEN 497\r\n WHEN a.AdministrativeArea \u003d \u0027Granite Bay in Quadra Island\u0027 THEN 487\r\n WHEN a.AdministrativeArea \u003d \u0027Moberly Lake\u0027 THEN 491\r\n WHEN a.AdministrativeArea \u003d \u0027Quatsino\u0027 THEN 495\r\n WHEN a.AdministrativeArea \u003d \u0027Bouchie Lake\u0027 THEN 480\r\n WHEN a.AdministrativeArea \u003d \u0027West Lake\u0027 THEN 503\r\n WHEN a.AdministrativeArea \u003d \u0027Salmon Valley\u0027 THEN 498\t\t\r\n WHEN a.AdministrativeArea \u003d \u0027Red Rock\u0027 THEN 496\r\n WHEN a.AdministrativeArea \u003d \u0027Stoner\u0027 THEN 499\r\n WHEN a.AdministrativeArea \u003d \u0027Pineview FFG\u0027 THEN 493\r\n WHEN a.AdministrativeArea \u003d \u0027Wonowon\u0027 THEN 506\r\n WHEN a.AdministrativeArea \u003d \u0027Halfway River\u0027 THEN 488\r\n WHEN a.AdministrativeArea \u003d \u0027Giscome\u0027 THEN 486\r\n WHEN a.AdministrativeArea \u003d \u0027Willow River\u0027 THEN 505\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lower Nicola\u0027 THEN 314\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Belcarra\u0027 THEN 425\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Tsawwassen\u0027 THEN 315\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Anmore\u0027 THEN 432\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lake Cowichan\u0027 THEN 442\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027North Cowichan\u0027 THEN 450\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Port Edward\u0027 THEN 347\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Spallumcheen\u0027 THEN 318\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Jumbo Glacier Mountain Resort Municipality\u0027 THEN 438\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Kent\u0027 THEN 439\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Highlands\u0027 THEN 348\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Slocan\u0027 THEN 380\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Warfield\u0027 THEN 448\r\n ELSE aa.Id \r\n END AS AdministrativeAreaId, \r\n\ta.AdministrativeArea,\r\n\ta.Address1, \r\n\ta.Postal,\r\n\tpp.ParcelId as ParentID,\r\n\t0 as PropertyTypeID\r\nFROM \r\n [pims].[dbo].[Parcels] p\r\n\tINNER JOIN Addresses a\r\n\tON p.AddressId \u003d a.Id\r\n\tLEFT OUTER JOIN AdministrativeAreas aa\r\n\tON aa.Name \u003d a.AdministrativeArea\r\n    LEFT OUTER JOIN ParcelParcels pp\r\n    ON pp.SubdivisionId \u003d p.Id": { - "targetName": "parcel", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "\"Id\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "Name": { - "targetName": "\"Name\"", - "mappingType": "existing" - }, - "description": { - "targetName": "\"Description\"", - "mappingType": "existing" - }, - "classificationid": { - "targetName": "\"ClassificationId\"", - "mappingType": "existing" - }, - "agencyid": { - "targetName": "\"AgencyId\"", - "mappingType": "existing" - }, - "issensitive": { - "targetName": "\"IsSensitive\"", - "mappingType": "existing" - }, - "isvisibletootheragencies": { - "targetName": "\"IsVisibleToOtherAgencies\"", - "mappingType": "existing" - }, - "pid": { - "targetName": "\"PID\"", - "mappingType": "existing" - }, - "pin": { - "targetName": "\"PIN\"", - "mappingType": "existing" - }, - "landarea": { - "targetName": "\"LandArea\"", - "mappingType": "existing" - }, - "landlegaldescription": { - "targetName": "\"LandLegalDescription\"", - "mappingType": "existing" - }, - "zoning": { - "targetName": "\"Zoning\"", - "mappingType": "existing" - }, - "zoningpotential": { - "targetName": "\"ZoningPotential\"", - "mappingType": "existing" - }, - "notowned": { - "targetName": "\"NotOwned\"", - "mappingType": "existing" - }, - "Location": { - "targetName": "\"Location\"", - "mappingType": "existing" - }, - "administrativeareaid": { - "targetName": "\"AdministrativeAreaId\"", - "mappingType": "existing" - }, - "administrativearea": { - "targetName": "\"AdministrativeArea\"", - "mappingType": "skip" - }, - "address1": { - "targetName": "\"Address1\"", - "mappingType": "existing" - }, - "postal": { - "targetName": "\"Postal\"", - "mappingType": "existing" - }, - "parentid": { - "targetName": "\"ParentParcelId\"", - "mappingType": "existing" - }, - "propertytypeid": { - "targetName": "\"PropertyTypeID\"", - "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT p.[Id],\r\n\tCASE \r\n\t WHEN p.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t ELSE p.[CreatedById]\r\n\tEND AS [CreatedById],\r\n p.[CreatedOn],\r\n p.[UpdatedById],\r\n p.[UpdatedOn],\r\n p.[Name],\r\n p.[Description],\r\n p.[ClassificationId],\r\n p.BuildingConstructionTypeId,\r\n p.[AgencyId],\r\n p.[IsSensitive],\r\n p.[IsVisibleToOtherAgencies],\r\n\tp.BuildingFloorCount,\r\n\tp.BuildingPredominateUseId,\r\n\tp.BuildingTenancy,\r\n\tp.RentableArea,\r\n\tp.BuildingOccupantTypeId,\r\n\tp.LeaseExpiry,\r\n\tp.OccupantName,\r\n\tp.TransferLeaseOnSale,\r\n\tp.BuildingTenancyUpdatedOn,\r\n\tp.EncumbranceReason,\r\n\tp.LeasedLandMetadata,\r\n\tp.TotalArea,\r\n\tCONVERT(VARCHAR(40), CAST(Location.Long AS DECIMAL(18, 14))) + \u0027, \u0027 + CONVERT(VARCHAR(40), CAST(Location.Lat AS DECIMAL(18, 14))) AS Location,\r\n\tCASE \r\n WHEN a.AdministrativeArea \u003d \u0027The Corporation of the City of Nelson\u0027 THEN 188\r\n WHEN a.AdministrativeArea \u003d \u0027Township of Langley\u0027 THEN 150\r\n WHEN a.AdministrativeArea \u003d \u0027District of North Vancouver\u0027 THEN 196\r\n WHEN a.AdministrativeArea \u003d \u0027Coombs\u0027 THEN 483\r\n WHEN a.AdministrativeArea \u003d \u0027Brookmere\u0027 THEN 481\r\n WHEN a.AdministrativeArea \u003d \u0027Thornhill\u0027 THEN 501\r\n WHEN a.AdministrativeArea \u003d \u0027Two Mile\u0027 THEN 502\r\n WHEN a.AdministrativeArea \u003d \u0027Crofton\u0027 THEN 484\r\n WHEN a.AdministrativeArea \u003d \u0027East Sooke\u0027 THEN 485\r\n WHEN a.AdministrativeArea \u003d \u0027Mudge Island\u0027 THEN 492\r\n WHEN a.AdministrativeArea \u003d \u0027Coal Harbour\u0027 THEN 482\r\n WHEN a.AdministrativeArea \u003d \u0027Miworth\u0027 THEN 490\r\n WHEN a.AdministrativeArea \u003d \u0027Lake Errock\u0027 THEN 489\r\n WHEN a.AdministrativeArea \u003d \u0027Black Creek\u0027 THEN 479\r\n WHEN a.AdministrativeArea \u003d \u0027Whaletown\u0027 THEN 504\r\n WHEN a.AdministrativeArea \u003d \u0027Quathiaski Cove\u0027 THEN 494\r\n WHEN a.AdministrativeArea \u003d \u0027Big Bay in Stuart Island\u0027 THEN 478\r\n WHEN a.AdministrativeArea \u003d \u0027Surge Narrows in Read Island\u0027 THEN 500\r\n WHEN a.AdministrativeArea \u003d \u0027Rock Bay in Sayward\u0027 THEN 497\r\n WHEN a.AdministrativeArea \u003d \u0027Granite Bay in Quadra Island\u0027 THEN 487\r\n WHEN a.AdministrativeArea \u003d \u0027Moberly Lake\u0027 THEN 491\r\n WHEN a.AdministrativeArea \u003d \u0027Quatsino\u0027 THEN 495\r\n WHEN a.AdministrativeArea \u003d \u0027Bouchie Lake\u0027 THEN 480\r\n WHEN a.AdministrativeArea \u003d \u0027West Lake\u0027 THEN 503\r\n WHEN a.AdministrativeArea \u003d \u0027Salmon Valley\u0027 THEN 498\t\t\r\n WHEN a.AdministrativeArea \u003d \u0027Red Rock\u0027 THEN 496\r\n WHEN a.AdministrativeArea \u003d \u0027Stoner\u0027 THEN 499\r\n WHEN a.AdministrativeArea \u003d \u0027Pineview FFG\u0027 THEN 493\r\n WHEN a.AdministrativeArea \u003d \u0027Wonowon\u0027 THEN 506\r\n WHEN a.AdministrativeArea \u003d \u0027Halfway River\u0027 THEN 488\r\n WHEN a.AdministrativeArea \u003d \u0027Giscome\u0027 THEN 486\r\n WHEN a.AdministrativeArea \u003d \u0027Willow River\u0027 THEN 505\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lower Nicola\u0027 THEN 314\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Belcarra\u0027 THEN 425\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Tsawwassen\u0027 THEN 315\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Anmore\u0027 THEN 432\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lake Cowichan\u0027 THEN 442\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027North Cowichan\u0027 THEN 450\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Port Edward\u0027 THEN 347\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Spallumcheen\u0027 THEN 318\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Jumbo Glacier Mountain Resort Municipality\u0027 THEN 438\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Kent\u0027 THEN 439\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Highlands\u0027 THEN 348\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Slocan\u0027 THEN 380\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Warfield\u0027 THEN 448\r\n ELSE aa.Id \r\n END AS AdministrativeAreaId, \r\n\ta.Address1, \r\n\ta.Postal,\r\n\t1 as PropertyTypeID\r\nFROM \r\n [pims].[dbo].Buildings p\r\n\tINNER JOIN Addresses a\r\n\tON p.AddressId \u003d a.Id\r\n\tLEFT OUTER JOIN AdministrativeAreas aa\r\n\tON aa.Name \u003d a.AdministrativeArea\r\nWHERE p.BuildingPredominateUseId \u003c\u003d 54": { - "targetName": "building", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "\"Id\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "Name": { - "targetName": "\"Name\"", - "mappingType": "existing" - }, - "description": { - "targetName": "\"Description\"", - "mappingType": "existing" - }, - "classificationid": { - "targetName": "\"ClassificationId\"", - "mappingType": "existing" - }, - "buildingconstructiontypeid": { - "targetName": "\"BuildingConstructionTypeId\"", - "mappingType": "existing" - }, - "agencyid": { - "targetName": "\"AgencyId\"", - "mappingType": "existing" - }, - "issensitive": { - "targetName": "\"IsSensitive\"", - "mappingType": "existing" - }, - "isvisibletootheragencies": { - "targetName": "\"IsVisibleToOtherAgencies\"", - "mappingType": "existing" - }, - "buildingfloorcount": { - "targetName": "\"BuildingFloorCount\"", - "mappingType": "existing" - }, - "buildingpredominateuseid": { - "targetName": "\"BuildingPredominateUseId\"", - "mappingType": "existing" - }, - "buildingtenancy": { - "targetName": "\"BuildingTenancy\"", - "mappingType": "existing" - }, - "rentablearea": { - "targetName": "\"RentableArea\"", - "mappingType": "existing" - }, - "buildingoccupanttypeid": { - "targetName": "\"BuildingOccupantTypeId\"", - "mappingType": "existing" - }, - "leaseexpiry": { - "targetName": "\"LeaseExpiry\"", - "mappingType": "existing" - }, - "occupantname": { - "targetName": "\"OccupantName\"", - "mappingType": "existing" - }, - "transferleaseonsale": { - "targetName": "\"TransferLeaseOnSale\"", - "mappingType": "existing" - }, - "buildingtenancyupdatedon": { - "targetName": "\"BuildingTenancyUpdatedOn\"", - "mappingType": "existing" - }, - "encumbrancereason": { - "targetName": "\"EncumbranceReason\"", - "mappingType": "existing" - }, - "leasedlandmetadata": { - "targetName": "\"LeasedLandMetadata\"", - "mappingType": "existing" - }, - "totalarea": { - "targetName": "\"TotalArea\"", - "mappingType": "existing" - }, - "Location": { - "targetName": "\"Location\"", - "mappingType": "existing" - }, - "administrativeareaid": { - "targetName": "\"AdministrativeAreaId\"", - "mappingType": "existing" - }, - "address1": { - "targetName": "\"Address1\"", - "mappingType": "existing" - }, - "postal": { - "targetName": "\"Postal\"", - "mappingType": "existing" - }, - "propertytypeid": { - "targetName": "\"PropertyTypeID\"", - "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT pb.*\r\n FROM [pims].[dbo].ParcelBuildings pb\r\n INNER JOIN Buildings b\r\n ON b.Id \u003d pb.BuildingId\r\n WHERE b.BuildingPredominateUseId \u003c\u003d 54": { - "targetName": "parcel_building", - "mappingType": "existing", - "attributes": { - "parcelid": { - "targetName": "\"ParcelId\"", - "mappingType": "existing" - }, - "buildingid": { - "targetName": "\"BuildingId\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [ParcelId]\r\n ,[Date]\r\n ,[Key]\r\n ,\r\n\t CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Firm]\r\n ,[Value]\r\n ,[Note]\r\n FROM [pims].[dbo].[ParcelEvaluations]": { - "targetName": "parcel_evaluation", - "mappingType": "existing", - "attributes": { - "parcelid": { - "targetName": "\"ParcelId\"", - "mappingType": "existing" - }, - "Date": { - "targetName": "\"Date\"", - "mappingType": "existing" - }, - "Key": { - "targetName": "\"EvaluationKeyId\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "firm": { - "targetName": "\"Firm\"", - "mappingType": "existing" - }, - "value": { - "targetName": "\"Value\"", - "mappingType": "existing" - }, - "note": { - "targetName": "\"Note\"", - "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [ParcelId]\r\n ,[FiscalYear]\r\n ,[Key]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Value]\r\n ,[Note]\r\n ,[EffectiveDate]\r\n FROM [dbo].[ParcelFiscals]": { - "targetName": "parcel_fiscal", - "mappingType": "existing", - "attributes": { - "parcelid": { - "targetName": "parcelid", - "mappingType": "existing" - }, - "fiscalyear": { - "targetName": "fiscalyear", - "mappingType": "existing" - }, - "Key": { - "targetName": "\"FiscalKeyId\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "createdbyid", - "mappingType": "existing" - }, - "createdon": { - "targetName": "createdon", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "updatedbyid", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "updatedon", - "mappingType": "existing" - }, - "value": { - "targetName": "value", - "mappingType": "existing" - }, - "note": { - "targetName": "note", - "mappingType": "existing" - }, - "effectivedate": { - "targetName": "effectivedate", - "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\n SELECT BuildingId,\r\n FiscalYear,\r\n [Key],\r\n CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById],\r\n CreatedOn,\r\n UpdatedById,\r\n UpdatedOn,\r\n [Value],\r\n Note,\r\n EffectiveDate\r\n FROM BuildingFiscals \r\n \r\nWHERE BuildingId IN (\r\n\tSELECT b.Id \r\n\tFROM Buildings b\r\n\tWHERE b.BuildingPredominateUseId \u003c\u003d 54\r\n)": { - "targetName": "building_fiscal", - "mappingType": "existing", - "attributes": { - "buildingid": { - "targetName": "\"BuildingId\"", - "mappingType": "existing" - }, - "fiscalyear": { - "targetName": "\"FiscalYear\"", - "mappingType": "existing" - }, - "Key": { - "targetName": "\"FiscalKeyId\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "value": { - "targetName": "\"Value\"", - "mappingType": "existing" - }, - "note": { - "targetName": "\"Note\"", - "mappingType": "existing" - }, - "effectivedate": { - "targetName": "\"EffectiveDate\"", - "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [BuildingId]\r\n ,[Date]\r\n ,[Key]\r\n ,\r\n\t CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Value]\r\n ,[Note]\r\n FROM [pims].[dbo].[BuildingEvaluations]\r\nWHERE BuildingId IN (\r\n\tSELECT b.Id \r\n\tFROM Buildings b\r\n\tWHERE b.BuildingPredominateUseId \u003c\u003d 54\r\n)": { - "targetName": "building_evaluation", - "mappingType": "existing", - "attributes": { - "buildingid": { - "targetName": "\"BuildingId\"", - "mappingType": "existing" - }, - "Date": { - "targetName": "\"Date\"", - "mappingType": "existing" - }, - "Key": { - "targetName": "\"EvaluationKeyId\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "value": { - "targetName": "\"Value\"", - "mappingType": "existing" - }, - "note": { - "targetName": "\"Note\"", + "ccemail": { + "targetName": "\"CCEmail\"", "mappingType": "existing" } } }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Projects": { - "targetName": "project", + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT \r\n u.[Id],\r\n \r\n\t CASE \r\n\t\tWHEN u.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE u.[CreatedById]\r\n\t END AS [CreatedById],\r\n \r\n\t CASE \r\n\t\tWHEN u.IsDisabled \u003d 0 THEN \u0027Active\u0027\r\n\t\tELSE \u0027Disabled\u0027\r\n\t END AS [Status],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n urd.CreatedOn,\r\n urd.UserId,\r\n ua.AgencyId, \r\n STRING_AGG(urd.RoleName, \u0027, \u0027) AS Roles,\r\n CASE \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%System Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial Reporter%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial%\u0027 THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Agency Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Analyst%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Manager%\u0027 THEN \u002700000000-0000-0000-0000-000000000001\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister Assistant%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Executive Director%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%View Only Properties%\u0027 THEN \u002700000000-0000-0000-0000-000000000002\u0027\r\n\t \r\n END AS UserType\r\nFROM Users u\r\nLEFT JOIN (\r\n SELECT \r\n ur.UserId,\r\n MAX(ur.CreatedOn) AS CreatedOn,\r\n STRING_AGG(r.Name, \u0027, \u0027) AS RoleName\r\n FROM [pims].[dbo].[UserRoles] ur\r\n INNER JOIN Roles r ON ur.RoleId \u003d r.Id\r\n GROUP BY ur.UserId\r\n) AS urd ON u.Id \u003d urd.UserId\r\n\r\nLEFT OUTER JOIN (\r\n SELECT UserId, MIN(AgencyId) AS AgencyId\r\n FROM UserAgencies\r\n GROUP BY UserId\r\n) ua_min ON u.Id \u003d ua_min.UserId\r\nLEFT OUTER JOIN UserAgencies ua ON u.Id \u003d ua.UserId AND ua.AgencyId \u003d ua_min.AgencyId\r\n\r\nWHERE u.Id \u003c\u003e \u002700000000-0000-0000-0000-000000000000\u0027\r\n\r\nGROUP BY u.[Id],\r\n u.[CreatedById],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n urd.CreatedOn, \r\n urd.UserId, \r\n ua.AgencyId\r\nORDER BY urd.CreatedOn ASC": { + "targetName": "user", "mappingType": "existing", "attributes": { "id": { - "targetName": "\"Id\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", - "mappingType": "existing" - }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - }, - "projectnumber": { - "targetName": "\"ProjectNumber\"", - "mappingType": "existing" - }, - "Name": { - "targetName": "\"Name\"", - "mappingType": "existing" - }, - "workflowid": { - "targetName": "\"WorkflowId\"", - "mappingType": "existing" - }, - "manager": { - "targetName": "\"Manager\"", - "mappingType": "existing" - }, - "reportedfiscalyear": { - "targetName": "\"ReportedFiscalYear\"", + "targetName": "id", "mappingType": "existing" }, - "actualfiscalyear": { - "targetName": "\"ActualFiscalYear\"", + "createdbyid": { + "targetName": "createdbyid", "mappingType": "existing" }, - "agencyid": { - "targetName": "\"AgencyId\"", + "status": { + "targetName": "status", "mappingType": "existing" }, - "statusid": { - "targetName": "\"StatusId\"", + "updatedbyid": { + "targetName": "updatedbyid", "mappingType": "existing" }, - "description": { - "targetName": "\"Description\"", + "updatedon": { + "targetName": "updatedon", "mappingType": "existing" }, - "tierlevelid": { - "targetName": "\"TierLevelId\"", + "username": { + "targetName": "username", "mappingType": "existing" }, - "riskid": { - "targetName": "\"RiskId\"", + "displayname": { + "targetName": "displayname", "mappingType": "existing" }, - "metadata": { - "targetName": "\"Metadata\"", + "firstname": { + "targetName": "firstname", "mappingType": "existing" }, - "submittedon": { - "targetName": "\"SubmittedOn\"", + "middlename": { + "targetName": "middlename", "mappingType": "existing" }, - "approvedon": { - "targetName": "\"ApprovedOn\"", + "lastname": { + "targetName": "lastname", "mappingType": "existing" }, - "deniedon": { - "targetName": "\"DeniedOn\"", + "email": { + "targetName": "email", "mappingType": "existing" }, - "cancelledon": { - "targetName": "\"CancelledOn\"", + "Position": { + "targetName": "Position", "mappingType": "existing" }, - "completedon": { - "targetName": "\"CompletedOn\"", + "isdisabled": { + "targetName": "isdisabled", "mappingType": "existing" }, - "netbook": { - "targetName": "\"NetBook\"", + "emailverified": { + "targetName": "emailverified", "mappingType": "existing" }, - "market": { - "targetName": "\"Market\"", + "note": { + "targetName": "note", "mappingType": "existing" }, - "assessed": { - "targetName": "\"Assessed\"", + "issystem": { + "targetName": "issystem", "mappingType": "existing" }, - "appraised": { - "targetName": "\"Appraised\"", + "lastlogin": { + "targetName": "lastlogin", "mappingType": "existing" }, - "projecttype": { - "targetName": "\"ProjectType\"", - "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT [ProjectId]\r\n ,[TaskId]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[IsCompleted]\r\n ,[CompletedOn]\r\n FROM [dbo].[ProjectTasks]": { - "targetName": "project_task", - "mappingType": "existing", - "attributes": { - "projectid": { - "targetName": "\"ProjectId\"", + "approvedbyid": { + "targetName": "approvedbyid", "mappingType": "existing" }, - "taskid": { - "targetName": "\"TaskId\"", + "approvedon": { + "targetName": "approvedon", "mappingType": "existing" }, - "CreatedById\r\n ,[CreatedOn": { - "targetName": "\"CreatedById\"", + "keycloakuserid": { + "targetName": "keycloakuserid", "mappingType": "existing" }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", + "createdon": { + "targetName": "createdon", "mappingType": "existing" }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" + "userid": { + "targetName": "userid", + "mappingType": "skip" }, - "iscompleted": { - "targetName": "\"IsCompleted\"", + "agencyid": { + "targetName": "agencyid", "mappingType": "existing" }, - "completedon": { - "targetName": "\"CompletedOn\"", + "roles": { + "targetName": "roles", + "mappingType": "skip" + }, + "usertype": { + "targetName": "\"RoleId\"", "mappingType": "existing" } } }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [Id]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[IsFinal]\r\n ,[Name]\r\n ,[From]\r\n ,[To]\r\n ,[ReportType]\r\n FROM [dbo].[ProjectReports]": { - "targetName": "project_report", + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT p.[Id],\r\n\t CASE \r\n\t\tWHEN p.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE p.[CreatedById]\r\n\t END AS [CreatedById],\r\n p.[CreatedOn],\r\n p.[UpdatedById],\r\n p.[UpdatedOn],\r\n p.[Name],\r\n p.[Description],\r\n p.[ClassificationId],\r\n p.[AgencyId],\r\n p.[IsSensitive],\r\n p.[IsVisibleToOtherAgencies],\r\n p.[PID],\r\n p.[PIN],\r\n p.[LandArea],\r\n p.[LandLegalDescription],\r\n p.[Zoning],\r\n p.[ZoningPotential],\r\n p.[NotOwned],\r\n\tCONVERT(VARCHAR(40), CAST(Location.Long AS DECIMAL(18, 14))) + \u0027, \u0027 + CONVERT(VARCHAR(40), CAST(Location.Lat AS DECIMAL(18, 14))) AS Location,\r\n CASE \r\n WHEN a.AdministrativeArea \u003d \u0027The Corporation of the City of Nelson\u0027 THEN 188\r\n WHEN a.AdministrativeArea \u003d \u0027Township of Langley\u0027 THEN 150\r\n WHEN a.AdministrativeArea \u003d \u0027District of North Vancouver\u0027 THEN 196\r\n WHEN a.AdministrativeArea \u003d \u0027Coombs\u0027 THEN 483\r\n WHEN a.AdministrativeArea \u003d \u0027Brookmere\u0027 THEN 481\r\n WHEN a.AdministrativeArea \u003d \u0027Thornhill\u0027 THEN 501\r\n WHEN a.AdministrativeArea \u003d \u0027Two Mile\u0027 THEN 502\r\n WHEN a.AdministrativeArea \u003d \u0027Crofton\u0027 THEN 484\r\n WHEN a.AdministrativeArea \u003d \u0027East Sooke\u0027 THEN 485\r\n WHEN a.AdministrativeArea \u003d \u0027Mudge Island\u0027 THEN 492\r\n WHEN a.AdministrativeArea \u003d \u0027Coal Harbour\u0027 THEN 482\r\n WHEN a.AdministrativeArea \u003d \u0027Miworth\u0027 THEN 490\r\n WHEN a.AdministrativeArea \u003d \u0027Lake Errock\u0027 THEN 489\r\n WHEN a.AdministrativeArea \u003d \u0027Black Creek\u0027 THEN 479\r\n WHEN a.AdministrativeArea \u003d \u0027Whaletown\u0027 THEN 504\r\n WHEN a.AdministrativeArea \u003d \u0027Quathiaski Cove\u0027 THEN 494\r\n WHEN a.AdministrativeArea \u003d \u0027Big Bay in Stuart Island\u0027 THEN 478\r\n WHEN a.AdministrativeArea \u003d \u0027Surge Narrows in Read Island\u0027 THEN 500\r\n WHEN a.AdministrativeArea \u003d \u0027Rock Bay in Sayward\u0027 THEN 497\r\n WHEN a.AdministrativeArea \u003d \u0027Granite Bay in Quadra Island\u0027 THEN 487\r\n WHEN a.AdministrativeArea \u003d \u0027Moberly Lake\u0027 THEN 491\r\n WHEN a.AdministrativeArea \u003d \u0027Quatsino\u0027 THEN 495\r\n WHEN a.AdministrativeArea \u003d \u0027Bouchie Lake\u0027 THEN 480\r\n WHEN a.AdministrativeArea \u003d \u0027West Lake\u0027 THEN 503\r\n WHEN a.AdministrativeArea \u003d \u0027Salmon Valley\u0027 THEN 498\t\t\r\n WHEN a.AdministrativeArea \u003d \u0027Red Rock\u0027 THEN 496\r\n WHEN a.AdministrativeArea \u003d \u0027Stoner\u0027 THEN 499\r\n WHEN a.AdministrativeArea \u003d \u0027Pineview FFG\u0027 THEN 493\r\n WHEN a.AdministrativeArea \u003d \u0027Wonowon\u0027 THEN 506\r\n WHEN a.AdministrativeArea \u003d \u0027Halfway River\u0027 THEN 488\r\n WHEN a.AdministrativeArea \u003d \u0027Giscome\u0027 THEN 486\r\n WHEN a.AdministrativeArea \u003d \u0027Willow River\u0027 THEN 505\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lower Nicola\u0027 THEN 314\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Belcarra\u0027 THEN 425\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Tsawwassen\u0027 THEN 315\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Anmore\u0027 THEN 432\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lake Cowichan\u0027 THEN 442\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027North Cowichan\u0027 THEN 450\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Port Edward\u0027 THEN 347\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Spallumcheen\u0027 THEN 318\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Jumbo Glacier Mountain Resort Municipality\u0027 THEN 438\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Kent\u0027 THEN 439\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Highlands\u0027 THEN 348\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Slocan\u0027 THEN 380\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Warfield\u0027 THEN 448\r\n ELSE aa.Id \r\n END AS AdministrativeAreaId, \r\n\ta.AdministrativeArea,\r\n\ta.Address1, \r\n\ta.Postal,\r\n\tpp.ParcelId as ParentID,\r\n\t0 as PropertyTypeID\r\nFROM \r\n [pims].[dbo].[Parcels] p\r\n\tINNER JOIN Addresses a\r\n\tON p.AddressId \u003d a.Id\r\n\tLEFT OUTER JOIN AdministrativeAreas aa\r\n\tON aa.Name \u003d a.AdministrativeArea\r\n    LEFT OUTER JOIN ParcelParcels pp\r\n    ON pp.SubdivisionId \u003d p.Id": { + "targetName": "parcel", "mappingType": "existing", "attributes": { "id": { @@ -4656,88 +482,90 @@ "targetName": "\"UpdatedOn\"", "mappingType": "existing" }, - "isfinal": { - "targetName": "\"IsFinal\"", - "mappingType": "existing" - }, "Name": { "targetName": "\"Name\"", "mappingType": "existing" }, - "From": { - "targetName": "\"From\"", + "description": { + "targetName": "\"Description\"", "mappingType": "existing" }, - "To": { - "targetName": "\"To\"", + "classificationid": { + "targetName": "\"ClassificationId\"", "mappingType": "existing" }, - "reporttype": { - "targetName": "\"ReportTypeId\"", + "agencyid": { + "targetName": "\"AgencyId\"", "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectSnapshots": { - "targetName": "project_snapshot", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "\"Id\"", + }, + "issensitive": { + "targetName": "\"IsSensitive\"", "mappingType": "existing" }, - "createdbyid": { - "targetName": "\"CreatedById\"", + "isvisibletootheragencies": { + "targetName": "\"IsVisibleToOtherAgencies\"", "mappingType": "existing" }, - "createdon": { - "targetName": "\"CreatedOn\"", + "pid": { + "targetName": "\"PID\"", "mappingType": "existing" }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", + "pin": { + "targetName": "\"PIN\"", "mappingType": "existing" }, - "updatedon": { - "targetName": "\"UpdatedOn\"", + "landarea": { + "targetName": "\"LandArea\"", "mappingType": "existing" }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" + "landlegaldescription": { + "targetName": "\"LandLegalDescription\"", + "mappingType": "existing" }, - "projectid": { - "targetName": "\"ProjectId\"", + "zoning": { + "targetName": "\"Zoning\"", "mappingType": "existing" }, - "netbook": { - "targetName": "\"NetBook\"", + "zoningpotential": { + "targetName": "\"ZoningPotential\"", "mappingType": "existing" }, - "market": { - "targetName": "\"Market\"", + "notowned": { + "targetName": "\"NotOwned\"", "mappingType": "existing" }, - "assessed": { - "targetName": "\"Assessed\"", + "Location": { + "targetName": "\"Location\"", "mappingType": "existing" }, - "appraised": { - "targetName": "\"Appraised\"", + "administrativeareaid": { + "targetName": "\"AdministrativeAreaId\"", "mappingType": "existing" }, - "snapshoton": { - "targetName": "\"SnapshotOn\"", + "administrativearea": { + "targetName": "\"AdministrativeArea\"", + "mappingType": "skip" + }, + "address1": { + "targetName": "\"Address1\"", "mappingType": "existing" }, - "metadata": { - "targetName": "\"Metadata\"", + "postal": { + "targetName": "\"Postal\"", + "mappingType": "existing" + }, + "parentid": { + "targetName": "\"ParentParcelId\"", + "mappingType": "existing" + }, + "propertytypeid": { + "targetName": "\"PropertyTypeID\"", "mappingType": "existing" } } }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectStatusHistory": { - "targetName": "project_status_history", + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT p.[Id],\r\n\tCASE \r\n\t WHEN p.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t ELSE p.[CreatedById]\r\n\tEND AS [CreatedById],\r\n p.[CreatedOn],\r\n p.[UpdatedById],\r\n p.[UpdatedOn],\r\n p.[Name],\r\n p.[Description],\r\n p.[ClassificationId],\r\n p.BuildingConstructionTypeId,\r\n p.[AgencyId],\r\n p.[IsSensitive],\r\n p.[IsVisibleToOtherAgencies],\r\n\tp.BuildingFloorCount,\r\n\tp.BuildingPredominateUseId,\r\n\tp.BuildingTenancy,\r\n\tp.RentableArea,\r\n\tp.BuildingOccupantTypeId,\r\n\tp.LeaseExpiry,\r\n\tp.OccupantName,\r\n\tp.TransferLeaseOnSale,\r\n\tp.BuildingTenancyUpdatedOn,\r\n\tp.EncumbranceReason,\r\n\tp.LeasedLandMetadata,\r\n\tp.TotalArea,\r\n\tCONVERT(VARCHAR(40), CAST(Location.Long AS DECIMAL(18, 14))) + \u0027, \u0027 + CONVERT(VARCHAR(40), CAST(Location.Lat AS DECIMAL(18, 14))) AS Location,\r\n\tCASE \r\n WHEN a.AdministrativeArea \u003d \u0027The Corporation of the City of Nelson\u0027 THEN 188\r\n WHEN a.AdministrativeArea \u003d \u0027Township of Langley\u0027 THEN 150\r\n WHEN a.AdministrativeArea \u003d \u0027District of North Vancouver\u0027 THEN 196\r\n WHEN a.AdministrativeArea \u003d \u0027Coombs\u0027 THEN 483\r\n WHEN a.AdministrativeArea \u003d \u0027Brookmere\u0027 THEN 481\r\n WHEN a.AdministrativeArea \u003d \u0027Thornhill\u0027 THEN 501\r\n WHEN a.AdministrativeArea \u003d \u0027Two Mile\u0027 THEN 502\r\n WHEN a.AdministrativeArea \u003d \u0027Crofton\u0027 THEN 484\r\n WHEN a.AdministrativeArea \u003d \u0027East Sooke\u0027 THEN 485\r\n WHEN a.AdministrativeArea \u003d \u0027Mudge Island\u0027 THEN 492\r\n WHEN a.AdministrativeArea \u003d \u0027Coal Harbour\u0027 THEN 482\r\n WHEN a.AdministrativeArea \u003d \u0027Miworth\u0027 THEN 490\r\n WHEN a.AdministrativeArea \u003d \u0027Lake Errock\u0027 THEN 489\r\n WHEN a.AdministrativeArea \u003d \u0027Black Creek\u0027 THEN 479\r\n WHEN a.AdministrativeArea \u003d \u0027Whaletown\u0027 THEN 504\r\n WHEN a.AdministrativeArea \u003d \u0027Quathiaski Cove\u0027 THEN 494\r\n WHEN a.AdministrativeArea \u003d \u0027Big Bay in Stuart Island\u0027 THEN 478\r\n WHEN a.AdministrativeArea \u003d \u0027Surge Narrows in Read Island\u0027 THEN 500\r\n WHEN a.AdministrativeArea \u003d \u0027Rock Bay in Sayward\u0027 THEN 497\r\n WHEN a.AdministrativeArea \u003d \u0027Granite Bay in Quadra Island\u0027 THEN 487\r\n WHEN a.AdministrativeArea \u003d \u0027Moberly Lake\u0027 THEN 491\r\n WHEN a.AdministrativeArea \u003d \u0027Quatsino\u0027 THEN 495\r\n WHEN a.AdministrativeArea \u003d \u0027Bouchie Lake\u0027 THEN 480\r\n WHEN a.AdministrativeArea \u003d \u0027West Lake\u0027 THEN 503\r\n WHEN a.AdministrativeArea \u003d \u0027Salmon Valley\u0027 THEN 498\t\t\r\n WHEN a.AdministrativeArea \u003d \u0027Red Rock\u0027 THEN 496\r\n WHEN a.AdministrativeArea \u003d \u0027Stoner\u0027 THEN 499\r\n WHEN a.AdministrativeArea \u003d \u0027Pineview FFG\u0027 THEN 493\r\n WHEN a.AdministrativeArea \u003d \u0027Wonowon\u0027 THEN 506\r\n WHEN a.AdministrativeArea \u003d \u0027Halfway River\u0027 THEN 488\r\n WHEN a.AdministrativeArea \u003d \u0027Giscome\u0027 THEN 486\r\n WHEN a.AdministrativeArea \u003d \u0027Willow River\u0027 THEN 505\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lower Nicola\u0027 THEN 314\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Belcarra\u0027 THEN 425\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Tsawwassen\u0027 THEN 315\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Anmore\u0027 THEN 432\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lake Cowichan\u0027 THEN 442\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027North Cowichan\u0027 THEN 450\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Port Edward\u0027 THEN 347\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Spallumcheen\u0027 THEN 318\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Jumbo Glacier Mountain Resort Municipality\u0027 THEN 438\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Kent\u0027 THEN 439\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Highlands\u0027 THEN 348\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Slocan\u0027 THEN 380\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Warfield\u0027 THEN 448\r\n ELSE aa.Id \r\n END AS AdministrativeAreaId, \r\n\ta.Address1, \r\n\ta.Postal,\r\n\t1 as PropertyTypeID\r\nFROM \r\n [pims].[dbo].Buildings p\r\n\tINNER JOIN Addresses a\r\n\tON p.AddressId \u003d a.Id\r\n\tLEFT OUTER JOIN AdministrativeAreas aa\r\n\tON aa.Name \u003d a.AdministrativeArea\r\nWHERE p.BuildingPredominateUseId \u003c\u003d 54": { + "targetName": "building", "mappingType": "existing", "attributes": { "id": { @@ -4760,126 +588,114 @@ "targetName": "\"UpdatedOn\"", "mappingType": "existing" }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - }, - "projectid": { - "targetName": "\"ProjectId\"", + "Name": { + "targetName": "\"Name\"", "mappingType": "existing" }, - "workflowid": { - "targetName": "\"WorkflowId\"", + "description": { + "targetName": "\"Description\"", "mappingType": "existing" }, - "statusid": { - "targetName": "\"StatusId\"", + "classificationid": { + "targetName": "\"ClassificationId\"", "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectProperties": { - "targetName": "project_property", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "\"Id\"", + }, + "buildingconstructiontypeid": { + "targetName": "\"BuildingConstructionTypeId\"", "mappingType": "existing" }, - "createdbyid": { - "targetName": "\"CreatedById\"", + "agencyid": { + "targetName": "\"AgencyId\"", "mappingType": "existing" }, - "createdon": { - "targetName": "\"CreatedOn\"", + "issensitive": { + "targetName": "\"IsSensitive\"", "mappingType": "existing" }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", + "isvisibletootheragencies": { + "targetName": "\"IsVisibleToOtherAgencies\"", "mappingType": "existing" }, - "updatedon": { - "targetName": "\"UpdatedOn\"", + "buildingfloorcount": { + "targetName": "\"BuildingFloorCount\"", "mappingType": "existing" }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" + "buildingpredominateuseid": { + "targetName": "\"BuildingPredominateUseId\"", + "mappingType": "existing" }, - "projectid": { - "targetName": "\"ProjectId\"", + "buildingtenancy": { + "targetName": "\"BuildingTenancy\"", "mappingType": "existing" }, - "propertytype": { - "targetName": "\"PropertyTypeId\"", + "rentablearea": { + "targetName": "\"RentableArea\"", "mappingType": "existing" }, - "parcelid": { - "targetName": "\"ParcelId\"", + "buildingoccupanttypeid": { + "targetName": "\"BuildingOccupantTypeId\"", "mappingType": "existing" }, - "buildingid": { - "targetName": "\"BuildingId\"", + "leaseexpiry": { + "targetName": "\"LeaseExpiry\"", "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT [ProjectId]\r\n ,[AgencyId]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[OfferAmount]\r\n ,[NotificationId]\r\n ,[Response]\r\n ,[ReceivedOn]\r\n ,[Note]\r\n FROM [dbo].[ProjectAgencyResponses]": { - "targetName": "project_agency_response", - "mappingType": "existing", - "attributes": { - "projectid": { - "targetName": "\"ProjectId\"", + }, + "occupantname": { + "targetName": "\"OccupantName\"", "mappingType": "existing" }, - "agencyid": { - "targetName": "\"AgencyId\"", + "transferleaseonsale": { + "targetName": "\"TransferLeaseOnSale\"", "mappingType": "existing" }, - "createdbyid": { - "targetName": "\"CreatedById\"", + "buildingtenancyupdatedon": { + "targetName": "\"BuildingTenancyUpdatedOn\"", "mappingType": "existing" }, - "createdon": { - "targetName": "\"CreatedOn\"", + "encumbrancereason": { + "targetName": "\"EncumbranceReason\"", "mappingType": "existing" }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", + "leasedlandmetadata": { + "targetName": "\"LeasedLandMetadata\"", "mappingType": "existing" }, - "updatedon": { - "targetName": "\"UpdatedOn\"", + "totalarea": { + "targetName": "\"TotalArea\"", "mappingType": "existing" }, - "offeramount": { - "targetName": "\"OfferAmount\"", + "Location": { + "targetName": "\"Location\"", "mappingType": "existing" }, - "notificationid": { - "targetName": "\"NotificationId\"", + "administrativeareaid": { + "targetName": "\"AdministrativeAreaId\"", "mappingType": "existing" }, - "response": { - "targetName": "\"Response\"", + "address1": { + "targetName": "\"Address1\"", "mappingType": "existing" }, - "receivedon": { - "targetName": "\"ReceivedOn\"", + "postal": { + "targetName": "\"Postal\"", "mappingType": "existing" }, - "note": { - "targetName": "\"Note\"", + "propertytypeid": { + "targetName": "\"PropertyTypeID\"", "mappingType": "existing" } } }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectNumbers": { - "targetName": "project_number", + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT pb.*\r\n FROM [pims].[dbo].ParcelBuildings pb\r\n INNER JOIN Buildings b\r\n ON b.Id \u003d pb.BuildingId\r\n WHERE b.BuildingPredominateUseId \u003c\u003d 54": { + "targetName": "parcel_building", "mappingType": "existing", "attributes": { - "id": { - "targetName": "\"Id\"", + "parcelid": { + "targetName": "\"ParcelId\"", + "mappingType": "existing" + }, + "buildingid": { + "targetName": "\"BuildingId\"", "mappingType": "existing" }, "createdbyid": { @@ -4904,12 +720,20 @@ } } }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [Id]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[ProjectId]\r\n ,[NoteType]\r\n ,[Note]\r\n FROM [dbo].[ProjectNotes]": { - "targetName": "project_note", + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [ParcelId]\r\n ,[Date]\r\n ,[Key]\r\n ,\r\n\t CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Firm]\r\n ,[Value]\r\n ,[Note]\r\n FROM [pims].[dbo].[ParcelEvaluations]": { + "targetName": "parcel_evaluation", "mappingType": "existing", "attributes": { - "id": { - "targetName": "\"Id\"", + "parcelid": { + "targetName": "\"ParcelId\"", + "mappingType": "existing" + }, + "Date": { + "targetName": "\"Date\"", + "mappingType": "existing" + }, + "Key": { + "targetName": "\"EvaluationKeyId\"", "mappingType": "existing" }, "createdbyid": { @@ -4928,12 +752,12 @@ "targetName": "\"UpdatedOn\"", "mappingType": "existing" }, - "projectid": { - "targetName": "\"ProjectId\"", + "firm": { + "targetName": "\"Firm\"", "mappingType": "existing" }, - "notetype": { - "targetName": "\"NoteType\"", + "value": { + "targetName": "\"Value\"", "mappingType": "existing" }, "note": { @@ -4942,177 +766,66 @@ } } }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/NotificationQueue": { - "targetName": "notification_queue", + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [ParcelId]\r\n ,[FiscalYear]\r\n ,[Key]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Value]\r\n ,[Note]\r\n ,[EffectiveDate]\r\n FROM [dbo].[ParcelFiscals]": { + "targetName": "parcel_fiscal", "mappingType": "existing", "attributes": { - "id": { - "targetName": "\"Id\"", - "mappingType": "existing" - }, - "createdbyid": { - "targetName": "\"CreatedById\"", - "mappingType": "existing" - }, - "createdon": { - "targetName": "\"CreatedOn\"", - "mappingType": "existing" - }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", + "parcelid": { + "targetName": "parcelid", "mappingType": "existing" }, - "updatedon": { - "targetName": "\"UpdatedOn\"", + "fiscalyear": { + "targetName": "fiscalyear", "mappingType": "existing" }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - }, "Key": { - "targetName": "\"Key\"", - "mappingType": "existing" - }, - "status": { - "targetName": "\"Status\"", - "mappingType": "existing" - }, - "priority": { - "targetName": "\"Priority\"", - "mappingType": "existing" - }, - "Encoding": { - "targetName": "\"Encoding\"", - "mappingType": "existing" - }, - "sendon": { - "targetName": "\"SendOn\"", - "mappingType": "existing" - }, - "To": { - "targetName": "\"To\"", - "mappingType": "existing" - }, - "subject": { - "targetName": "\"Subject\"", - "mappingType": "existing" - }, - "bodytype": { - "targetName": "\"BodyType\"", - "mappingType": "existing" - }, - "body": { - "targetName": "\"Body\"", - "mappingType": "existing" - }, - "bcc": { - "targetName": "\"Bcc\"", - "mappingType": "existing" - }, - "cc": { - "targetName": "\"Cc\"", - "mappingType": "existing" - }, - "tag": { - "targetName": "\"Tag\"", - "mappingType": "existing" - }, - "projectid": { - "targetName": "\"ProjectId\"", - "mappingType": "existing" - }, - "toagencyid": { - "targetName": "\"ToAgencyId\"", - "mappingType": "existing" - }, - "templateid": { - "targetName": "\"TemplateId\"", - "mappingType": "existing" - }, - "chesmessageid": { - "targetName": "\"ChesMessageId\"", - "mappingType": "existing" - }, - "chestransactionid": { - "targetName": "\"ChesTransactionId\"", - "mappingType": "existing" - } - } - } - } - }, - "producer": "database_producer", - "consumer": "database_consumer" - } - } - }, - "61eece26-d465-43ec-837e-d9798e443840": { - "task": "dataExport", - "label": "ParcelEvaluationsExport", - "description": "", - "createTime": "202402150940", - "updateTime": "202402150940", - "state": { - "producers": [ - { - "type": "databaseTransferProducer", - "location": { - "type": "query", - "project": "General", - "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", - "defaultCatalog": "pims", - "query": "SELECT [ParcelId]\r\n ,[Date]\r\n ,[Key]\r\n ,\r\n\t CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Firm]\r\n ,[Value]\r\n ,[Note]\r\n FROM [pims].[dbo].[ParcelEvaluations]" - } - } - ], - "consumers": [ - { - "type": "databaseTransferConsumer" - } - ], - "configuration": { - "maxJobCount": 1, - "showFinalMessage": true, - "DatabaseTransferProducer": { - "extractType": "SEGMENTS", - "segmentSize": 1000, - "fetchSize": 10000, - "openNewConnections": false, - "queryRowCount": false, - "selectedColumnsOnly": false, - "selectedRowsOnly": false - }, - "DatabaseTransferConsumer": { - "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", - "openNewConnections": true, - "useTransactions": true, - "commitAfterRows": 1000, - "useMultiRowInsert": false, - "multiRowInsertBatch": 500, - "skipBindValues": false, - "disableUsingBatches": true, - "ignoreDuplicateRows": false, - "transferAutoGeneratedColumns": true, - "disableReferentialIntegrity": false, - "useBulkLoad": false, - "truncateBeforeLoad": false, - "openTableOnFinish": true, - "mappings": { - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ParcelEvaluations": { - "targetName": "parcel_evaluation", + "targetName": "\"FiscalKeyId\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "createdbyid", + "mappingType": "existing" + }, + "createdon": { + "targetName": "createdon", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "updatedbyid", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "updatedon", + "mappingType": "existing" + }, + "value": { + "targetName": "value", + "mappingType": "existing" + }, + "note": { + "targetName": "note", + "mappingType": "existing" + }, + "effectivedate": { + "targetName": "effectivedate", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\n SELECT BuildingId,\r\n FiscalYear,\r\n [Key],\r\n CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById],\r\n CreatedOn,\r\n UpdatedById,\r\n UpdatedOn,\r\n [Value],\r\n Note,\r\n EffectiveDate\r\n FROM BuildingFiscals \r\n \r\nWHERE BuildingId IN (\r\n\tSELECT b.Id \r\n\tFROM Buildings b\r\n\tWHERE b.BuildingPredominateUseId \u003c\u003d 54\r\n)": { + "targetName": "building_fiscal", "mappingType": "existing", "attributes": { - "parcelid": { - "targetName": "\"ParcelId\"", + "buildingid": { + "targetName": "\"BuildingId\"", "mappingType": "existing" }, - "Date": { - "targetName": "\"Date\"", + "fiscalyear": { + "targetName": "\"FiscalYear\"", "mappingType": "existing" }, "Key": { - "targetName": "\"EvaluationKeyId\"", + "targetName": "\"FiscalKeyId\"", "mappingType": "existing" }, "createdbyid": { @@ -5131,13 +844,6 @@ "targetName": "\"UpdatedOn\"", "mappingType": "existing" }, - "rowversion": { - "mappingType": "skip" - }, - "firm": { - "targetName": "\"Firm\"", - "mappingType": "existing" - }, "value": { "targetName": "\"Value\"", "mappingType": "existing" @@ -5145,15 +851,19 @@ "note": { "targetName": "\"Note\"", "mappingType": "existing" + }, + "effectivedate": { + "targetName": "\"EffectiveDate\"", + "mappingType": "existing" } } }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [ParcelId]\r\n ,[Date]\r\n ,[Key]\r\n ,\r\n\t CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Firm]\r\n ,[Value]\r\n ,[Note]\r\n FROM [pims].[dbo].[ParcelEvaluations]": { - "targetName": "parcel_evaluation", + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [BuildingId]\r\n ,[Date]\r\n ,[Key]\r\n ,\r\n\t CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Value]\r\n ,[Note]\r\n FROM [pims].[dbo].[BuildingEvaluations]\r\nWHERE BuildingId IN (\r\n\tSELECT b.Id \r\n\tFROM Buildings b\r\n\tWHERE b.BuildingPredominateUseId \u003c\u003d 54\r\n)": { + "targetName": "building_evaluation", "mappingType": "existing", "attributes": { - "parcelid": { - "targetName": "\"ParcelId\"", + "buildingid": { + "targetName": "\"BuildingId\"", "mappingType": "existing" }, "Date": { @@ -5180,10 +890,6 @@ "targetName": "\"UpdatedOn\"", "mappingType": "existing" }, - "firm": { - "targetName": "\"Firm\"", - "mappingType": "existing" - }, "value": { "targetName": "\"Value\"", "mappingType": "existing" @@ -5193,80 +899,165 @@ "mappingType": "existing" } } - } - } - }, - "producer": "database_producer", - "consumer": "database_consumer" - } - } - }, - "a8547f52-50ee-44cc-8c87-d39f2b229591": { - "task": "dataExport", - "label": "BuildingEvaluationsExport", - "description": "", - "taskFolder": "Testing", - "createTime": "202402151103", - "updateTime": "202402151103", - "state": { - "producers": [ - { - "type": "databaseTransferProducer", - "location": { - "type": "query", - "project": "General", - "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", - "query": "SELECT [BuildingId]\r\n ,[Date]\r\n ,[Key]\r\n ,\r\n\t CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Value]\r\n ,[Note]\r\n FROM [pims].[dbo].[BuildingEvaluations]\r\nWHERE BuildingId IN (\r\n\tSELECT b.Id \r\n\tFROM Buildings b\r\n\tWHERE b.BuildingPredominateUseId \u003c\u003d 54\r\n)" - } - } - ], - "consumers": [ - { - "type": "databaseTransferConsumer" - } - ], - "configuration": { - "maxJobCount": 1, - "showFinalMessage": true, - "DatabaseTransferProducer": { - "extractType": "SEGMENTS", - "segmentSize": 1000, - "fetchSize": 10000, - "openNewConnections": false, - "queryRowCount": false, - "selectedColumnsOnly": false, - "selectedRowsOnly": false - }, - "DatabaseTransferConsumer": { - "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", - "openNewConnections": true, - "useTransactions": true, - "commitAfterRows": 1000, - "useMultiRowInsert": false, - "multiRowInsertBatch": 500, - "skipBindValues": false, - "disableUsingBatches": true, - "ignoreDuplicateRows": false, - "transferAutoGeneratedColumns": true, - "disableReferentialIntegrity": false, - "useBulkLoad": false, - "truncateBeforeLoad": false, - "openTableOnFinish": true, - "mappings": { - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [BuildingId]\r\n ,[Date]\r\n ,[Key]\r\n ,\r\n\t CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Value]\r\n ,[Note]\r\n FROM [pims].[dbo].[BuildingEvaluations]\r\nWHERE BuildingId IN (\r\n\tSELECT b.Id \r\n\tFROM Buildings b\r\n\tWHERE b.BuildingPredominateUseId \u003c\u003d 54\r\n)": { - "targetName": "building_evaluation", + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Projects": { + "targetName": "project", "mappingType": "existing", "attributes": { - "buildingid": { - "targetName": "\"BuildingId\"", + "id": { + "targetName": "\"Id\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "projectnumber": { + "targetName": "\"ProjectNumber\"", + "mappingType": "existing" + }, + "Name": { + "targetName": "\"Name\"", + "mappingType": "existing" + }, + "workflowid": { + "targetName": "\"WorkflowId\"", + "mappingType": "existing" + }, + "manager": { + "targetName": "\"Manager\"", + "mappingType": "existing" + }, + "reportedfiscalyear": { + "targetName": "\"ReportedFiscalYear\"", + "mappingType": "existing" + }, + "actualfiscalyear": { + "targetName": "\"ActualFiscalYear\"", + "mappingType": "existing" + }, + "agencyid": { + "targetName": "\"AgencyId\"", + "mappingType": "existing" + }, + "statusid": { + "targetName": "\"StatusId\"", + "mappingType": "existing" + }, + "description": { + "targetName": "\"Description\"", + "mappingType": "existing" + }, + "tierlevelid": { + "targetName": "\"TierLevelId\"", + "mappingType": "existing" + }, + "riskid": { + "targetName": "\"RiskId\"", + "mappingType": "existing" + }, + "metadata": { + "targetName": "\"Metadata\"", + "mappingType": "existing" + }, + "submittedon": { + "targetName": "\"SubmittedOn\"", + "mappingType": "existing" + }, + "approvedon": { + "targetName": "\"ApprovedOn\"", + "mappingType": "existing" + }, + "deniedon": { + "targetName": "\"DeniedOn\"", + "mappingType": "existing" + }, + "cancelledon": { + "targetName": "\"CancelledOn\"", + "mappingType": "existing" + }, + "completedon": { + "targetName": "\"CompletedOn\"", + "mappingType": "existing" + }, + "netbook": { + "targetName": "\"NetBook\"", + "mappingType": "existing" + }, + "market": { + "targetName": "\"Market\"", + "mappingType": "existing" + }, + "assessed": { + "targetName": "\"Assessed\"", + "mappingType": "existing" + }, + "appraised": { + "targetName": "\"Appraised\"", + "mappingType": "existing" + }, + "projecttype": { + "targetName": "\"ProjectType\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT [ProjectId]\r\n ,[TaskId]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[IsCompleted]\r\n ,[CompletedOn]\r\n FROM [dbo].[ProjectTasks]": { + "targetName": "project_task", + "mappingType": "existing", + "attributes": { + "projectid": { + "targetName": "\"ProjectId\"", + "mappingType": "existing" + }, + "taskid": { + "targetName": "\"TaskId\"", + "mappingType": "existing" + }, + "CreatedById\r\n ,[CreatedOn": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", "mappingType": "existing" }, - "Date": { - "targetName": "\"Date\"", + "updatedon": { + "targetName": "\"UpdatedOn\"", "mappingType": "existing" }, - "Key": { - "targetName": "\"EvaluationKeyId\"", + "iscompleted": { + "targetName": "\"IsCompleted\"", + "mappingType": "existing" + }, + "completedon": { + "targetName": "\"CompletedOn\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [Id]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[IsFinal]\r\n ,[Name]\r\n ,[From]\r\n ,[To]\r\n ,[ReportType]\r\n FROM [dbo].[ProjectReports]": { + "targetName": "project_report", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", "mappingType": "existing" }, "createdbyid": { @@ -5285,89 +1076,34 @@ "targetName": "\"UpdatedOn\"", "mappingType": "existing" }, - "value": { - "targetName": "\"Value\"", + "isfinal": { + "targetName": "\"IsFinal\"", "mappingType": "existing" }, - "note": { - "targetName": "\"Note\"", + "Name": { + "targetName": "\"Name\"", "mappingType": "existing" - } - } - } - } - }, - "producer": "database_producer", - "consumer": "database_consumer" - } - } - }, - "b0670349-36fe-48f2-83f1-a8712f4da3cc": { - "task": "dataExport", - "label": "BuildingFiscalsExport", - "description": "", - "taskFolder": "Testing", - "createTime": "202402151417", - "updateTime": "202402151417", - "state": { - "producers": [ - { - "type": "databaseTransferProducer", - "location": { - "type": "query", - "project": "General", - "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", - "query": "\r\n SELECT BuildingId,\r\n FiscalYear,\r\n [Key],\r\n CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById],\r\n CreatedOn,\r\n UpdatedById,\r\n UpdatedOn,\r\n [Value],\r\n Note,\r\n EffectiveDate\r\n FROM BuildingFiscals \r\n \r\nWHERE BuildingId IN (\r\n\tSELECT b.Id \r\n\tFROM Buildings b\r\n\tWHERE b.BuildingPredominateUseId \u003c\u003d 54\r\n)" - } - } - ], - "consumers": [ - { - "type": "databaseTransferConsumer" - } - ], - "configuration": { - "maxJobCount": 1, - "showFinalMessage": true, - "DatabaseTransferProducer": { - "extractType": "SEGMENTS", - "segmentSize": 1000, - "fetchSize": 10000, - "openNewConnections": false, - "queryRowCount": false, - "selectedColumnsOnly": false, - "selectedRowsOnly": false - }, - "DatabaseTransferConsumer": { - "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", - "openNewConnections": true, - "useTransactions": true, - "commitAfterRows": 1000, - "useMultiRowInsert": false, - "multiRowInsertBatch": 500, - "skipBindValues": false, - "disableUsingBatches": true, - "ignoreDuplicateRows": false, - "transferAutoGeneratedColumns": true, - "disableReferentialIntegrity": true, - "useBulkLoad": false, - "truncateBeforeLoad": false, - "openTableOnFinish": true, - "mappings": { - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\n SELECT BuildingId,\r\n FiscalYear,\r\n [Key],\r\n CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById],\r\n CreatedOn,\r\n UpdatedById,\r\n UpdatedOn,\r\n [Value],\r\n Note,\r\n EffectiveDate\r\n FROM BuildingFiscals \r\n \r\nWHERE BuildingId IN (\r\n\tSELECT b.Id \r\n\tFROM Buildings b\r\n\tWHERE b.BuildingPredominateUseId \u003c\u003d 54\r\n)": { - "targetName": "building_fiscal", - "mappingType": "existing", - "attributes": { - "buildingid": { - "targetName": "\"BuildingId\"", + }, + "From": { + "targetName": "\"From\"", "mappingType": "existing" }, - "fiscalyear": { - "targetName": "\"FiscalYear\"", + "To": { + "targetName": "\"To\"", "mappingType": "existing" }, - "Key": { - "targetName": "\"FiscalKeyId\"", + "reporttype": { + "targetName": "\"ReportTypeId\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectSnapshots": { + "targetName": "project_snapshot", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", "mappingType": "existing" }, "createdbyid": { @@ -5386,81 +1122,42 @@ "targetName": "\"UpdatedOn\"", "mappingType": "existing" }, - "value": { - "targetName": "\"Value\"", + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "projectid": { + "targetName": "\"ProjectId\"", "mappingType": "existing" }, - "note": { - "targetName": "\"Note\"", + "netbook": { + "targetName": "\"NetBook\"", "mappingType": "existing" }, - "effectivedate": { - "targetName": "\"EffectiveDate\"", + "market": { + "targetName": "\"Market\"", + "mappingType": "existing" + }, + "assessed": { + "targetName": "\"Assessed\"", + "mappingType": "existing" + }, + "appraised": { + "targetName": "\"Appraised\"", + "mappingType": "existing" + }, + "snapshoton": { + "targetName": "\"SnapshotOn\"", + "mappingType": "existing" + }, + "metadata": { + "targetName": "\"Metadata\"", "mappingType": "existing" } } - } - } - }, - "producer": "database_producer", - "consumer": "database_consumer" - } - } - }, - "d054c29f-10f6-441b-a0ad-7d69d9bdea31": { - "task": "dataExport", - "label": "ProjectsExport", - "description": "", - "taskFolder": "Testing", - "createTime": "202402151428", - "updateTime": "202402151428", - "state": { - "producers": [ - { - "type": "databaseTransferProducer", - "location": { - "type": "query", - "project": "General", - "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", - "query": "\r\nSELECT [ProjectId]\r\n ,[TaskId]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[IsCompleted]\r\n ,[CompletedOn]\r\n FROM [dbo].[ProjectTasks]" - } - } - ], - "consumers": [ - { - "type": "databaseTransferConsumer" - } - ], - "configuration": { - "maxJobCount": 1, - "showFinalMessage": true, - "DatabaseTransferProducer": { - "extractType": "SEGMENTS", - "segmentSize": 1000, - "fetchSize": 10000, - "openNewConnections": false, - "queryRowCount": false, - "selectedColumnsOnly": false, - "selectedRowsOnly": false - }, - "DatabaseTransferConsumer": { - "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", - "openNewConnections": true, - "useTransactions": true, - "commitAfterRows": 1000, - "useMultiRowInsert": false, - "multiRowInsertBatch": 500, - "skipBindValues": false, - "disableUsingBatches": true, - "ignoreDuplicateRows": false, - "transferAutoGeneratedColumns": true, - "disableReferentialIntegrity": true, - "useBulkLoad": false, - "truncateBeforeLoad": false, - "openTableOnFinish": true, - "mappings": { - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Projects": { - "targetName": "project", + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectStatusHistory": { + "targetName": "project_status_history", "mappingType": "existing", "attributes": { "id": { @@ -5487,110 +1184,160 @@ "targetName": "\"RowVersion\"", "mappingType": "skip" }, - "projectnumber": { - "targetName": "\"ProjectNumber\"", - "mappingType": "existing" - }, - "Name": { - "targetName": "\"Name\"", + "projectid": { + "targetName": "\"ProjectId\"", "mappingType": "existing" }, "workflowid": { "targetName": "\"WorkflowId\"", "mappingType": "existing" }, - "manager": { - "targetName": "\"Manager\"", + "statusid": { + "targetName": "\"StatusId\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectProperties": { + "targetName": "project_property", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", + "mappingType": "existing" + }, + "createdbyid": { + "targetName": "\"CreatedById\"", + "mappingType": "existing" + }, + "createdon": { + "targetName": "\"CreatedOn\"", + "mappingType": "existing" + }, + "updatedbyid": { + "targetName": "\"UpdatedById\"", + "mappingType": "existing" + }, + "updatedon": { + "targetName": "\"UpdatedOn\"", + "mappingType": "existing" + }, + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "projectid": { + "targetName": "\"ProjectId\"", + "mappingType": "existing" + }, + "propertytype": { + "targetName": "\"PropertyTypeId\"", "mappingType": "existing" }, - "reportedfiscalyear": { - "targetName": "\"ReportedFiscalYear\"", + "parcelid": { + "targetName": "\"ParcelId\"", "mappingType": "existing" }, - "actualfiscalyear": { - "targetName": "\"ActualFiscalYear\"", + "buildingid": { + "targetName": "\"BuildingId\"", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT [ProjectId]\r\n ,[AgencyId]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[OfferAmount]\r\n ,[NotificationId]\r\n ,[Response]\r\n ,[ReceivedOn]\r\n ,[Note]\r\n FROM [dbo].[ProjectAgencyResponses]": { + "targetName": "project_agency_response", + "mappingType": "existing", + "attributes": { + "projectid": { + "targetName": "\"ProjectId\"", "mappingType": "existing" }, "agencyid": { "targetName": "\"AgencyId\"", "mappingType": "existing" }, - "statusid": { - "targetName": "\"StatusId\"", + "createdbyid": { + "targetName": "\"CreatedById\"", "mappingType": "existing" }, - "description": { - "targetName": "\"Description\"", + "createdon": { + "targetName": "\"CreatedOn\"", "mappingType": "existing" }, - "tierlevelid": { - "targetName": "\"TierLevelId\"", + "updatedbyid": { + "targetName": "\"UpdatedById\"", "mappingType": "existing" }, - "riskid": { - "targetName": "\"RiskId\"", + "updatedon": { + "targetName": "\"UpdatedOn\"", "mappingType": "existing" }, - "metadata": { - "targetName": "\"Metadata\"", + "offeramount": { + "targetName": "\"OfferAmount\"", "mappingType": "existing" }, - "submittedon": { - "targetName": "\"SubmittedOn\"", + "notificationid": { + "targetName": "\"NotificationId\"", "mappingType": "existing" }, - "approvedon": { - "targetName": "\"ApprovedOn\"", + "response": { + "targetName": "\"Response\"", "mappingType": "existing" }, - "deniedon": { - "targetName": "\"DeniedOn\"", + "receivedon": { + "targetName": "\"ReceivedOn\"", "mappingType": "existing" }, - "cancelledon": { - "targetName": "\"CancelledOn\"", + "note": { + "targetName": "\"Note\"", "mappingType": "existing" - }, - "completedon": { - "targetName": "\"CompletedOn\"", + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectNumbers": { + "targetName": "project_number", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", "mappingType": "existing" }, - "netbook": { - "targetName": "\"NetBook\"", + "createdbyid": { + "targetName": "\"CreatedById\"", "mappingType": "existing" }, - "market": { - "targetName": "\"Market\"", + "createdon": { + "targetName": "\"CreatedOn\"", "mappingType": "existing" }, - "assessed": { - "targetName": "\"Assessed\"", + "updatedbyid": { + "targetName": "\"UpdatedById\"", "mappingType": "existing" }, - "appraised": { - "targetName": "\"Appraised\"", + "updatedon": { + "targetName": "\"UpdatedOn\"", "mappingType": "existing" }, - "projecttype": { - "targetName": "\"ProjectType\"", - "mappingType": "existing" + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" } } }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT [ProjectId]\r\n ,[TaskId]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[IsCompleted]\r\n ,[CompletedOn]\r\n FROM [dbo].[ProjectTasks]": { - "targetName": "project_task", + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [Id]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[ProjectId]\r\n ,[NoteType]\r\n ,[Note]\r\n FROM [dbo].[ProjectNotes]": { + "targetName": "project_note", "mappingType": "existing", "attributes": { - "projectid": { - "targetName": "\"ProjectId\"", + "id": { + "targetName": "\"Id\"", "mappingType": "existing" }, - "taskid": { - "targetName": "\"TaskId\"", + "createdbyid": { + "targetName": "\"CreatedById\"", "mappingType": "existing" }, - "CreatedById\r\n ,[CreatedOn": { - "targetName": "\"CreatedById\"", + "createdon": { + "targetName": "\"CreatedOn\"", "mappingType": "existing" }, "updatedbyid": { @@ -5601,85 +1348,26 @@ "targetName": "\"UpdatedOn\"", "mappingType": "existing" }, - "iscompleted": { - "targetName": "\"IsCompleted\"", + "projectid": { + "targetName": "\"ProjectId\"", "mappingType": "existing" }, - "completedon": { - "targetName": "\"CompletedOn\"", + "notetype": { + "targetName": "\"NoteType\"", + "mappingType": "existing" + }, + "note": { + "targetName": "\"Note\"", "mappingType": "existing" } } - } - } - }, - "producer": "database_producer", - "consumer": "database_consumer" - } - } - }, - "ffb584f8-e245-4b85-b70f-6ccf505e7928": { - "task": "dataExport", - "label": "ProjectAgencyResponsesExport", - "description": "", - "taskFolder": "Testing", - "createTime": "202402161327", - "updateTime": "202402161327", - "state": { - "producers": [ - { - "type": "databaseTransferProducer", - "location": { - "type": "query", - "project": "General", - "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", - "query": "\r\nSELECT [ProjectId]\r\n ,[AgencyId]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[OfferAmount]\r\n ,[NotificationId]\r\n ,[Response]\r\n ,[ReceivedOn]\r\n ,[Note]\r\n FROM [dbo].[ProjectAgencyResponses]" - } - } - ], - "consumers": [ - { - "type": "databaseTransferConsumer" - } - ], - "configuration": { - "maxJobCount": 1, - "showFinalMessage": true, - "DatabaseTransferProducer": { - "extractType": "SEGMENTS", - "segmentSize": 1000, - "fetchSize": 10000, - "openNewConnections": false, - "queryRowCount": false, - "selectedColumnsOnly": false, - "selectedRowsOnly": false - }, - "DatabaseTransferConsumer": { - "entityId": "postgres-jdbc-18ceb57db81-643fa3bb56d54f2f/postgres/public", - "openNewConnections": true, - "useTransactions": true, - "commitAfterRows": 1000, - "useMultiRowInsert": false, - "multiRowInsertBatch": 500, - "skipBindValues": false, - "disableUsingBatches": true, - "ignoreDuplicateRows": false, - "transferAutoGeneratedColumns": true, - "disableReferentialIntegrity": true, - "useBulkLoad": false, - "truncateBeforeLoad": false, - "openTableOnFinish": true, - "mappings": { - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT [ProjectId]\r\n ,[AgencyId]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[OfferAmount]\r\n ,[NotificationId]\r\n ,[Response]\r\n ,[ReceivedOn]\r\n ,[Note]\r\n FROM [dbo].[ProjectAgencyResponses]": { - "targetName": "project_agency_response", + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/NotificationQueue": { + "targetName": "notification_queue", "mappingType": "existing", "attributes": { - "projectid": { - "targetName": "\"ProjectId\"", - "mappingType": "existing" - }, - "agencyid": { - "targetName": "\"AgencyId\"", + "id": { + "targetName": "\"Id\"", "mappingType": "existing" }, "createdbyid": { @@ -5698,24 +1386,76 @@ "targetName": "\"UpdatedOn\"", "mappingType": "existing" }, - "offeramount": { - "targetName": "\"OfferAmount\"", + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "Key": { + "targetName": "\"Key\"", "mappingType": "existing" }, - "notificationid": { - "targetName": "\"NotificationId\"", + "status": { + "targetName": "\"Status\"", "mappingType": "existing" }, - "response": { - "targetName": "\"Response\"", + "priority": { + "targetName": "\"Priority\"", "mappingType": "existing" }, - "receivedon": { - "targetName": "\"ReceivedOn\"", + "Encoding": { + "targetName": "\"Encoding\"", "mappingType": "existing" }, - "note": { - "targetName": "\"Note\"", + "sendon": { + "targetName": "\"SendOn\"", + "mappingType": "existing" + }, + "To": { + "targetName": "\"To\"", + "mappingType": "existing" + }, + "subject": { + "targetName": "\"Subject\"", + "mappingType": "existing" + }, + "bodytype": { + "targetName": "\"BodyType\"", + "mappingType": "existing" + }, + "body": { + "targetName": "\"Body\"", + "mappingType": "existing" + }, + "bcc": { + "targetName": "\"Bcc\"", + "mappingType": "existing" + }, + "cc": { + "targetName": "\"Cc\"", + "mappingType": "existing" + }, + "tag": { + "targetName": "\"Tag\"", + "mappingType": "existing" + }, + "projectid": { + "targetName": "\"ProjectId\"", + "mappingType": "existing" + }, + "toagencyid": { + "targetName": "\"ToAgencyId\"", + "mappingType": "existing" + }, + "templateid": { + "targetName": "\"TemplateId\"", + "mappingType": "existing" + }, + "chesmessageid": { + "targetName": "\"ChesMessageId\"", + "mappingType": "existing" + }, + "chestransactionid": { + "targetName": "\"ChesTransactionId\"", "mappingType": "existing" } } From 19f3cfdd2f3dc31a27160490652f46e195f2d8b6 Mon Sep 17 00:00:00 2001 From: Lawrence Lau Date: Fri, 16 Feb 2024 15:19:50 -0800 Subject: [PATCH 10/11] lint fix --- .../1708123404599-NullableFields.ts | 175 ++++++++++++------ 1 file changed, 122 insertions(+), 53 deletions(-) diff --git a/express-api/src/typeorm/Migrations/1708123404599-NullableFields.ts b/express-api/src/typeorm/Migrations/1708123404599-NullableFields.ts index 253c18d050..0cbbab77e1 100644 --- a/express-api/src/typeorm/Migrations/1708123404599-NullableFields.ts +++ b/express-api/src/typeorm/Migrations/1708123404599-NullableFields.ts @@ -1,58 +1,127 @@ -import { MigrationInterface, QueryRunner } from "typeorm"; +import { MigrationInterface, QueryRunner } from 'typeorm'; export class NullableFields1708123404599 implements MigrationInterface { - name = 'NullableFields1708123404599' + name = 'NullableFields1708123404599'; - public async up(queryRunner: QueryRunner): Promise { - await queryRunner.query(`ALTER TABLE "notification_queue" DROP CONSTRAINT "FK_5d7fe381cc5ac14b88f911c81c7"`); - await queryRunner.query(`ALTER TABLE "notification_queue" DROP CONSTRAINT "FK_705c9558182adb03383285e8674"`); - await queryRunner.query(`DROP INDEX "public"."IDX_359a7aedcd7b3d97fda4bfbc83"`); - await queryRunner.query(`ALTER TABLE "notification_queue" ALTER COLUMN "ProjectId" DROP NOT NULL`); - await queryRunner.query(`ALTER TABLE "notification_queue" ALTER COLUMN "ToAgencyId" DROP NOT NULL`); - await queryRunner.query(`ALTER TABLE "project_agency_response" DROP CONSTRAINT "FK_14fa612dd1f3ac554faa62f7ff9"`); - await queryRunner.query(`ALTER TABLE "project_agency_response" ALTER COLUMN "NotificationId" DROP NOT NULL`); - await queryRunner.query(`ALTER TABLE "project_property" DROP CONSTRAINT "FK_a580df432f0e0c521225fc3327b"`); - await queryRunner.query(`ALTER TABLE "project_property" DROP CONSTRAINT "FK_de366a792fc0aef4f8718e42d9c"`); - await queryRunner.query(`DROP INDEX "public"."IDX_a8615c36638af5cbe405f58fca"`); - await queryRunner.query(`ALTER TABLE "project_property" ALTER COLUMN "ParcelId" DROP NOT NULL`); - await queryRunner.query(`ALTER TABLE "project_property" ALTER COLUMN "BuildingId" DROP NOT NULL`); - await queryRunner.query(`DROP INDEX "public"."IDX_c32ecc1c2fd813140954bdfcc0"`); - await queryRunner.query(`ALTER TABLE "project_report" ALTER COLUMN "From" DROP NOT NULL`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_b000857089edf6cae23b9bc9b8" ON "user" ("Username") `); - await queryRunner.query(`CREATE INDEX "IDX_359a7aedcd7b3d97fda4bfbc83" ON "notification_queue" ("ProjectId", "TemplateId", "ToAgencyId") `); - await queryRunner.query(`CREATE INDEX "IDX_a8615c36638af5cbe405f58fca" ON "project_property" ("ProjectId", "PropertyTypeId", "ParcelId", "BuildingId") `); - await queryRunner.query(`CREATE INDEX "IDX_c32ecc1c2fd813140954bdfcc0" ON "project_report" ("Id", "To", "From", "IsFinal") `); - await queryRunner.query(`ALTER TABLE "notification_queue" ADD CONSTRAINT "FK_5d7fe381cc5ac14b88f911c81c7" FOREIGN KEY ("ProjectId") REFERENCES "project"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "notification_queue" ADD CONSTRAINT "FK_705c9558182adb03383285e8674" FOREIGN KEY ("ToAgencyId") REFERENCES "agency"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "project_agency_response" ADD CONSTRAINT "FK_14fa612dd1f3ac554faa62f7ff9" FOREIGN KEY ("NotificationId") REFERENCES "notification_queue"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "project_property" ADD CONSTRAINT "FK_a580df432f0e0c521225fc3327b" FOREIGN KEY ("ParcelId") REFERENCES "parcel"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "project_property" ADD CONSTRAINT "FK_de366a792fc0aef4f8718e42d9c" FOREIGN KEY ("BuildingId") REFERENCES "building"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`); - } - - public async down(queryRunner: QueryRunner): Promise { - await queryRunner.query(`ALTER TABLE "project_property" DROP CONSTRAINT "FK_de366a792fc0aef4f8718e42d9c"`); - await queryRunner.query(`ALTER TABLE "project_property" DROP CONSTRAINT "FK_a580df432f0e0c521225fc3327b"`); - await queryRunner.query(`ALTER TABLE "project_agency_response" DROP CONSTRAINT "FK_14fa612dd1f3ac554faa62f7ff9"`); - await queryRunner.query(`ALTER TABLE "notification_queue" DROP CONSTRAINT "FK_705c9558182adb03383285e8674"`); - await queryRunner.query(`ALTER TABLE "notification_queue" DROP CONSTRAINT "FK_5d7fe381cc5ac14b88f911c81c7"`); - await queryRunner.query(`DROP INDEX "public"."IDX_c32ecc1c2fd813140954bdfcc0"`); - await queryRunner.query(`DROP INDEX "public"."IDX_a8615c36638af5cbe405f58fca"`); - await queryRunner.query(`DROP INDEX "public"."IDX_359a7aedcd7b3d97fda4bfbc83"`); - await queryRunner.query(`DROP INDEX "public"."IDX_b000857089edf6cae23b9bc9b8"`); - await queryRunner.query(`ALTER TABLE "project_report" ALTER COLUMN "From" SET NOT NULL`); - await queryRunner.query(`CREATE INDEX "IDX_c32ecc1c2fd813140954bdfcc0" ON "project_report" ("Id", "IsFinal", "From", "To") `); - await queryRunner.query(`ALTER TABLE "project_property" ALTER COLUMN "BuildingId" SET NOT NULL`); - await queryRunner.query(`ALTER TABLE "project_property" ALTER COLUMN "ParcelId" SET NOT NULL`); - await queryRunner.query(`CREATE INDEX "IDX_a8615c36638af5cbe405f58fca" ON "project_property" ("ProjectId", "PropertyTypeId", "ParcelId", "BuildingId") `); - await queryRunner.query(`ALTER TABLE "project_property" ADD CONSTRAINT "FK_de366a792fc0aef4f8718e42d9c" FOREIGN KEY ("BuildingId") REFERENCES "building"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "project_property" ADD CONSTRAINT "FK_a580df432f0e0c521225fc3327b" FOREIGN KEY ("ParcelId") REFERENCES "parcel"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "project_agency_response" ALTER COLUMN "NotificationId" SET NOT NULL`); - await queryRunner.query(`ALTER TABLE "project_agency_response" ADD CONSTRAINT "FK_14fa612dd1f3ac554faa62f7ff9" FOREIGN KEY ("NotificationId") REFERENCES "notification_queue"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "notification_queue" ALTER COLUMN "ToAgencyId" SET NOT NULL`); - await queryRunner.query(`ALTER TABLE "notification_queue" ALTER COLUMN "ProjectId" SET NOT NULL`); - await queryRunner.query(`CREATE INDEX "IDX_359a7aedcd7b3d97fda4bfbc83" ON "notification_queue" ("ProjectId", "ToAgencyId", "TemplateId") `); - await queryRunner.query(`ALTER TABLE "notification_queue" ADD CONSTRAINT "FK_705c9558182adb03383285e8674" FOREIGN KEY ("ToAgencyId") REFERENCES "agency"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "notification_queue" ADD CONSTRAINT "FK_5d7fe381cc5ac14b88f911c81c7" FOREIGN KEY ("ProjectId") REFERENCES "project"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`); - } + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query( + `ALTER TABLE "notification_queue" DROP CONSTRAINT "FK_5d7fe381cc5ac14b88f911c81c7"`, + ); + await queryRunner.query( + `ALTER TABLE "notification_queue" DROP CONSTRAINT "FK_705c9558182adb03383285e8674"`, + ); + await queryRunner.query(`DROP INDEX "public"."IDX_359a7aedcd7b3d97fda4bfbc83"`); + await queryRunner.query( + `ALTER TABLE "notification_queue" ALTER COLUMN "ProjectId" DROP NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "notification_queue" ALTER COLUMN "ToAgencyId" DROP NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "project_agency_response" DROP CONSTRAINT "FK_14fa612dd1f3ac554faa62f7ff9"`, + ); + await queryRunner.query( + `ALTER TABLE "project_agency_response" ALTER COLUMN "NotificationId" DROP NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "project_property" DROP CONSTRAINT "FK_a580df432f0e0c521225fc3327b"`, + ); + await queryRunner.query( + `ALTER TABLE "project_property" DROP CONSTRAINT "FK_de366a792fc0aef4f8718e42d9c"`, + ); + await queryRunner.query(`DROP INDEX "public"."IDX_a8615c36638af5cbe405f58fca"`); + await queryRunner.query(`ALTER TABLE "project_property" ALTER COLUMN "ParcelId" DROP NOT NULL`); + await queryRunner.query( + `ALTER TABLE "project_property" ALTER COLUMN "BuildingId" DROP NOT NULL`, + ); + await queryRunner.query(`DROP INDEX "public"."IDX_c32ecc1c2fd813140954bdfcc0"`); + await queryRunner.query(`ALTER TABLE "project_report" ALTER COLUMN "From" DROP NOT NULL`); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_b000857089edf6cae23b9bc9b8" ON "user" ("Username") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_359a7aedcd7b3d97fda4bfbc83" ON "notification_queue" ("ProjectId", "TemplateId", "ToAgencyId") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_a8615c36638af5cbe405f58fca" ON "project_property" ("ProjectId", "PropertyTypeId", "ParcelId", "BuildingId") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_c32ecc1c2fd813140954bdfcc0" ON "project_report" ("Id", "To", "From", "IsFinal") `, + ); + await queryRunner.query( + `ALTER TABLE "notification_queue" ADD CONSTRAINT "FK_5d7fe381cc5ac14b88f911c81c7" FOREIGN KEY ("ProjectId") REFERENCES "project"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "notification_queue" ADD CONSTRAINT "FK_705c9558182adb03383285e8674" FOREIGN KEY ("ToAgencyId") REFERENCES "agency"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "project_agency_response" ADD CONSTRAINT "FK_14fa612dd1f3ac554faa62f7ff9" FOREIGN KEY ("NotificationId") REFERENCES "notification_queue"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "project_property" ADD CONSTRAINT "FK_a580df432f0e0c521225fc3327b" FOREIGN KEY ("ParcelId") REFERENCES "parcel"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "project_property" ADD CONSTRAINT "FK_de366a792fc0aef4f8718e42d9c" FOREIGN KEY ("BuildingId") REFERENCES "building"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`, + ); + } + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query( + `ALTER TABLE "project_property" DROP CONSTRAINT "FK_de366a792fc0aef4f8718e42d9c"`, + ); + await queryRunner.query( + `ALTER TABLE "project_property" DROP CONSTRAINT "FK_a580df432f0e0c521225fc3327b"`, + ); + await queryRunner.query( + `ALTER TABLE "project_agency_response" DROP CONSTRAINT "FK_14fa612dd1f3ac554faa62f7ff9"`, + ); + await queryRunner.query( + `ALTER TABLE "notification_queue" DROP CONSTRAINT "FK_705c9558182adb03383285e8674"`, + ); + await queryRunner.query( + `ALTER TABLE "notification_queue" DROP CONSTRAINT "FK_5d7fe381cc5ac14b88f911c81c7"`, + ); + await queryRunner.query(`DROP INDEX "public"."IDX_c32ecc1c2fd813140954bdfcc0"`); + await queryRunner.query(`DROP INDEX "public"."IDX_a8615c36638af5cbe405f58fca"`); + await queryRunner.query(`DROP INDEX "public"."IDX_359a7aedcd7b3d97fda4bfbc83"`); + await queryRunner.query(`DROP INDEX "public"."IDX_b000857089edf6cae23b9bc9b8"`); + await queryRunner.query(`ALTER TABLE "project_report" ALTER COLUMN "From" SET NOT NULL`); + await queryRunner.query( + `CREATE INDEX "IDX_c32ecc1c2fd813140954bdfcc0" ON "project_report" ("Id", "IsFinal", "From", "To") `, + ); + await queryRunner.query( + `ALTER TABLE "project_property" ALTER COLUMN "BuildingId" SET NOT NULL`, + ); + await queryRunner.query(`ALTER TABLE "project_property" ALTER COLUMN "ParcelId" SET NOT NULL`); + await queryRunner.query( + `CREATE INDEX "IDX_a8615c36638af5cbe405f58fca" ON "project_property" ("ProjectId", "PropertyTypeId", "ParcelId", "BuildingId") `, + ); + await queryRunner.query( + `ALTER TABLE "project_property" ADD CONSTRAINT "FK_de366a792fc0aef4f8718e42d9c" FOREIGN KEY ("BuildingId") REFERENCES "building"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "project_property" ADD CONSTRAINT "FK_a580df432f0e0c521225fc3327b" FOREIGN KEY ("ParcelId") REFERENCES "parcel"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "project_agency_response" ALTER COLUMN "NotificationId" SET NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "project_agency_response" ADD CONSTRAINT "FK_14fa612dd1f3ac554faa62f7ff9" FOREIGN KEY ("NotificationId") REFERENCES "notification_queue"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "notification_queue" ALTER COLUMN "ToAgencyId" SET NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "notification_queue" ALTER COLUMN "ProjectId" SET NOT NULL`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_359a7aedcd7b3d97fda4bfbc83" ON "notification_queue" ("ProjectId", "ToAgencyId", "TemplateId") `, + ); + await queryRunner.query( + `ALTER TABLE "notification_queue" ADD CONSTRAINT "FK_705c9558182adb03383285e8674" FOREIGN KEY ("ToAgencyId") REFERENCES "agency"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "notification_queue" ADD CONSTRAINT "FK_5d7fe381cc5ac14b88f911c81c7" FOREIGN KEY ("ProjectId") REFERENCES "project"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`, + ); + } } From d6d8f104d5c3c35034e84e1f886450c89fc836cb Mon Sep 17 00:00:00 2001 From: Lawrence Lau Date: Wed, 21 Feb 2024 10:51:46 -0800 Subject: [PATCH 11/11] updated DBeaver task and nullable columns --- .../src/typeorm/Entities/NotificationQueue.ts | 4 +- .../typeorm/Entities/ProjectAgencyResponse.ts | 2 +- .../src/typeorm/Entities/ProjectProperty.ts | 4 +- .../1708123404599-NullableFields.ts | 127 -- .../1708536844664-NullableFields.ts | 159 +++ tools/dbeaver/tasks.json | 1170 ++++++++--------- 6 files changed, 749 insertions(+), 717 deletions(-) delete mode 100644 express-api/src/typeorm/Migrations/1708123404599-NullableFields.ts create mode 100644 express-api/src/typeorm/Migrations/1708536844664-NullableFields.ts diff --git a/express-api/src/typeorm/Entities/NotificationQueue.ts b/express-api/src/typeorm/Entities/NotificationQueue.ts index 9063df57be..f1ce04787f 100644 --- a/express-api/src/typeorm/Entities/NotificationQueue.ts +++ b/express-api/src/typeorm/Entities/NotificationQueue.ts @@ -51,7 +51,7 @@ export class NotificationQueue extends BaseEntity { Tag: string; // Project Relation - @Column({ name: 'project_id', type: 'int' }) + @Column({ name: 'project_id', type: 'int', nullable: true }) ProjectId: number; @ManyToOne(() => Project, (Project) => Project.Id) @@ -59,7 +59,7 @@ export class NotificationQueue extends BaseEntity { Project: Project; // Agency Relation - @Column({ name: 'to_agency_id', type: 'int' }) + @Column({ name: 'to_agency_id', type: 'int', nullable: true }) ToAgencyId: number; @ManyToOne(() => Agency, (Agency) => Agency.Id) diff --git a/express-api/src/typeorm/Entities/ProjectAgencyResponse.ts b/express-api/src/typeorm/Entities/ProjectAgencyResponse.ts index 771a09cf34..a526e7351e 100644 --- a/express-api/src/typeorm/Entities/ProjectAgencyResponse.ts +++ b/express-api/src/typeorm/Entities/ProjectAgencyResponse.ts @@ -26,7 +26,7 @@ export class ProjectAgencyResponse extends BaseEntity { OfferAmount: number; // Notification Relation - @Column({ name: 'notification_id', type: 'int' }) + @Column({ name: 'notification_id', type: 'int', nullable: true }) NotificationId: number; @ManyToOne(() => NotificationQueue, (Notification) => Notification.Id, { nullable: true }) diff --git a/express-api/src/typeorm/Entities/ProjectProperty.ts b/express-api/src/typeorm/Entities/ProjectProperty.ts index a49bb8147a..cf8c8beca9 100644 --- a/express-api/src/typeorm/Entities/ProjectProperty.ts +++ b/express-api/src/typeorm/Entities/ProjectProperty.ts @@ -28,7 +28,7 @@ export class ProjectProperty extends BaseEntity { PropertyType: PropertyType; // Parcel Relation - @Column({ name: 'parcel_id', type: 'int' }) + @Column({ name: 'parcel_id', type: 'int', nullable: true }) ParcelId: number; @ManyToOne(() => Parcel, (Parcel) => Parcel.Id) @@ -36,7 +36,7 @@ export class ProjectProperty extends BaseEntity { Parcel: Parcel; // Building Relation - @Column({ name: 'building_id', type: 'int' }) + @Column({ name: 'building_id', type: 'int', nullable: true }) BuildingId: number; @ManyToOne(() => Building, (Building) => Building.Id) diff --git a/express-api/src/typeorm/Migrations/1708123404599-NullableFields.ts b/express-api/src/typeorm/Migrations/1708123404599-NullableFields.ts deleted file mode 100644 index 0cbbab77e1..0000000000 --- a/express-api/src/typeorm/Migrations/1708123404599-NullableFields.ts +++ /dev/null @@ -1,127 +0,0 @@ -import { MigrationInterface, QueryRunner } from 'typeorm'; - -export class NullableFields1708123404599 implements MigrationInterface { - name = 'NullableFields1708123404599'; - - public async up(queryRunner: QueryRunner): Promise { - await queryRunner.query( - `ALTER TABLE "notification_queue" DROP CONSTRAINT "FK_5d7fe381cc5ac14b88f911c81c7"`, - ); - await queryRunner.query( - `ALTER TABLE "notification_queue" DROP CONSTRAINT "FK_705c9558182adb03383285e8674"`, - ); - await queryRunner.query(`DROP INDEX "public"."IDX_359a7aedcd7b3d97fda4bfbc83"`); - await queryRunner.query( - `ALTER TABLE "notification_queue" ALTER COLUMN "ProjectId" DROP NOT NULL`, - ); - await queryRunner.query( - `ALTER TABLE "notification_queue" ALTER COLUMN "ToAgencyId" DROP NOT NULL`, - ); - await queryRunner.query( - `ALTER TABLE "project_agency_response" DROP CONSTRAINT "FK_14fa612dd1f3ac554faa62f7ff9"`, - ); - await queryRunner.query( - `ALTER TABLE "project_agency_response" ALTER COLUMN "NotificationId" DROP NOT NULL`, - ); - await queryRunner.query( - `ALTER TABLE "project_property" DROP CONSTRAINT "FK_a580df432f0e0c521225fc3327b"`, - ); - await queryRunner.query( - `ALTER TABLE "project_property" DROP CONSTRAINT "FK_de366a792fc0aef4f8718e42d9c"`, - ); - await queryRunner.query(`DROP INDEX "public"."IDX_a8615c36638af5cbe405f58fca"`); - await queryRunner.query(`ALTER TABLE "project_property" ALTER COLUMN "ParcelId" DROP NOT NULL`); - await queryRunner.query( - `ALTER TABLE "project_property" ALTER COLUMN "BuildingId" DROP NOT NULL`, - ); - await queryRunner.query(`DROP INDEX "public"."IDX_c32ecc1c2fd813140954bdfcc0"`); - await queryRunner.query(`ALTER TABLE "project_report" ALTER COLUMN "From" DROP NOT NULL`); - await queryRunner.query( - `CREATE UNIQUE INDEX "IDX_b000857089edf6cae23b9bc9b8" ON "user" ("Username") `, - ); - await queryRunner.query( - `CREATE INDEX "IDX_359a7aedcd7b3d97fda4bfbc83" ON "notification_queue" ("ProjectId", "TemplateId", "ToAgencyId") `, - ); - await queryRunner.query( - `CREATE INDEX "IDX_a8615c36638af5cbe405f58fca" ON "project_property" ("ProjectId", "PropertyTypeId", "ParcelId", "BuildingId") `, - ); - await queryRunner.query( - `CREATE INDEX "IDX_c32ecc1c2fd813140954bdfcc0" ON "project_report" ("Id", "To", "From", "IsFinal") `, - ); - await queryRunner.query( - `ALTER TABLE "notification_queue" ADD CONSTRAINT "FK_5d7fe381cc5ac14b88f911c81c7" FOREIGN KEY ("ProjectId") REFERENCES "project"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`, - ); - await queryRunner.query( - `ALTER TABLE "notification_queue" ADD CONSTRAINT "FK_705c9558182adb03383285e8674" FOREIGN KEY ("ToAgencyId") REFERENCES "agency"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`, - ); - await queryRunner.query( - `ALTER TABLE "project_agency_response" ADD CONSTRAINT "FK_14fa612dd1f3ac554faa62f7ff9" FOREIGN KEY ("NotificationId") REFERENCES "notification_queue"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`, - ); - await queryRunner.query( - `ALTER TABLE "project_property" ADD CONSTRAINT "FK_a580df432f0e0c521225fc3327b" FOREIGN KEY ("ParcelId") REFERENCES "parcel"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`, - ); - await queryRunner.query( - `ALTER TABLE "project_property" ADD CONSTRAINT "FK_de366a792fc0aef4f8718e42d9c" FOREIGN KEY ("BuildingId") REFERENCES "building"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`, - ); - } - - public async down(queryRunner: QueryRunner): Promise { - await queryRunner.query( - `ALTER TABLE "project_property" DROP CONSTRAINT "FK_de366a792fc0aef4f8718e42d9c"`, - ); - await queryRunner.query( - `ALTER TABLE "project_property" DROP CONSTRAINT "FK_a580df432f0e0c521225fc3327b"`, - ); - await queryRunner.query( - `ALTER TABLE "project_agency_response" DROP CONSTRAINT "FK_14fa612dd1f3ac554faa62f7ff9"`, - ); - await queryRunner.query( - `ALTER TABLE "notification_queue" DROP CONSTRAINT "FK_705c9558182adb03383285e8674"`, - ); - await queryRunner.query( - `ALTER TABLE "notification_queue" DROP CONSTRAINT "FK_5d7fe381cc5ac14b88f911c81c7"`, - ); - await queryRunner.query(`DROP INDEX "public"."IDX_c32ecc1c2fd813140954bdfcc0"`); - await queryRunner.query(`DROP INDEX "public"."IDX_a8615c36638af5cbe405f58fca"`); - await queryRunner.query(`DROP INDEX "public"."IDX_359a7aedcd7b3d97fda4bfbc83"`); - await queryRunner.query(`DROP INDEX "public"."IDX_b000857089edf6cae23b9bc9b8"`); - await queryRunner.query(`ALTER TABLE "project_report" ALTER COLUMN "From" SET NOT NULL`); - await queryRunner.query( - `CREATE INDEX "IDX_c32ecc1c2fd813140954bdfcc0" ON "project_report" ("Id", "IsFinal", "From", "To") `, - ); - await queryRunner.query( - `ALTER TABLE "project_property" ALTER COLUMN "BuildingId" SET NOT NULL`, - ); - await queryRunner.query(`ALTER TABLE "project_property" ALTER COLUMN "ParcelId" SET NOT NULL`); - await queryRunner.query( - `CREATE INDEX "IDX_a8615c36638af5cbe405f58fca" ON "project_property" ("ProjectId", "PropertyTypeId", "ParcelId", "BuildingId") `, - ); - await queryRunner.query( - `ALTER TABLE "project_property" ADD CONSTRAINT "FK_de366a792fc0aef4f8718e42d9c" FOREIGN KEY ("BuildingId") REFERENCES "building"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`, - ); - await queryRunner.query( - `ALTER TABLE "project_property" ADD CONSTRAINT "FK_a580df432f0e0c521225fc3327b" FOREIGN KEY ("ParcelId") REFERENCES "parcel"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`, - ); - await queryRunner.query( - `ALTER TABLE "project_agency_response" ALTER COLUMN "NotificationId" SET NOT NULL`, - ); - await queryRunner.query( - `ALTER TABLE "project_agency_response" ADD CONSTRAINT "FK_14fa612dd1f3ac554faa62f7ff9" FOREIGN KEY ("NotificationId") REFERENCES "notification_queue"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`, - ); - await queryRunner.query( - `ALTER TABLE "notification_queue" ALTER COLUMN "ToAgencyId" SET NOT NULL`, - ); - await queryRunner.query( - `ALTER TABLE "notification_queue" ALTER COLUMN "ProjectId" SET NOT NULL`, - ); - await queryRunner.query( - `CREATE INDEX "IDX_359a7aedcd7b3d97fda4bfbc83" ON "notification_queue" ("ProjectId", "ToAgencyId", "TemplateId") `, - ); - await queryRunner.query( - `ALTER TABLE "notification_queue" ADD CONSTRAINT "FK_705c9558182adb03383285e8674" FOREIGN KEY ("ToAgencyId") REFERENCES "agency"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`, - ); - await queryRunner.query( - `ALTER TABLE "notification_queue" ADD CONSTRAINT "FK_5d7fe381cc5ac14b88f911c81c7" FOREIGN KEY ("ProjectId") REFERENCES "project"("Id") ON DELETE NO ACTION ON UPDATE NO ACTION`, - ); - } -} diff --git a/express-api/src/typeorm/Migrations/1708536844664-NullableFields.ts b/express-api/src/typeorm/Migrations/1708536844664-NullableFields.ts new file mode 100644 index 0000000000..03221d3188 --- /dev/null +++ b/express-api/src/typeorm/Migrations/1708536844664-NullableFields.ts @@ -0,0 +1,159 @@ +import { MigrationInterface, QueryRunner } from 'typeorm'; + +export class NullableFields1708536844664 implements MigrationInterface { + name = 'NullableFields1708536844664'; + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query( + `ALTER TABLE "project" DROP CONSTRAINT "FK_f033e95537c91a7787c7a07c857"`, + ); + await queryRunner.query(`DROP INDEX "public"."IDX_7611151947b52a71323a46ea46"`); + await queryRunner.query(`DROP INDEX "public"."IDX_f033e95537c91a7787c7a07c85"`); + await queryRunner.query( + `ALTER TABLE "project" RENAME COLUMN "trier_level_id" TO "tier_level_id"`, + ); + await queryRunner.query( + `ALTER TABLE "notification_queue" DROP CONSTRAINT "FK_8988a5dafec2270a5191a1208cd"`, + ); + await queryRunner.query( + `ALTER TABLE "notification_queue" DROP CONSTRAINT "FK_c9230eab8c7df3197b3c96dcac6"`, + ); + await queryRunner.query(`DROP INDEX "public"."IDX_e96934a5a81124580dd628602f"`); + await queryRunner.query( + `ALTER TABLE "notification_queue" ALTER COLUMN "project_id" DROP NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "notification_queue" ALTER COLUMN "to_agency_id" DROP NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "project_agency_response" DROP CONSTRAINT "FK_67989daa98d90fafc2087a4871f"`, + ); + await queryRunner.query( + `ALTER TABLE "project_agency_response" ALTER COLUMN "notification_id" DROP NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "project_property" DROP CONSTRAINT "FK_b2229cb8dfee8d1c2fe6b78bd91"`, + ); + await queryRunner.query( + `ALTER TABLE "project_property" DROP CONSTRAINT "FK_d18ff54ded63e964ef42a66880e"`, + ); + await queryRunner.query(`DROP INDEX "public"."IDX_ef992ea03a65f72e0b69644b35"`); + await queryRunner.query( + `ALTER TABLE "project_property" ALTER COLUMN "parcel_id" DROP NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "project_property" ALTER COLUMN "building_id" DROP NOT NULL`, + ); + await queryRunner.query(`DROP INDEX "public"."IDX_e4998c66591ebea5e8c1c2d575"`); + await queryRunner.query(`ALTER TABLE "project_report" ALTER COLUMN "from" DROP NOT NULL`); + await queryRunner.query( + `CREATE INDEX "IDX_88df15c457daadc1d407c6d085" ON "project" ("tier_level_id") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_5d29806a012b84ac1d014c563d" ON "project" ("status_id", "tier_level_id", "agency_id") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_e96934a5a81124580dd628602f" ON "notification_queue" ("project_id", "template_id", "to_agency_id") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_ef992ea03a65f72e0b69644b35" ON "project_property" ("project_id", "property_type_id", "parcel_id", "building_id") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_e4998c66591ebea5e8c1c2d575" ON "project_report" ("id", "to", "from", "is_final") `, + ); + await queryRunner.query( + `ALTER TABLE "project" ADD CONSTRAINT "FK_88df15c457daadc1d407c6d085f" FOREIGN KEY ("tier_level_id") REFERENCES "tier_level"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "notification_queue" ADD CONSTRAINT "FK_8988a5dafec2270a5191a1208cd" FOREIGN KEY ("project_id") REFERENCES "project"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "notification_queue" ADD CONSTRAINT "FK_c9230eab8c7df3197b3c96dcac6" FOREIGN KEY ("to_agency_id") REFERENCES "agency"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "project_agency_response" ADD CONSTRAINT "FK_67989daa98d90fafc2087a4871f" FOREIGN KEY ("notification_id") REFERENCES "notification_queue"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "project_property" ADD CONSTRAINT "FK_b2229cb8dfee8d1c2fe6b78bd91" FOREIGN KEY ("parcel_id") REFERENCES "parcel"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "project_property" ADD CONSTRAINT "FK_d18ff54ded63e964ef42a66880e" FOREIGN KEY ("building_id") REFERENCES "building"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`, + ); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query( + `ALTER TABLE "project_property" DROP CONSTRAINT "FK_d18ff54ded63e964ef42a66880e"`, + ); + await queryRunner.query( + `ALTER TABLE "project_property" DROP CONSTRAINT "FK_b2229cb8dfee8d1c2fe6b78bd91"`, + ); + await queryRunner.query( + `ALTER TABLE "project_agency_response" DROP CONSTRAINT "FK_67989daa98d90fafc2087a4871f"`, + ); + await queryRunner.query( + `ALTER TABLE "notification_queue" DROP CONSTRAINT "FK_c9230eab8c7df3197b3c96dcac6"`, + ); + await queryRunner.query( + `ALTER TABLE "notification_queue" DROP CONSTRAINT "FK_8988a5dafec2270a5191a1208cd"`, + ); + await queryRunner.query( + `ALTER TABLE "project" DROP CONSTRAINT "FK_88df15c457daadc1d407c6d085f"`, + ); + await queryRunner.query(`DROP INDEX "public"."IDX_e4998c66591ebea5e8c1c2d575"`); + await queryRunner.query(`DROP INDEX "public"."IDX_ef992ea03a65f72e0b69644b35"`); + await queryRunner.query(`DROP INDEX "public"."IDX_e96934a5a81124580dd628602f"`); + await queryRunner.query(`DROP INDEX "public"."IDX_5d29806a012b84ac1d014c563d"`); + await queryRunner.query(`DROP INDEX "public"."IDX_88df15c457daadc1d407c6d085"`); + await queryRunner.query(`ALTER TABLE "project_report" ALTER COLUMN "from" SET NOT NULL`); + await queryRunner.query( + `CREATE INDEX "IDX_e4998c66591ebea5e8c1c2d575" ON "project_report" ("id", "is_final", "from", "to") `, + ); + await queryRunner.query( + `ALTER TABLE "project_property" ALTER COLUMN "building_id" SET NOT NULL`, + ); + await queryRunner.query(`ALTER TABLE "project_property" ALTER COLUMN "parcel_id" SET NOT NULL`); + await queryRunner.query( + `CREATE INDEX "IDX_ef992ea03a65f72e0b69644b35" ON "project_property" ("project_id", "property_type_id", "parcel_id", "building_id") `, + ); + await queryRunner.query( + `ALTER TABLE "project_property" ADD CONSTRAINT "FK_d18ff54ded63e964ef42a66880e" FOREIGN KEY ("building_id") REFERENCES "building"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "project_property" ADD CONSTRAINT "FK_b2229cb8dfee8d1c2fe6b78bd91" FOREIGN KEY ("parcel_id") REFERENCES "parcel"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "project_agency_response" ALTER COLUMN "notification_id" SET NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "project_agency_response" ADD CONSTRAINT "FK_67989daa98d90fafc2087a4871f" FOREIGN KEY ("notification_id") REFERENCES "notification_queue"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "notification_queue" ALTER COLUMN "to_agency_id" SET NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "notification_queue" ALTER COLUMN "project_id" SET NOT NULL`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_e96934a5a81124580dd628602f" ON "notification_queue" ("project_id", "to_agency_id", "template_id") `, + ); + await queryRunner.query( + `ALTER TABLE "notification_queue" ADD CONSTRAINT "FK_c9230eab8c7df3197b3c96dcac6" FOREIGN KEY ("to_agency_id") REFERENCES "agency"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "notification_queue" ADD CONSTRAINT "FK_8988a5dafec2270a5191a1208cd" FOREIGN KEY ("project_id") REFERENCES "project"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "project" RENAME COLUMN "tier_level_id" TO "trier_level_id"`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_f033e95537c91a7787c7a07c85" ON "project" ("trier_level_id") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_7611151947b52a71323a46ea46" ON "project" ("agency_id", "trier_level_id", "status_id") `, + ); + await queryRunner.query( + `ALTER TABLE "project" ADD CONSTRAINT "FK_f033e95537c91a7787c7a07c857" FOREIGN KEY ("trier_level_id") REFERENCES "tier_level"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`, + ); + } +} diff --git a/tools/dbeaver/tasks.json b/tools/dbeaver/tasks.json index 9450cb4b77..89b087eb4f 100644 --- a/tools/dbeaver/tasks.json +++ b/tools/dbeaver/tasks.json @@ -104,29 +104,27 @@ { "type": "databaseTransferProducer", "location": { - "type": "entity", + "type": "query", "project": "General", - "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Projects" + "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", + "defaultCatalog": "pims", + "query": "\r\nSELECT [ProjectId]\r\n ,[TaskId]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[IsCompleted]\r\n ,[CompletedOn]\r\n FROM [dbo].[ProjectTasks]" } }, { "type": "databaseTransferProducer", "location": { - "type": "query", + "type": "entity", "project": "General", - "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", - "defaultCatalog": "pims", - "query": "\r\nSELECT [ProjectId]\r\n ,[TaskId]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[IsCompleted]\r\n ,[CompletedOn]\r\n FROM [dbo].[ProjectTasks]" + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Projects" } }, { "type": "databaseTransferProducer", "location": { - "type": "query", + "type": "entity", "project": "General", - "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", - "defaultCatalog": "pims", - "query": "SELECT [Id]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[IsFinal]\r\n ,[Name]\r\n ,[From]\r\n ,[To]\r\n ,[ReportType]\r\n FROM [dbo].[ProjectReports]" + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectStatusHistory" } }, { @@ -142,7 +140,7 @@ "location": { "type": "entity", "project": "General", - "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectStatusHistory" + "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectNumbers" } }, { @@ -160,15 +158,17 @@ "project": "General", "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", "defaultCatalog": "pims", - "query": "\r\nSELECT [ProjectId]\r\n ,[AgencyId]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[OfferAmount]\r\n ,[NotificationId]\r\n ,[Response]\r\n ,[ReceivedOn]\r\n ,[Note]\r\n FROM [dbo].[ProjectAgencyResponses]" + "query": "SELECT [Id]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[IsFinal]\r\n ,[Name]\r\n ,[From]\r\n ,[To]\r\n ,[ReportType]\r\n FROM [dbo].[ProjectReports]" } }, { "type": "databaseTransferProducer", "location": { - "type": "entity", + "type": "query", "project": "General", - "entityId": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectNumbers" + "dataSource": "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539", + "defaultCatalog": "pims", + "query": "\r\nSELECT [ProjectId]\r\n ,[AgencyId]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[OfferAmount]\r\n ,[NotificationId]\r\n ,[Response]\r\n ,[ReceivedOn]\r\n ,[Note]\r\n FROM [dbo].[ProjectAgencyResponses]" } }, { @@ -286,7 +286,7 @@ "mappingType": "existing" }, "createdbyid": { - "targetName": "\"CreatedById\"", + "targetName": "created_by_id", "mappingType": "existing", "transformer": "constant", "transformerProperties": { @@ -295,15 +295,15 @@ "transformerPropertiesNames": "constant" }, "createdon": { - "targetName": "\"CreatedOn\"", + "targetName": "created_on", "mappingType": "existing" }, "updatedbyid": { - "targetName": "\"UpdatedById\"", + "targetName": "updated_by_id", "mappingType": "existing" }, "updatedon": { - "targetName": "\"UpdatedOn\"", + "targetName": "updated_on", "mappingType": "existing" }, "rowversion": { @@ -311,15 +311,15 @@ "mappingType": "skip" }, "Name": { - "targetName": "\"Name\"", + "targetName": "name", "mappingType": "existing" }, "isdisabled": { - "targetName": "\"IsDisabled\"", + "targetName": "is_disabled", "mappingType": "existing" }, "sortorder": { - "targetName": "\"SortOrder\"", + "targetName": "sort_order", "mappingType": "existing" }, "code": { @@ -331,7 +331,7 @@ "mappingType": "existing" }, "parentid": { - "targetName": "\"ParentId\"", + "targetName": "parent_id", "mappingType": "existing" }, "email": { @@ -339,127 +339,139 @@ "mappingType": "existing" }, "sendemail": { - "targetName": "\"SendEmail\"", + "targetName": "send_email", "mappingType": "existing" }, "addressto": { - "targetName": "\"AddressTo\"", + "targetName": "address_to", "mappingType": "existing" }, "ccemail": { - "targetName": "\"CCEmail\"", + "targetName": "cc_email", "mappingType": "existing" } } }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT \r\n u.[Id],\r\n \r\n\t CASE \r\n\t\tWHEN u.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE u.[CreatedById]\r\n\t END AS [CreatedById],\r\n \r\n\t CASE \r\n\t\tWHEN u.IsDisabled \u003d 0 THEN \u0027Active\u0027\r\n\t\tELSE \u0027Disabled\u0027\r\n\t END AS [Status],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n urd.CreatedOn,\r\n urd.UserId,\r\n ua.AgencyId, \r\n STRING_AGG(urd.RoleName, \u0027, \u0027) AS Roles,\r\n CASE \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%System Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial Reporter%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial%\u0027 THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Agency Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Analyst%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Manager%\u0027 THEN \u002700000000-0000-0000-0000-000000000001\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister Assistant%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Executive Director%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%View Only Properties%\u0027 THEN \u002700000000-0000-0000-0000-000000000002\u0027\r\n\t \r\n END AS UserType\r\nFROM Users u\r\nLEFT JOIN (\r\n SELECT \r\n ur.UserId,\r\n MAX(ur.CreatedOn) AS CreatedOn,\r\n STRING_AGG(r.Name, \u0027, \u0027) AS RoleName\r\n FROM [pims].[dbo].[UserRoles] ur\r\n INNER JOIN Roles r ON ur.RoleId \u003d r.Id\r\n GROUP BY ur.UserId\r\n) AS urd ON u.Id \u003d urd.UserId\r\n\r\nLEFT OUTER JOIN (\r\n SELECT UserId, MIN(AgencyId) AS AgencyId\r\n FROM UserAgencies\r\n GROUP BY UserId\r\n) ua_min ON u.Id \u003d ua_min.UserId\r\nLEFT OUTER JOIN UserAgencies ua ON u.Id \u003d ua.UserId AND ua.AgencyId \u003d ua_min.AgencyId\r\n\r\nWHERE u.Id \u003c\u003e \u002700000000-0000-0000-0000-000000000000\u0027\r\n\r\nGROUP BY u.[Id],\r\n u.[CreatedById],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n urd.CreatedOn, \r\n urd.UserId, \r\n ua.AgencyId\r\nORDER BY urd.CreatedOn ASC": { - "targetName": "user", + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Projects": { + "targetName": "project", "mappingType": "existing", "attributes": { "id": { - "targetName": "id", + "targetName": "\"Id\"", "mappingType": "existing" }, "createdbyid": { - "targetName": "createdbyid", + "targetName": "created_by_id", "mappingType": "existing" }, - "status": { - "targetName": "status", + "createdon": { + "targetName": "created_on", "mappingType": "existing" }, "updatedbyid": { - "targetName": "updatedbyid", + "targetName": "updated_by_id", "mappingType": "existing" }, "updatedon": { - "targetName": "updatedon", + "targetName": "updated_on", "mappingType": "existing" }, - "username": { - "targetName": "username", + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "projectnumber": { + "targetName": "project_number", "mappingType": "existing" }, - "displayname": { - "targetName": "displayname", + "Name": { + "targetName": "\"Name\"", "mappingType": "existing" }, - "firstname": { - "targetName": "firstname", + "workflowid": { + "targetName": "workflow_id", "mappingType": "existing" }, - "middlename": { - "targetName": "middlename", + "manager": { + "targetName": "\"Manager\"", "mappingType": "existing" }, - "lastname": { - "targetName": "lastname", + "reportedfiscalyear": { + "targetName": "reported_fiscal_year", "mappingType": "existing" }, - "email": { - "targetName": "email", + "actualfiscalyear": { + "targetName": "actual_fiscal_year", "mappingType": "existing" }, - "Position": { - "targetName": "Position", + "agencyid": { + "targetName": "agency_id", "mappingType": "existing" }, - "isdisabled": { - "targetName": "isdisabled", + "statusid": { + "targetName": "status_id", "mappingType": "existing" }, - "emailverified": { - "targetName": "emailverified", + "description": { + "targetName": "\"Description\"", "mappingType": "existing" }, - "note": { - "targetName": "note", + "tierlevelid": { + "targetName": "tier_level_id", "mappingType": "existing" }, - "issystem": { - "targetName": "issystem", + "riskid": { + "targetName": "risk_id", "mappingType": "existing" }, - "lastlogin": { - "targetName": "lastlogin", + "metadata": { + "targetName": "\"Metadata\"", "mappingType": "existing" }, - "approvedbyid": { - "targetName": "approvedbyid", + "submittedon": { + "targetName": "submitted_on", "mappingType": "existing" }, "approvedon": { - "targetName": "approvedon", + "targetName": "approved_on", "mappingType": "existing" }, - "keycloakuserid": { - "targetName": "keycloakuserid", + "deniedon": { + "targetName": "denied_on", "mappingType": "existing" }, - "createdon": { - "targetName": "createdon", + "cancelledon": { + "targetName": "cancelled_on", "mappingType": "existing" }, - "userid": { - "targetName": "userid", - "mappingType": "skip" + "completedon": { + "targetName": "completed_on", + "mappingType": "existing" }, - "agencyid": { - "targetName": "agencyid", + "netbook": { + "targetName": "net_book", "mappingType": "existing" }, - "roles": { - "targetName": "roles", - "mappingType": "skip" + "market": { + "targetName": "\"Market\"", + "mappingType": "existing" }, - "usertype": { - "targetName": "\"RoleId\"", + "assessed": { + "targetName": "\"Assessed\"", + "mappingType": "existing" + }, + "appraised": { + "targetName": "\"Appraised\"", + "mappingType": "existing" + }, + "projecttype": { + "targetName": "project_type", "mappingType": "existing" } } }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT p.[Id],\r\n\t CASE \r\n\t\tWHEN p.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE p.[CreatedById]\r\n\t END AS [CreatedById],\r\n p.[CreatedOn],\r\n p.[UpdatedById],\r\n p.[UpdatedOn],\r\n p.[Name],\r\n p.[Description],\r\n p.[ClassificationId],\r\n p.[AgencyId],\r\n p.[IsSensitive],\r\n p.[IsVisibleToOtherAgencies],\r\n p.[PID],\r\n p.[PIN],\r\n p.[LandArea],\r\n p.[LandLegalDescription],\r\n p.[Zoning],\r\n p.[ZoningPotential],\r\n p.[NotOwned],\r\n\tCONVERT(VARCHAR(40), CAST(Location.Long AS DECIMAL(18, 14))) + \u0027, \u0027 + CONVERT(VARCHAR(40), CAST(Location.Lat AS DECIMAL(18, 14))) AS Location,\r\n CASE \r\n WHEN a.AdministrativeArea \u003d \u0027The Corporation of the City of Nelson\u0027 THEN 188\r\n WHEN a.AdministrativeArea \u003d \u0027Township of Langley\u0027 THEN 150\r\n WHEN a.AdministrativeArea \u003d \u0027District of North Vancouver\u0027 THEN 196\r\n WHEN a.AdministrativeArea \u003d \u0027Coombs\u0027 THEN 483\r\n WHEN a.AdministrativeArea \u003d \u0027Brookmere\u0027 THEN 481\r\n WHEN a.AdministrativeArea \u003d \u0027Thornhill\u0027 THEN 501\r\n WHEN a.AdministrativeArea \u003d \u0027Two Mile\u0027 THEN 502\r\n WHEN a.AdministrativeArea \u003d \u0027Crofton\u0027 THEN 484\r\n WHEN a.AdministrativeArea \u003d \u0027East Sooke\u0027 THEN 485\r\n WHEN a.AdministrativeArea \u003d \u0027Mudge Island\u0027 THEN 492\r\n WHEN a.AdministrativeArea \u003d \u0027Coal Harbour\u0027 THEN 482\r\n WHEN a.AdministrativeArea \u003d \u0027Miworth\u0027 THEN 490\r\n WHEN a.AdministrativeArea \u003d \u0027Lake Errock\u0027 THEN 489\r\n WHEN a.AdministrativeArea \u003d \u0027Black Creek\u0027 THEN 479\r\n WHEN a.AdministrativeArea \u003d \u0027Whaletown\u0027 THEN 504\r\n WHEN a.AdministrativeArea \u003d \u0027Quathiaski Cove\u0027 THEN 494\r\n WHEN a.AdministrativeArea \u003d \u0027Big Bay in Stuart Island\u0027 THEN 478\r\n WHEN a.AdministrativeArea \u003d \u0027Surge Narrows in Read Island\u0027 THEN 500\r\n WHEN a.AdministrativeArea \u003d \u0027Rock Bay in Sayward\u0027 THEN 497\r\n WHEN a.AdministrativeArea \u003d \u0027Granite Bay in Quadra Island\u0027 THEN 487\r\n WHEN a.AdministrativeArea \u003d \u0027Moberly Lake\u0027 THEN 491\r\n WHEN a.AdministrativeArea \u003d \u0027Quatsino\u0027 THEN 495\r\n WHEN a.AdministrativeArea \u003d \u0027Bouchie Lake\u0027 THEN 480\r\n WHEN a.AdministrativeArea \u003d \u0027West Lake\u0027 THEN 503\r\n WHEN a.AdministrativeArea \u003d \u0027Salmon Valley\u0027 THEN 498\t\t\r\n WHEN a.AdministrativeArea \u003d \u0027Red Rock\u0027 THEN 496\r\n WHEN a.AdministrativeArea \u003d \u0027Stoner\u0027 THEN 499\r\n WHEN a.AdministrativeArea \u003d \u0027Pineview FFG\u0027 THEN 493\r\n WHEN a.AdministrativeArea \u003d \u0027Wonowon\u0027 THEN 506\r\n WHEN a.AdministrativeArea \u003d \u0027Halfway River\u0027 THEN 488\r\n WHEN a.AdministrativeArea \u003d \u0027Giscome\u0027 THEN 486\r\n WHEN a.AdministrativeArea \u003d \u0027Willow River\u0027 THEN 505\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lower Nicola\u0027 THEN 314\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Belcarra\u0027 THEN 425\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Tsawwassen\u0027 THEN 315\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Anmore\u0027 THEN 432\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lake Cowichan\u0027 THEN 442\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027North Cowichan\u0027 THEN 450\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Port Edward\u0027 THEN 347\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Spallumcheen\u0027 THEN 318\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Jumbo Glacier Mountain Resort Municipality\u0027 THEN 438\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Kent\u0027 THEN 439\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Highlands\u0027 THEN 348\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Slocan\u0027 THEN 380\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Warfield\u0027 THEN 448\r\n ELSE aa.Id \r\n END AS AdministrativeAreaId, \r\n\ta.AdministrativeArea,\r\n\ta.Address1, \r\n\ta.Postal,\r\n\tpp.ParcelId as ParentID,\r\n\t0 as PropertyTypeID\r\nFROM \r\n [pims].[dbo].[Parcels] p\r\n\tINNER JOIN Addresses a\r\n\tON p.AddressId \u003d a.Id\r\n\tLEFT OUTER JOIN AdministrativeAreas aa\r\n\tON aa.Name \u003d a.AdministrativeArea\r\n    LEFT OUTER JOIN ParcelParcels pp\r\n    ON pp.SubdivisionId \u003d p.Id": { - "targetName": "parcel", + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectStatusHistory": { + "targetName": "project_status_history", "mappingType": "existing", "attributes": { "id": { @@ -467,105 +479,99 @@ "mappingType": "existing" }, "createdbyid": { - "targetName": "\"CreatedById\"", + "targetName": "created_by_id", "mappingType": "existing" }, "createdon": { - "targetName": "\"CreatedOn\"", + "targetName": "created_on", "mappingType": "existing" }, "updatedbyid": { - "targetName": "\"UpdatedById\"", + "targetName": "updated_by_id", "mappingType": "existing" }, "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "Name": { - "targetName": "\"Name\"", - "mappingType": "existing" - }, - "description": { - "targetName": "\"Description\"", + "targetName": "updated_on", "mappingType": "existing" }, - "classificationid": { - "targetName": "\"ClassificationId\"", - "mappingType": "existing" + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" }, - "agencyid": { - "targetName": "\"AgencyId\"", + "projectid": { + "targetName": "project_id", "mappingType": "existing" }, - "issensitive": { - "targetName": "\"IsSensitive\"", + "workflowid": { + "targetName": "workflow_id", "mappingType": "existing" }, - "isvisibletootheragencies": { - "targetName": "\"IsVisibleToOtherAgencies\"", + "statusid": { + "targetName": "status_id", "mappingType": "existing" - }, - "pid": { - "targetName": "\"PID\"", + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectSnapshots": { + "targetName": "project_snapshot", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", "mappingType": "existing" }, - "pin": { - "targetName": "\"PIN\"", + "createdbyid": { + "targetName": "created_by_id", "mappingType": "existing" }, - "landarea": { - "targetName": "\"LandArea\"", + "createdon": { + "targetName": "created_on", "mappingType": "existing" }, - "landlegaldescription": { - "targetName": "\"LandLegalDescription\"", + "updatedbyid": { + "targetName": "updated_by_id", "mappingType": "existing" }, - "zoning": { - "targetName": "\"Zoning\"", + "updatedon": { + "targetName": "updated_on", "mappingType": "existing" }, - "zoningpotential": { - "targetName": "\"ZoningPotential\"", - "mappingType": "existing" + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" }, - "notowned": { - "targetName": "\"NotOwned\"", + "projectid": { + "targetName": "project_id", "mappingType": "existing" }, - "Location": { - "targetName": "\"Location\"", + "netbook": { + "targetName": "net_book", "mappingType": "existing" }, - "administrativeareaid": { - "targetName": "\"AdministrativeAreaId\"", + "market": { + "targetName": "\"Market\"", "mappingType": "existing" }, - "administrativearea": { - "targetName": "\"AdministrativeArea\"", - "mappingType": "skip" - }, - "address1": { - "targetName": "\"Address1\"", + "assessed": { + "targetName": "\"Assessed\"", "mappingType": "existing" }, - "postal": { - "targetName": "\"Postal\"", + "appraised": { + "targetName": "\"Appraised\"", "mappingType": "existing" }, - "parentid": { - "targetName": "\"ParentParcelId\"", + "snapshoton": { + "targetName": "snapshot_on", "mappingType": "existing" }, - "propertytypeid": { - "targetName": "\"PropertyTypeID\"", + "metadata": { + "targetName": "\"Metadata\"", "mappingType": "existing" } } }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT p.[Id],\r\n\tCASE \r\n\t WHEN p.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t ELSE p.[CreatedById]\r\n\tEND AS [CreatedById],\r\n p.[CreatedOn],\r\n p.[UpdatedById],\r\n p.[UpdatedOn],\r\n p.[Name],\r\n p.[Description],\r\n p.[ClassificationId],\r\n p.BuildingConstructionTypeId,\r\n p.[AgencyId],\r\n p.[IsSensitive],\r\n p.[IsVisibleToOtherAgencies],\r\n\tp.BuildingFloorCount,\r\n\tp.BuildingPredominateUseId,\r\n\tp.BuildingTenancy,\r\n\tp.RentableArea,\r\n\tp.BuildingOccupantTypeId,\r\n\tp.LeaseExpiry,\r\n\tp.OccupantName,\r\n\tp.TransferLeaseOnSale,\r\n\tp.BuildingTenancyUpdatedOn,\r\n\tp.EncumbranceReason,\r\n\tp.LeasedLandMetadata,\r\n\tp.TotalArea,\r\n\tCONVERT(VARCHAR(40), CAST(Location.Long AS DECIMAL(18, 14))) + \u0027, \u0027 + CONVERT(VARCHAR(40), CAST(Location.Lat AS DECIMAL(18, 14))) AS Location,\r\n\tCASE \r\n WHEN a.AdministrativeArea \u003d \u0027The Corporation of the City of Nelson\u0027 THEN 188\r\n WHEN a.AdministrativeArea \u003d \u0027Township of Langley\u0027 THEN 150\r\n WHEN a.AdministrativeArea \u003d \u0027District of North Vancouver\u0027 THEN 196\r\n WHEN a.AdministrativeArea \u003d \u0027Coombs\u0027 THEN 483\r\n WHEN a.AdministrativeArea \u003d \u0027Brookmere\u0027 THEN 481\r\n WHEN a.AdministrativeArea \u003d \u0027Thornhill\u0027 THEN 501\r\n WHEN a.AdministrativeArea \u003d \u0027Two Mile\u0027 THEN 502\r\n WHEN a.AdministrativeArea \u003d \u0027Crofton\u0027 THEN 484\r\n WHEN a.AdministrativeArea \u003d \u0027East Sooke\u0027 THEN 485\r\n WHEN a.AdministrativeArea \u003d \u0027Mudge Island\u0027 THEN 492\r\n WHEN a.AdministrativeArea \u003d \u0027Coal Harbour\u0027 THEN 482\r\n WHEN a.AdministrativeArea \u003d \u0027Miworth\u0027 THEN 490\r\n WHEN a.AdministrativeArea \u003d \u0027Lake Errock\u0027 THEN 489\r\n WHEN a.AdministrativeArea \u003d \u0027Black Creek\u0027 THEN 479\r\n WHEN a.AdministrativeArea \u003d \u0027Whaletown\u0027 THEN 504\r\n WHEN a.AdministrativeArea \u003d \u0027Quathiaski Cove\u0027 THEN 494\r\n WHEN a.AdministrativeArea \u003d \u0027Big Bay in Stuart Island\u0027 THEN 478\r\n WHEN a.AdministrativeArea \u003d \u0027Surge Narrows in Read Island\u0027 THEN 500\r\n WHEN a.AdministrativeArea \u003d \u0027Rock Bay in Sayward\u0027 THEN 497\r\n WHEN a.AdministrativeArea \u003d \u0027Granite Bay in Quadra Island\u0027 THEN 487\r\n WHEN a.AdministrativeArea \u003d \u0027Moberly Lake\u0027 THEN 491\r\n WHEN a.AdministrativeArea \u003d \u0027Quatsino\u0027 THEN 495\r\n WHEN a.AdministrativeArea \u003d \u0027Bouchie Lake\u0027 THEN 480\r\n WHEN a.AdministrativeArea \u003d \u0027West Lake\u0027 THEN 503\r\n WHEN a.AdministrativeArea \u003d \u0027Salmon Valley\u0027 THEN 498\t\t\r\n WHEN a.AdministrativeArea \u003d \u0027Red Rock\u0027 THEN 496\r\n WHEN a.AdministrativeArea \u003d \u0027Stoner\u0027 THEN 499\r\n WHEN a.AdministrativeArea \u003d \u0027Pineview FFG\u0027 THEN 493\r\n WHEN a.AdministrativeArea \u003d \u0027Wonowon\u0027 THEN 506\r\n WHEN a.AdministrativeArea \u003d \u0027Halfway River\u0027 THEN 488\r\n WHEN a.AdministrativeArea \u003d \u0027Giscome\u0027 THEN 486\r\n WHEN a.AdministrativeArea \u003d \u0027Willow River\u0027 THEN 505\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lower Nicola\u0027 THEN 314\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Belcarra\u0027 THEN 425\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Tsawwassen\u0027 THEN 315\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Anmore\u0027 THEN 432\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lake Cowichan\u0027 THEN 442\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027North Cowichan\u0027 THEN 450\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Port Edward\u0027 THEN 347\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Spallumcheen\u0027 THEN 318\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Jumbo Glacier Mountain Resort Municipality\u0027 THEN 438\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Kent\u0027 THEN 439\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Highlands\u0027 THEN 348\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Slocan\u0027 THEN 380\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Warfield\u0027 THEN 448\r\n ELSE aa.Id \r\n END AS AdministrativeAreaId, \r\n\ta.Address1, \r\n\ta.Postal,\r\n\t1 as PropertyTypeID\r\nFROM \r\n [pims].[dbo].Buildings p\r\n\tINNER JOIN Addresses a\r\n\tON p.AddressId \u003d a.Id\r\n\tLEFT OUTER JOIN AdministrativeAreas aa\r\n\tON aa.Name \u003d a.AdministrativeArea\r\nWHERE p.BuildingPredominateUseId \u003c\u003d 54": { - "targetName": "building", + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectProperties": { + "targetName": "project_property", "mappingType": "existing", "attributes": { "id": { @@ -573,719 +579,711 @@ "mappingType": "existing" }, "createdbyid": { - "targetName": "\"CreatedById\"", + "targetName": "created_by_id", "mappingType": "existing" }, "createdon": { - "targetName": "\"CreatedOn\"", + "targetName": "created_on", "mappingType": "existing" }, "updatedbyid": { - "targetName": "\"UpdatedById\"", + "targetName": "updated_by_id", "mappingType": "existing" }, "updatedon": { - "targetName": "\"UpdatedOn\"", + "targetName": "updated_on", "mappingType": "existing" }, - "Name": { - "targetName": "\"Name\"", - "mappingType": "existing" + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" }, - "description": { - "targetName": "\"Description\"", + "projectid": { + "targetName": "project_id", "mappingType": "existing" }, - "classificationid": { - "targetName": "\"ClassificationId\"", + "propertytype": { + "targetName": "property_type_id", "mappingType": "existing" }, - "buildingconstructiontypeid": { - "targetName": "\"BuildingConstructionTypeId\"", + "parcelid": { + "targetName": "parcel_id", "mappingType": "existing" }, - "agencyid": { - "targetName": "\"AgencyId\"", + "buildingid": { + "targetName": "building_id", "mappingType": "existing" - }, - "issensitive": { - "targetName": "\"IsSensitive\"", + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectNumbers": { + "targetName": "project_number", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", "mappingType": "existing" }, - "isvisibletootheragencies": { - "targetName": "\"IsVisibleToOtherAgencies\"", + "createdbyid": { + "targetName": "created_by_id", "mappingType": "existing" }, - "buildingfloorcount": { - "targetName": "\"BuildingFloorCount\"", + "createdon": { + "targetName": "created_on", "mappingType": "existing" }, - "buildingpredominateuseid": { - "targetName": "\"BuildingPredominateUseId\"", + "updatedbyid": { + "targetName": "updated_by_id", "mappingType": "existing" }, - "buildingtenancy": { - "targetName": "\"BuildingTenancy\"", + "updatedon": { + "targetName": "updated_on", "mappingType": "existing" }, - "rentablearea": { - "targetName": "\"RentableArea\"", + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/NotificationQueue": { + "targetName": "notification_queue", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", "mappingType": "existing" }, - "buildingoccupanttypeid": { - "targetName": "\"BuildingOccupantTypeId\"", + "createdbyid": { + "targetName": "created_by_id", "mappingType": "existing" }, - "leaseexpiry": { - "targetName": "\"LeaseExpiry\"", + "createdon": { + "targetName": "created_on", "mappingType": "existing" }, - "occupantname": { - "targetName": "\"OccupantName\"", + "updatedbyid": { + "targetName": "updated_by_id", "mappingType": "existing" }, - "transferleaseonsale": { - "targetName": "\"TransferLeaseOnSale\"", + "updatedon": { + "targetName": "updated_on", "mappingType": "existing" }, - "buildingtenancyupdatedon": { - "targetName": "\"BuildingTenancyUpdatedOn\"", + "rowversion": { + "targetName": "\"RowVersion\"", + "mappingType": "skip" + }, + "Key": { + "targetName": "\"Key\"", "mappingType": "existing" }, - "encumbrancereason": { - "targetName": "\"EncumbranceReason\"", + "status": { + "targetName": "\"Status\"", "mappingType": "existing" }, - "leasedlandmetadata": { - "targetName": "\"LeasedLandMetadata\"", + "priority": { + "targetName": "\"Priority\"", "mappingType": "existing" }, - "totalarea": { - "targetName": "\"TotalArea\"", + "Encoding": { + "targetName": "\"Encoding\"", "mappingType": "existing" }, - "Location": { - "targetName": "\"Location\"", + "sendon": { + "targetName": "send_on", "mappingType": "existing" }, - "administrativeareaid": { - "targetName": "\"AdministrativeAreaId\"", + "To": { + "targetName": "\"To\"", "mappingType": "existing" }, - "address1": { - "targetName": "\"Address1\"", + "subject": { + "targetName": "\"Subject\"", "mappingType": "existing" }, - "postal": { - "targetName": "\"Postal\"", + "bodytype": { + "targetName": "body_type", "mappingType": "existing" }, - "propertytypeid": { - "targetName": "\"PropertyTypeID\"", + "body": { + "targetName": "\"Body\"", "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT pb.*\r\n FROM [pims].[dbo].ParcelBuildings pb\r\n INNER JOIN Buildings b\r\n ON b.Id \u003d pb.BuildingId\r\n WHERE b.BuildingPredominateUseId \u003c\u003d 54": { - "targetName": "parcel_building", - "mappingType": "existing", - "attributes": { - "parcelid": { - "targetName": "\"ParcelId\"", + }, + "bcc": { + "targetName": "\"Bcc\"", "mappingType": "existing" }, - "buildingid": { - "targetName": "\"BuildingId\"", + "cc": { + "targetName": "\"Cc\"", "mappingType": "existing" }, - "createdbyid": { - "targetName": "\"CreatedById\"", + "tag": { + "targetName": "\"Tag\"", "mappingType": "existing" }, - "createdon": { - "targetName": "\"CreatedOn\"", + "projectid": { + "targetName": "project_id", "mappingType": "existing" }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", + "toagencyid": { + "targetName": "to_agency_id", "mappingType": "existing" }, - "updatedon": { - "targetName": "\"UpdatedOn\"", + "templateid": { + "targetName": "template_id", "mappingType": "existing" }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" + "chesmessageid": { + "targetName": "ches_message_id", + "mappingType": "existing" + }, + "chestransactionid": { + "targetName": "ches_transaction_id", + "mappingType": "existing" } } }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [ParcelId]\r\n ,[Date]\r\n ,[Key]\r\n ,\r\n\t CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Firm]\r\n ,[Value]\r\n ,[Note]\r\n FROM [pims].[dbo].[ParcelEvaluations]": { - "targetName": "parcel_evaluation", + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT \r\n u.[Id],\r\n \r\n\t CASE \r\n\t\tWHEN u.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE u.[CreatedById]\r\n\t END AS [CreatedById],\r\n \r\n\t CASE \r\n\t\tWHEN u.IsDisabled \u003d 0 THEN \u0027Active\u0027\r\n\t\tELSE \u0027Disabled\u0027\r\n\t END AS [Status],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n urd.CreatedOn,\r\n urd.UserId,\r\n ua.AgencyId, \r\n STRING_AGG(urd.RoleName, \u0027, \u0027) AS Roles,\r\n CASE \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%System Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial Reporter%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%SRES Financial%\u0027 THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Agency Administrator%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Analyst%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Real Estate Manager%\u0027 THEN \u002700000000-0000-0000-0000-000000000001\u0027\r\n \r\n WHEN STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister Assistant%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Assistant Deputy Minister%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%Executive Director%\u0027\r\n OR STRING_AGG(urd.RoleName, \u0027, \u0027) LIKE \u0027%View Only Properties%\u0027 THEN \u002700000000-0000-0000-0000-000000000002\u0027\r\n\t \r\n END AS UserType\r\nFROM Users u\r\nLEFT JOIN (\r\n SELECT \r\n ur.UserId,\r\n MAX(ur.CreatedOn) AS CreatedOn,\r\n STRING_AGG(r.Name, \u0027, \u0027) AS RoleName\r\n FROM [pims].[dbo].[UserRoles] ur\r\n INNER JOIN Roles r ON ur.RoleId \u003d r.Id\r\n GROUP BY ur.UserId\r\n) AS urd ON u.Id \u003d urd.UserId\r\n\r\nLEFT OUTER JOIN (\r\n SELECT UserId, MIN(AgencyId) AS AgencyId\r\n FROM UserAgencies\r\n GROUP BY UserId\r\n) ua_min ON u.Id \u003d ua_min.UserId\r\nLEFT OUTER JOIN UserAgencies ua ON u.Id \u003d ua.UserId AND ua.AgencyId \u003d ua_min.AgencyId\r\n\r\nWHERE u.Id \u003c\u003e \u002700000000-0000-0000-0000-000000000000\u0027\r\n\r\nGROUP BY u.[Id],\r\n u.[CreatedById],\r\n u.[UpdatedById],\r\n u.[UpdatedOn],\r\n u.[Username],\r\n u.[DisplayName],\r\n u.[FirstName],\r\n u.[MiddleName],\r\n u.[LastName],\r\n u.[Email],\r\n u.[Position],\r\n u.[IsDisabled],\r\n u.[EmailVerified],\r\n u.[Note],\r\n u.[IsSystem],\r\n u.[LastLogin],\r\n u.[ApprovedById],\r\n u.[ApprovedOn],\r\n u.[KeycloakUserId],\r\n urd.CreatedOn, \r\n urd.UserId, \r\n ua.AgencyId\r\nORDER BY urd.CreatedOn ASC": { + "targetName": "user", "mappingType": "existing", "attributes": { - "parcelid": { - "targetName": "\"ParcelId\"", - "mappingType": "existing" - }, - "Date": { - "targetName": "\"Date\"", - "mappingType": "existing" - }, - "Key": { - "targetName": "\"EvaluationKeyId\"", + "id": { + "targetName": "id", "mappingType": "existing" }, "createdbyid": { - "targetName": "\"CreatedById\"", + "targetName": "created_by_id", "mappingType": "existing" }, - "createdon": { - "targetName": "\"CreatedOn\"", + "status": { + "targetName": "status", "mappingType": "existing" }, "updatedbyid": { - "targetName": "\"UpdatedById\"", + "targetName": "updated_by_id", "mappingType": "existing" }, "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "firm": { - "targetName": "\"Firm\"", + "targetName": "updated_on", "mappingType": "existing" }, - "value": { - "targetName": "\"Value\"", + "username": { + "targetName": "username", "mappingType": "existing" }, - "note": { - "targetName": "\"Note\"", - "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [ParcelId]\r\n ,[FiscalYear]\r\n ,[Key]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Value]\r\n ,[Note]\r\n ,[EffectiveDate]\r\n FROM [dbo].[ParcelFiscals]": { - "targetName": "parcel_fiscal", - "mappingType": "existing", - "attributes": { - "parcelid": { - "targetName": "parcelid", + "displayname": { + "targetName": "display_name", "mappingType": "existing" }, - "fiscalyear": { - "targetName": "fiscalyear", + "firstname": { + "targetName": "first_name", "mappingType": "existing" }, - "Key": { - "targetName": "\"FiscalKeyId\"", + "middlename": { + "targetName": "middle_name", "mappingType": "existing" }, - "createdbyid": { - "targetName": "createdbyid", + "lastname": { + "targetName": "last_name", "mappingType": "existing" }, - "createdon": { - "targetName": "createdon", + "email": { + "targetName": "email", "mappingType": "existing" }, - "updatedbyid": { - "targetName": "updatedbyid", + "Position": { + "targetName": "Position", "mappingType": "existing" }, - "updatedon": { - "targetName": "updatedon", + "isdisabled": { + "targetName": "is_disabled", "mappingType": "existing" }, - "value": { - "targetName": "value", + "emailverified": { + "targetName": "email_verified", "mappingType": "existing" }, "note": { "targetName": "note", "mappingType": "existing" }, - "effectivedate": { - "targetName": "effectivedate", - "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\n SELECT BuildingId,\r\n FiscalYear,\r\n [Key],\r\n CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById],\r\n CreatedOn,\r\n UpdatedById,\r\n UpdatedOn,\r\n [Value],\r\n Note,\r\n EffectiveDate\r\n FROM BuildingFiscals \r\n \r\nWHERE BuildingId IN (\r\n\tSELECT b.Id \r\n\tFROM Buildings b\r\n\tWHERE b.BuildingPredominateUseId \u003c\u003d 54\r\n)": { - "targetName": "building_fiscal", - "mappingType": "existing", - "attributes": { - "buildingid": { - "targetName": "\"BuildingId\"", + "issystem": { + "targetName": "is_system", "mappingType": "existing" }, - "fiscalyear": { - "targetName": "\"FiscalYear\"", + "lastlogin": { + "targetName": "last_login", "mappingType": "existing" }, - "Key": { - "targetName": "\"FiscalKeyId\"", + "approvedbyid": { + "targetName": "approved_by_id", "mappingType": "existing" }, - "createdbyid": { - "targetName": "\"CreatedById\"", + "approvedon": { + "targetName": "approved_on", "mappingType": "existing" }, - "createdon": { - "targetName": "\"CreatedOn\"", + "keycloakuserid": { + "targetName": "keycloak_user_id", "mappingType": "existing" }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", + "createdon": { + "targetName": "created_on", "mappingType": "existing" }, - "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" + "userid": { + "targetName": "userid", + "mappingType": "skip" }, - "value": { - "targetName": "\"Value\"", + "agencyid": { + "targetName": "agency_id", "mappingType": "existing" }, - "note": { - "targetName": "\"Note\"", - "mappingType": "existing" + "roles": { + "targetName": "roles", + "mappingType": "skip" }, - "effectivedate": { - "targetName": "\"EffectiveDate\"", + "usertype": { + "targetName": "role_id", "mappingType": "existing" } } }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [BuildingId]\r\n ,[Date]\r\n ,[Key]\r\n ,\r\n\t CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Value]\r\n ,[Note]\r\n FROM [pims].[dbo].[BuildingEvaluations]\r\nWHERE BuildingId IN (\r\n\tSELECT b.Id \r\n\tFROM Buildings b\r\n\tWHERE b.BuildingPredominateUseId \u003c\u003d 54\r\n)": { - "targetName": "building_evaluation", + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT p.[Id],\r\n\t CASE \r\n\t\tWHEN p.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE p.[CreatedById]\r\n\t END AS [CreatedById],\r\n p.[CreatedOn],\r\n p.[UpdatedById],\r\n p.[UpdatedOn],\r\n p.[Name],\r\n p.[Description],\r\n p.[ClassificationId],\r\n p.[AgencyId],\r\n p.[IsSensitive],\r\n p.[IsVisibleToOtherAgencies],\r\n p.[PID],\r\n p.[PIN],\r\n p.[LandArea],\r\n p.[LandLegalDescription],\r\n p.[Zoning],\r\n p.[ZoningPotential],\r\n p.[NotOwned],\r\n\tCONVERT(VARCHAR(40), CAST(Location.Long AS DECIMAL(18, 14))) + \u0027, \u0027 + CONVERT(VARCHAR(40), CAST(Location.Lat AS DECIMAL(18, 14))) AS Location,\r\n CASE \r\n WHEN a.AdministrativeArea \u003d \u0027The Corporation of the City of Nelson\u0027 THEN 188\r\n WHEN a.AdministrativeArea \u003d \u0027Township of Langley\u0027 THEN 150\r\n WHEN a.AdministrativeArea \u003d \u0027District of North Vancouver\u0027 THEN 196\r\n WHEN a.AdministrativeArea \u003d \u0027Coombs\u0027 THEN 483\r\n WHEN a.AdministrativeArea \u003d \u0027Brookmere\u0027 THEN 481\r\n WHEN a.AdministrativeArea \u003d \u0027Thornhill\u0027 THEN 501\r\n WHEN a.AdministrativeArea \u003d \u0027Two Mile\u0027 THEN 502\r\n WHEN a.AdministrativeArea \u003d \u0027Crofton\u0027 THEN 484\r\n WHEN a.AdministrativeArea \u003d \u0027East Sooke\u0027 THEN 485\r\n WHEN a.AdministrativeArea \u003d \u0027Mudge Island\u0027 THEN 492\r\n WHEN a.AdministrativeArea \u003d \u0027Coal Harbour\u0027 THEN 482\r\n WHEN a.AdministrativeArea \u003d \u0027Miworth\u0027 THEN 490\r\n WHEN a.AdministrativeArea \u003d \u0027Lake Errock\u0027 THEN 489\r\n WHEN a.AdministrativeArea \u003d \u0027Black Creek\u0027 THEN 479\r\n WHEN a.AdministrativeArea \u003d \u0027Whaletown\u0027 THEN 504\r\n WHEN a.AdministrativeArea \u003d \u0027Quathiaski Cove\u0027 THEN 494\r\n WHEN a.AdministrativeArea \u003d \u0027Big Bay in Stuart Island\u0027 THEN 478\r\n WHEN a.AdministrativeArea \u003d \u0027Surge Narrows in Read Island\u0027 THEN 500\r\n WHEN a.AdministrativeArea \u003d \u0027Rock Bay in Sayward\u0027 THEN 497\r\n WHEN a.AdministrativeArea \u003d \u0027Granite Bay in Quadra Island\u0027 THEN 487\r\n WHEN a.AdministrativeArea \u003d \u0027Moberly Lake\u0027 THEN 491\r\n WHEN a.AdministrativeArea \u003d \u0027Quatsino\u0027 THEN 495\r\n WHEN a.AdministrativeArea \u003d \u0027Bouchie Lake\u0027 THEN 480\r\n WHEN a.AdministrativeArea \u003d \u0027West Lake\u0027 THEN 503\r\n WHEN a.AdministrativeArea \u003d \u0027Salmon Valley\u0027 THEN 498\t\t\r\n WHEN a.AdministrativeArea \u003d \u0027Red Rock\u0027 THEN 496\r\n WHEN a.AdministrativeArea \u003d \u0027Stoner\u0027 THEN 499\r\n WHEN a.AdministrativeArea \u003d \u0027Pineview FFG\u0027 THEN 493\r\n WHEN a.AdministrativeArea \u003d \u0027Wonowon\u0027 THEN 506\r\n WHEN a.AdministrativeArea \u003d \u0027Halfway River\u0027 THEN 488\r\n WHEN a.AdministrativeArea \u003d \u0027Giscome\u0027 THEN 486\r\n WHEN a.AdministrativeArea \u003d \u0027Willow River\u0027 THEN 505\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lower Nicola\u0027 THEN 314\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Belcarra\u0027 THEN 425\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Tsawwassen\u0027 THEN 315\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Anmore\u0027 THEN 432\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lake Cowichan\u0027 THEN 442\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027North Cowichan\u0027 THEN 450\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Port Edward\u0027 THEN 347\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Spallumcheen\u0027 THEN 318\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Jumbo Glacier Mountain Resort Municipality\u0027 THEN 438\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Kent\u0027 THEN 439\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Highlands\u0027 THEN 348\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Slocan\u0027 THEN 380\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Warfield\u0027 THEN 448\r\n ELSE aa.Id \r\n END AS AdministrativeAreaId, \r\n\ta.AdministrativeArea,\r\n\ta.Address1, \r\n\ta.Postal,\r\n\tpp.ParcelId as ParentID,\r\n\t0 as PropertyTypeID\r\nFROM \r\n [pims].[dbo].[Parcels] p\r\n\tINNER JOIN Addresses a\r\n\tON p.AddressId \u003d a.Id\r\n\tLEFT OUTER JOIN AdministrativeAreas aa\r\n\tON aa.Name \u003d a.AdministrativeArea\r\n    LEFT OUTER JOIN ParcelParcels pp\r\n    ON pp.SubdivisionId \u003d p.Id": { + "targetName": "parcel", "mappingType": "existing", "attributes": { - "buildingid": { - "targetName": "\"BuildingId\"", - "mappingType": "existing" - }, - "Date": { - "targetName": "\"Date\"", - "mappingType": "existing" - }, - "Key": { - "targetName": "\"EvaluationKeyId\"", + "id": { + "targetName": "\"Id\"", "mappingType": "existing" }, "createdbyid": { - "targetName": "\"CreatedById\"", + "targetName": "created_by_id", "mappingType": "existing" }, "createdon": { - "targetName": "\"CreatedOn\"", + "targetName": "created_on", "mappingType": "existing" }, "updatedbyid": { - "targetName": "\"UpdatedById\"", + "targetName": "updated_by_id", "mappingType": "existing" }, "updatedon": { - "targetName": "\"UpdatedOn\"", + "targetName": "updated_on", "mappingType": "existing" }, - "value": { - "targetName": "\"Value\"", + "Name": { + "targetName": "\"Name\"", "mappingType": "existing" }, - "note": { - "targetName": "\"Note\"", + "description": { + "targetName": "\"Description\"", "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/Projects": { - "targetName": "project", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "\"Id\"", + }, + "classificationid": { + "targetName": "classification_id", "mappingType": "existing" }, - "createdbyid": { - "targetName": "\"CreatedById\"", + "agencyid": { + "targetName": "agency_id", "mappingType": "existing" }, - "createdon": { - "targetName": "\"CreatedOn\"", + "issensitive": { + "targetName": "is_sensitive", "mappingType": "existing" }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", + "isvisibletootheragencies": { + "targetName": "is_visible_to_other_agencies", "mappingType": "existing" }, - "updatedon": { - "targetName": "\"UpdatedOn\"", + "pid": { + "targetName": "\"PID\"", "mappingType": "existing" }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" + "pin": { + "targetName": "\"PIN\"", + "mappingType": "existing" }, - "projectnumber": { - "targetName": "\"ProjectNumber\"", + "landarea": { + "targetName": "land_area", "mappingType": "existing" }, - "Name": { - "targetName": "\"Name\"", + "landlegaldescription": { + "targetName": "land_legal_description", "mappingType": "existing" }, - "workflowid": { - "targetName": "\"WorkflowId\"", + "zoning": { + "targetName": "\"Zoning\"", "mappingType": "existing" }, - "manager": { - "targetName": "\"Manager\"", + "zoningpotential": { + "targetName": "zoning_potential", "mappingType": "existing" }, - "reportedfiscalyear": { - "targetName": "\"ReportedFiscalYear\"", + "notowned": { + "targetName": "not_owned", "mappingType": "existing" }, - "actualfiscalyear": { - "targetName": "\"ActualFiscalYear\"", + "Location": { + "targetName": "\"Location\"", "mappingType": "existing" }, - "agencyid": { - "targetName": "\"AgencyId\"", + "administrativeareaid": { + "targetName": "administrative_area_id", "mappingType": "existing" }, - "statusid": { - "targetName": "\"StatusId\"", + "administrativearea": { + "targetName": "\"AdministrativeArea\"", + "mappingType": "skip" + }, + "address1": { + "targetName": "\"Address1\"", "mappingType": "existing" }, - "description": { - "targetName": "\"Description\"", + "postal": { + "targetName": "\"Postal\"", "mappingType": "existing" }, - "tierlevelid": { - "targetName": "\"TierLevelId\"", + "parentid": { + "targetName": "parent_parcel_id", "mappingType": "existing" }, - "riskid": { - "targetName": "\"RiskId\"", + "propertytypeid": { + "targetName": "property_type_id", + "mappingType": "existing" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT p.[Id],\r\n\tCASE \r\n\t WHEN p.[CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t ELSE p.[CreatedById]\r\n\tEND AS [CreatedById],\r\n p.[CreatedOn],\r\n p.[UpdatedById],\r\n p.[UpdatedOn],\r\n p.[Name],\r\n p.[Description],\r\n p.[ClassificationId],\r\n p.BuildingConstructionTypeId,\r\n p.[AgencyId],\r\n p.[IsSensitive],\r\n p.[IsVisibleToOtherAgencies],\r\n\tp.BuildingFloorCount,\r\n\tp.BuildingPredominateUseId,\r\n\tp.BuildingTenancy,\r\n\tp.RentableArea,\r\n\tp.BuildingOccupantTypeId,\r\n\tp.LeaseExpiry,\r\n\tp.OccupantName,\r\n\tp.TransferLeaseOnSale,\r\n\tp.BuildingTenancyUpdatedOn,\r\n\tp.EncumbranceReason,\r\n\tp.LeasedLandMetadata,\r\n\tp.TotalArea,\r\n\tCONVERT(VARCHAR(40), CAST(Location.Long AS DECIMAL(18, 14))) + \u0027, \u0027 + CONVERT(VARCHAR(40), CAST(Location.Lat AS DECIMAL(18, 14))) AS Location,\r\n\tCASE \r\n WHEN a.AdministrativeArea \u003d \u0027The Corporation of the City of Nelson\u0027 THEN 188\r\n WHEN a.AdministrativeArea \u003d \u0027Township of Langley\u0027 THEN 150\r\n WHEN a.AdministrativeArea \u003d \u0027District of North Vancouver\u0027 THEN 196\r\n WHEN a.AdministrativeArea \u003d \u0027Coombs\u0027 THEN 483\r\n WHEN a.AdministrativeArea \u003d \u0027Brookmere\u0027 THEN 481\r\n WHEN a.AdministrativeArea \u003d \u0027Thornhill\u0027 THEN 501\r\n WHEN a.AdministrativeArea \u003d \u0027Two Mile\u0027 THEN 502\r\n WHEN a.AdministrativeArea \u003d \u0027Crofton\u0027 THEN 484\r\n WHEN a.AdministrativeArea \u003d \u0027East Sooke\u0027 THEN 485\r\n WHEN a.AdministrativeArea \u003d \u0027Mudge Island\u0027 THEN 492\r\n WHEN a.AdministrativeArea \u003d \u0027Coal Harbour\u0027 THEN 482\r\n WHEN a.AdministrativeArea \u003d \u0027Miworth\u0027 THEN 490\r\n WHEN a.AdministrativeArea \u003d \u0027Lake Errock\u0027 THEN 489\r\n WHEN a.AdministrativeArea \u003d \u0027Black Creek\u0027 THEN 479\r\n WHEN a.AdministrativeArea \u003d \u0027Whaletown\u0027 THEN 504\r\n WHEN a.AdministrativeArea \u003d \u0027Quathiaski Cove\u0027 THEN 494\r\n WHEN a.AdministrativeArea \u003d \u0027Big Bay in Stuart Island\u0027 THEN 478\r\n WHEN a.AdministrativeArea \u003d \u0027Surge Narrows in Read Island\u0027 THEN 500\r\n WHEN a.AdministrativeArea \u003d \u0027Rock Bay in Sayward\u0027 THEN 497\r\n WHEN a.AdministrativeArea \u003d \u0027Granite Bay in Quadra Island\u0027 THEN 487\r\n WHEN a.AdministrativeArea \u003d \u0027Moberly Lake\u0027 THEN 491\r\n WHEN a.AdministrativeArea \u003d \u0027Quatsino\u0027 THEN 495\r\n WHEN a.AdministrativeArea \u003d \u0027Bouchie Lake\u0027 THEN 480\r\n WHEN a.AdministrativeArea \u003d \u0027West Lake\u0027 THEN 503\r\n WHEN a.AdministrativeArea \u003d \u0027Salmon Valley\u0027 THEN 498\t\t\r\n WHEN a.AdministrativeArea \u003d \u0027Red Rock\u0027 THEN 496\r\n WHEN a.AdministrativeArea \u003d \u0027Stoner\u0027 THEN 499\r\n WHEN a.AdministrativeArea \u003d \u0027Pineview FFG\u0027 THEN 493\r\n WHEN a.AdministrativeArea \u003d \u0027Wonowon\u0027 THEN 506\r\n WHEN a.AdministrativeArea \u003d \u0027Halfway River\u0027 THEN 488\r\n WHEN a.AdministrativeArea \u003d \u0027Giscome\u0027 THEN 486\r\n WHEN a.AdministrativeArea \u003d \u0027Willow River\u0027 THEN 505\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lower Nicola\u0027 THEN 314\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Belcarra\u0027 THEN 425\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Tsawwassen\u0027 THEN 315\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Anmore\u0027 THEN 432\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Lake Cowichan\u0027 THEN 442\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027North Cowichan\u0027 THEN 450\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Port Edward\u0027 THEN 347\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Spallumcheen\u0027 THEN 318\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Jumbo Glacier Mountain Resort Municipality\u0027 THEN 438\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Kent\u0027 THEN 439\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Highlands\u0027 THEN 348\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Slocan\u0027 THEN 380\r\n\t\tWHEN a.AdministrativeArea \u003d \u0027Warfield\u0027 THEN 448\r\n ELSE aa.Id \r\n END AS AdministrativeAreaId, \r\n\ta.Address1, \r\n\ta.Postal,\r\n\t1 as PropertyTypeID\r\nFROM \r\n [pims].[dbo].Buildings p\r\n\tINNER JOIN Addresses a\r\n\tON p.AddressId \u003d a.Id\r\n\tLEFT OUTER JOIN AdministrativeAreas aa\r\n\tON aa.Name \u003d a.AdministrativeArea\r\nWHERE p.BuildingPredominateUseId \u003c\u003d 54": { + "targetName": "building", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", "mappingType": "existing" }, - "metadata": { - "targetName": "\"Metadata\"", + "createdbyid": { + "targetName": "created_by_id", "mappingType": "existing" }, - "submittedon": { - "targetName": "\"SubmittedOn\"", + "createdon": { + "targetName": "created_on", "mappingType": "existing" }, - "approvedon": { - "targetName": "\"ApprovedOn\"", + "updatedbyid": { + "targetName": "updated_by_id", "mappingType": "existing" }, - "deniedon": { - "targetName": "\"DeniedOn\"", + "updatedon": { + "targetName": "updated_on", "mappingType": "existing" }, - "cancelledon": { - "targetName": "\"CancelledOn\"", + "Name": { + "targetName": "\"Name\"", "mappingType": "existing" }, - "completedon": { - "targetName": "\"CompletedOn\"", + "description": { + "targetName": "\"Description\"", "mappingType": "existing" }, - "netbook": { - "targetName": "\"NetBook\"", + "classificationid": { + "targetName": "classification_id", "mappingType": "existing" }, - "market": { - "targetName": "\"Market\"", + "buildingconstructiontypeid": { + "targetName": "building_construction_type_id", "mappingType": "existing" }, - "assessed": { - "targetName": "\"Assessed\"", + "agencyid": { + "targetName": "agency_id", "mappingType": "existing" }, - "appraised": { - "targetName": "\"Appraised\"", + "issensitive": { + "targetName": "is_sensitive", "mappingType": "existing" }, - "projecttype": { - "targetName": "\"ProjectType\"", + "isvisibletootheragencies": { + "targetName": "is_visible_to_other_agencies", "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT [ProjectId]\r\n ,[TaskId]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[IsCompleted]\r\n ,[CompletedOn]\r\n FROM [dbo].[ProjectTasks]": { - "targetName": "project_task", - "mappingType": "existing", - "attributes": { - "projectid": { - "targetName": "\"ProjectId\"", + }, + "buildingfloorcount": { + "targetName": "building_floor_count", "mappingType": "existing" }, - "taskid": { - "targetName": "\"TaskId\"", + "buildingpredominateuseid": { + "targetName": "building_predominate_use_id", "mappingType": "existing" }, - "CreatedById\r\n ,[CreatedOn": { - "targetName": "\"CreatedById\"", + "buildingtenancy": { + "targetName": "building_tenancy", "mappingType": "existing" }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", + "rentablearea": { + "targetName": "rentable_area", "mappingType": "existing" }, - "updatedon": { - "targetName": "\"UpdatedOn\"", + "buildingoccupanttypeid": { + "targetName": "building_occupant_type_id", "mappingType": "existing" }, - "iscompleted": { - "targetName": "\"IsCompleted\"", + "leaseexpiry": { + "targetName": "lease_expiry", "mappingType": "existing" }, - "completedon": { - "targetName": "\"CompletedOn\"", + "occupantname": { + "targetName": "occupant_name", "mappingType": "existing" - } - } - }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [Id]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[IsFinal]\r\n ,[Name]\r\n ,[From]\r\n ,[To]\r\n ,[ReportType]\r\n FROM [dbo].[ProjectReports]": { - "targetName": "project_report", - "mappingType": "existing", - "attributes": { - "id": { - "targetName": "\"Id\"", + }, + "transferleaseonsale": { + "targetName": "transfer_lease_on_sale", "mappingType": "existing" }, - "createdbyid": { - "targetName": "\"CreatedById\"", + "buildingtenancyupdatedon": { + "targetName": "building_tenancy_updated_on", "mappingType": "existing" }, - "createdon": { - "targetName": "\"CreatedOn\"", + "encumbrancereason": { + "targetName": "encumbrance_reason", "mappingType": "existing" }, - "updatedbyid": { - "targetName": "\"UpdatedById\"", + "leasedlandmetadata": { + "targetName": "leased_land_metadata", "mappingType": "existing" }, - "updatedon": { - "targetName": "\"UpdatedOn\"", + "totalarea": { + "targetName": "total_area", "mappingType": "existing" }, - "isfinal": { - "targetName": "\"IsFinal\"", + "Location": { + "targetName": "\"location\"", "mappingType": "existing" }, - "Name": { - "targetName": "\"Name\"", + "administrativeareaid": { + "targetName": "administrative_area_id", "mappingType": "existing" }, - "From": { - "targetName": "\"From\"", + "address1": { + "targetName": "\"Address1\"", "mappingType": "existing" }, - "To": { - "targetName": "\"To\"", + "postal": { + "targetName": "\"Postal\"", "mappingType": "existing" }, - "reporttype": { - "targetName": "\"ReportTypeId\"", + "propertytypeid": { + "targetName": "property_type_id", "mappingType": "existing" } } }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectSnapshots": { - "targetName": "project_snapshot", + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT pb.*\r\n FROM [pims].[dbo].ParcelBuildings pb\r\n INNER JOIN Buildings b\r\n ON b.Id \u003d pb.BuildingId\r\n WHERE b.BuildingPredominateUseId \u003c\u003d 54": { + "targetName": "parcel_building", "mappingType": "existing", "attributes": { - "id": { - "targetName": "\"Id\"", + "parcelid": { + "targetName": "parcel_id", + "mappingType": "existing" + }, + "buildingid": { + "targetName": "building_id", "mappingType": "existing" }, "createdbyid": { - "targetName": "\"CreatedById\"", + "targetName": "created_by_id", "mappingType": "existing" }, "createdon": { - "targetName": "\"CreatedOn\"", + "targetName": "created_on", "mappingType": "existing" }, "updatedbyid": { - "targetName": "\"UpdatedById\"", + "targetName": "updated_by_id", "mappingType": "existing" }, "updatedon": { - "targetName": "\"UpdatedOn\"", + "targetName": "updated_on", "mappingType": "existing" }, "rowversion": { "targetName": "\"RowVersion\"", "mappingType": "skip" + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [ParcelId]\r\n ,[Date]\r\n ,[Key]\r\n ,\r\n\t CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Firm]\r\n ,[Value]\r\n ,[Note]\r\n FROM [pims].[dbo].[ParcelEvaluations]": { + "targetName": "parcel_evaluation", + "mappingType": "existing", + "attributes": { + "parcelid": { + "targetName": "parcel_id", + "mappingType": "existing" }, - "projectid": { - "targetName": "\"ProjectId\"", + "Date": { + "targetName": "date", "mappingType": "existing" }, - "netbook": { - "targetName": "\"NetBook\"", + "Key": { + "targetName": "evaluation_key_id", "mappingType": "existing" }, - "market": { - "targetName": "\"Market\"", + "createdbyid": { + "targetName": "created_by_id", "mappingType": "existing" }, - "assessed": { - "targetName": "\"Assessed\"", + "createdon": { + "targetName": "created_on", "mappingType": "existing" }, - "appraised": { - "targetName": "\"Appraised\"", + "updatedbyid": { + "targetName": "updated_by_id", "mappingType": "existing" }, - "snapshoton": { - "targetName": "\"SnapshotOn\"", + "updatedon": { + "targetName": "updated_on", "mappingType": "existing" }, - "metadata": { - "targetName": "\"Metadata\"", + "firm": { + "targetName": "\"Firm\"", + "mappingType": "existing" + }, + "value": { + "targetName": "\"Value\"", + "mappingType": "existing" + }, + "note": { + "targetName": "\"Note\"", "mappingType": "existing" } } }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectStatusHistory": { - "targetName": "project_status_history", + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [ParcelId]\r\n ,[FiscalYear]\r\n ,[Key]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Value]\r\n ,[Note]\r\n ,[EffectiveDate]\r\n FROM [dbo].[ParcelFiscals]": { + "targetName": "parcel_fiscal", "mappingType": "existing", "attributes": { - "id": { - "targetName": "\"Id\"", + "parcelid": { + "targetName": "parcel_id", + "mappingType": "existing" + }, + "fiscalyear": { + "targetName": "fiscal_year", + "mappingType": "existing" + }, + "Key": { + "targetName": "fiscal_key_id", "mappingType": "existing" }, "createdbyid": { - "targetName": "\"CreatedById\"", + "targetName": "created_by_id", "mappingType": "existing" }, "createdon": { - "targetName": "\"CreatedOn\"", + "targetName": "created_on", "mappingType": "existing" }, "updatedbyid": { - "targetName": "\"UpdatedById\"", + "targetName": "updated_by_id", "mappingType": "existing" }, "updatedon": { - "targetName": "\"UpdatedOn\"", + "targetName": "updated_on", "mappingType": "existing" }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - }, - "projectid": { - "targetName": "\"ProjectId\"", + "value": { + "targetName": "value", "mappingType": "existing" }, - "workflowid": { - "targetName": "\"WorkflowId\"", + "note": { + "targetName": "note", "mappingType": "existing" }, - "statusid": { - "targetName": "\"StatusId\"", + "effectivedate": { + "targetName": "effective_date", "mappingType": "existing" } } }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectProperties": { - "targetName": "project_property", + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\n SELECT BuildingId,\r\n FiscalYear,\r\n [Key],\r\n CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById],\r\n CreatedOn,\r\n UpdatedById,\r\n UpdatedOn,\r\n [Value],\r\n Note,\r\n EffectiveDate\r\n FROM BuildingFiscals \r\n \r\nWHERE BuildingId IN (\r\n\tSELECT b.Id \r\n\tFROM Buildings b\r\n\tWHERE b.BuildingPredominateUseId \u003c\u003d 54\r\n)": { + "targetName": "building_fiscal", "mappingType": "existing", "attributes": { - "id": { - "targetName": "\"Id\"", + "buildingid": { + "targetName": "building_id", + "mappingType": "existing" + }, + "fiscalyear": { + "targetName": "fiscal_year", + "mappingType": "existing" + }, + "Key": { + "targetName": "fiscal_key_id", "mappingType": "existing" }, "createdbyid": { - "targetName": "\"CreatedById\"", + "targetName": "created_by_id", "mappingType": "existing" }, "createdon": { - "targetName": "\"CreatedOn\"", + "targetName": "created_on", "mappingType": "existing" }, "updatedbyid": { - "targetName": "\"UpdatedById\"", + "targetName": "updated_by_id", "mappingType": "existing" }, "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - }, - "projectid": { - "targetName": "\"ProjectId\"", + "targetName": "updated_on", "mappingType": "existing" }, - "propertytype": { - "targetName": "\"PropertyTypeId\"", + "value": { + "targetName": "\"Value\"", "mappingType": "existing" }, - "parcelid": { - "targetName": "\"ParcelId\"", + "note": { + "targetName": "\"Note\"", "mappingType": "existing" }, - "buildingid": { - "targetName": "\"BuildingId\"", + "effectivedate": { + "targetName": "effective_date", "mappingType": "existing" } } }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT [ProjectId]\r\n ,[AgencyId]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[OfferAmount]\r\n ,[NotificationId]\r\n ,[Response]\r\n ,[ReceivedOn]\r\n ,[Note]\r\n FROM [dbo].[ProjectAgencyResponses]": { - "targetName": "project_agency_response", + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [BuildingId]\r\n ,[Date]\r\n ,[Key]\r\n ,\r\n\t CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[Value]\r\n ,[Note]\r\n FROM [pims].[dbo].[BuildingEvaluations]\r\nWHERE BuildingId IN (\r\n\tSELECT b.Id \r\n\tFROM Buildings b\r\n\tWHERE b.BuildingPredominateUseId \u003c\u003d 54\r\n)": { + "targetName": "building_evaluation", "mappingType": "existing", "attributes": { - "projectid": { - "targetName": "\"ProjectId\"", + "buildingid": { + "targetName": "building_id", "mappingType": "existing" }, - "agencyid": { - "targetName": "\"AgencyId\"", + "Date": { + "targetName": "\"Date\"", + "mappingType": "existing" + }, + "Key": { + "targetName": "evaluation_key_id", "mappingType": "existing" }, "createdbyid": { - "targetName": "\"CreatedById\"", + "targetName": "created_by_id", "mappingType": "existing" }, "createdon": { - "targetName": "\"CreatedOn\"", + "targetName": "created_on", "mappingType": "existing" }, "updatedbyid": { - "targetName": "\"UpdatedById\"", + "targetName": "updated_by_id", "mappingType": "existing" }, "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "offeramount": { - "targetName": "\"OfferAmount\"", - "mappingType": "existing" - }, - "notificationid": { - "targetName": "\"NotificationId\"", - "mappingType": "existing" - }, - "response": { - "targetName": "\"Response\"", + "targetName": "updated_on", "mappingType": "existing" }, - "receivedon": { - "targetName": "\"ReceivedOn\"", + "value": { + "targetName": "\"Value\"", "mappingType": "existing" }, "note": { @@ -1294,38 +1292,42 @@ } } }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/ProjectNumbers": { - "targetName": "project_number", + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT [ProjectId]\r\n ,[TaskId]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[IsCompleted]\r\n ,[CompletedOn]\r\n FROM [dbo].[ProjectTasks]": { + "targetName": "project_task", "mappingType": "existing", "attributes": { - "id": { - "targetName": "\"Id\"", + "projectid": { + "targetName": "project_id", "mappingType": "existing" }, - "createdbyid": { - "targetName": "\"CreatedById\"", + "taskid": { + "targetName": "task_id", "mappingType": "existing" }, - "createdon": { - "targetName": "\"CreatedOn\"", + "CreatedById\r\n ,[CreatedOn": { + "targetName": "created_by_id", "mappingType": "existing" }, "updatedbyid": { - "targetName": "\"UpdatedById\"", + "targetName": "updated_by_id", "mappingType": "existing" }, "updatedon": { - "targetName": "\"UpdatedOn\"", + "targetName": "updated_on", "mappingType": "existing" }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" + "iscompleted": { + "targetName": "is_completed", + "mappingType": "existing" + }, + "completedon": { + "targetName": "completed_on", + "mappingType": "existing" } } }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [Id]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[ProjectId]\r\n ,[NoteType]\r\n ,[Note]\r\n FROM [dbo].[ProjectNotes]": { - "targetName": "project_note", + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [Id]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[IsFinal]\r\n ,[Name]\r\n ,[From]\r\n ,[To]\r\n ,[ReportType]\r\n FROM [dbo].[ProjectReports]": { + "targetName": "project_report", "mappingType": "existing", "attributes": { "id": { @@ -1333,129 +1335,127 @@ "mappingType": "existing" }, "createdbyid": { - "targetName": "\"CreatedById\"", + "targetName": "created_by_id", "mappingType": "existing" }, "createdon": { - "targetName": "\"CreatedOn\"", + "targetName": "created_on", "mappingType": "existing" }, "updatedbyid": { - "targetName": "\"UpdatedById\"", + "targetName": "updated_by_id", "mappingType": "existing" }, "updatedon": { - "targetName": "\"UpdatedOn\"", + "targetName": "updated_on", "mappingType": "existing" }, - "projectid": { - "targetName": "\"ProjectId\"", + "isfinal": { + "targetName": "is_final", "mappingType": "existing" }, - "notetype": { - "targetName": "\"NoteType\"", + "Name": { + "targetName": "\"Name\"", "mappingType": "existing" }, - "note": { - "targetName": "\"Note\"", + "From": { + "targetName": "\"From\"", + "mappingType": "existing" + }, + "To": { + "targetName": "\"To\"", + "mappingType": "existing" + }, + "reporttype": { + "targetName": "report_type_id", "mappingType": "existing" } } }, - "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/pims/dbo/NotificationQueue": { - "targetName": "notification_queue", + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/\r\nSELECT [ProjectId]\r\n ,[AgencyId]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[OfferAmount]\r\n ,[NotificationId]\r\n ,[Response]\r\n ,[ReceivedOn]\r\n ,[Note]\r\n FROM [dbo].[ProjectAgencyResponses]": { + "targetName": "project_agency_response", "mappingType": "existing", "attributes": { - "id": { - "targetName": "\"Id\"", + "projectid": { + "targetName": "project_id", + "mappingType": "existing" + }, + "agencyid": { + "targetName": "agency_id", "mappingType": "existing" }, "createdbyid": { - "targetName": "\"CreatedById\"", + "targetName": "created_by_id", "mappingType": "existing" }, "createdon": { - "targetName": "\"CreatedOn\"", + "targetName": "created_on", "mappingType": "existing" }, "updatedbyid": { - "targetName": "\"UpdatedById\"", + "targetName": "updated_by_id", "mappingType": "existing" }, "updatedon": { - "targetName": "\"UpdatedOn\"", - "mappingType": "existing" - }, - "rowversion": { - "targetName": "\"RowVersion\"", - "mappingType": "skip" - }, - "Key": { - "targetName": "\"Key\"", - "mappingType": "existing" - }, - "status": { - "targetName": "\"Status\"", + "targetName": "updated_on", "mappingType": "existing" }, - "priority": { - "targetName": "\"Priority\"", + "offeramount": { + "targetName": "offer_amount", "mappingType": "existing" }, - "Encoding": { - "targetName": "\"Encoding\"", + "notificationid": { + "targetName": "notification_id", "mappingType": "existing" }, - "sendon": { - "targetName": "\"SendOn\"", + "response": { + "targetName": "\"Response\"", "mappingType": "existing" }, - "To": { - "targetName": "\"To\"", + "receivedon": { + "targetName": "received_on", "mappingType": "existing" }, - "subject": { - "targetName": "\"Subject\"", + "note": { + "targetName": "\"Note\"", "mappingType": "existing" - }, - "bodytype": { - "targetName": "\"BodyType\"", + } + } + }, + "mssql_jtds_legacy-18ceb477545-3f1bdd7d812c2539/SELECT [Id]\r\n ,CASE \r\n\t\tWHEN [CreatedById] IS NULL THEN \u002700000000-0000-0000-0000-000000000000\u0027\r\n\t\tELSE [CreatedById]\r\n\t END AS [CreatedById]\r\n ,[CreatedOn]\r\n ,[UpdatedById]\r\n ,[UpdatedOn]\r\n ,[ProjectId]\r\n ,[NoteType]\r\n ,[Note]\r\n FROM [dbo].[ProjectNotes]": { + "targetName": "project_note", + "mappingType": "existing", + "attributes": { + "id": { + "targetName": "\"Id\"", "mappingType": "existing" }, - "body": { - "targetName": "\"Body\"", + "createdbyid": { + "targetName": "created_by_id", "mappingType": "existing" }, - "bcc": { - "targetName": "\"Bcc\"", + "createdon": { + "targetName": "created_on", "mappingType": "existing" }, - "cc": { - "targetName": "\"Cc\"", + "updatedbyid": { + "targetName": "updated_by_id", "mappingType": "existing" }, - "tag": { - "targetName": "\"Tag\"", + "updatedon": { + "targetName": "updated_on", "mappingType": "existing" }, "projectid": { - "targetName": "\"ProjectId\"", - "mappingType": "existing" - }, - "toagencyid": { - "targetName": "\"ToAgencyId\"", + "targetName": "project_id", "mappingType": "existing" }, - "templateid": { - "targetName": "\"TemplateId\"", - "mappingType": "existing" - }, - "chesmessageid": { - "targetName": "\"ChesMessageId\"", + "notetype": { + "targetName": "note_type", "mappingType": "existing" }, - "chestransactionid": { - "targetName": "\"ChesTransactionId\"", + "note": { + "targetName": "\"Note\"", "mappingType": "existing" } }