From ae93f95b7642321c450076b3c314a9c347d4effb Mon Sep 17 00:00:00 2001 From: devinleighsmith <41091511+devinleighsmith@users.noreply.github.com> Date: Mon, 4 Apr 2022 23:03:44 -0700 Subject: [PATCH] update lease clear functionality - remove lease subtables before attempting to remove leases previously created by etl. (#1174) --- .../LISDB_PIMS/LIS_DB_to_PIMS_DATASET_1.dtsx | 175 +++++++++--------- ...TI_LEGACY_LISDB_PIMS_DATA_MIGRATION.dtproj | 6 +- 2 files changed, 89 insertions(+), 92 deletions(-) diff --git a/etl/LISDB_PIMS/LISDB_PIMS/LIS_DB_to_PIMS_DATASET_1.dtsx b/etl/LISDB_PIMS/LISDB_PIMS/LIS_DB_to_PIMS_DATASET_1.dtsx index 7e164ade75..e4e7c68b66 100644 --- a/etl/LISDB_PIMS/LISDB_PIMS/LIS_DB_to_PIMS_DATASET_1.dtsx +++ b/etl/LISDB_PIMS/LISDB_PIMS/LIS_DB_to_PIMS_DATASET_1.dtsx @@ -7,13 +7,13 @@ DTS:CreatorName="MSI\fiera" DTS:DTSID="{4B2E793E-3853-46F6-8F50-5A21D250C1A9}" DTS:ExecutableType="Microsoft.Package" - DTS:LastModifiedProductVersion="15.0.2000.167" + DTS:LastModifiedProductVersion="15.0.2000.170" DTS:LocaleID="4105" DTS:ObjectName="Package1" DTS:PackageType="5" DTS:ProtectionLevel="0" - DTS:VersionBuild="266" - DTS:VersionGUID="{3A16B239-8ABA-4B2D-8360-E15E159322D8}"> + DTS:VersionBuild="268" + DTS:VersionGUID="{8E635B3C-EF5D-4EA8-9A9A-4952A52BB303}"> 8 @@ -38,11 +38,7 @@ - - + DTS:ConnectionString="Data Source=localhost,5433;User ID=admin;Initial Catalog=pims;Provider=SQLNCLI11.1;Persist Security Info=True;Auto Translate=False;" /> @@ -97,7 +93,7 @@ + SQLTask:SqlStatementSource=" BEGIN TRANSACTION; delete from PIMS_PROPERTY_LEASE where LEASE_ID IN (SELECT LEASE_ID from PIMS_LEASE where APP_CREATE_USERID = 'APP_PIMS_PROXY_ETL_EDIT'); delete from PIMS_LEASE_PAYMENT where LEASE_TERM_ID in (select LEASE_TERM_ID from PIMS_LEASE_TERM where LEASE_ID in (select LEASE_ID from PIMS_LEASE where APP_CREATE_USERID = 'APP_PIMS_PROXY_ETL_EDIT')); delete from PIMS_LEASE_TERM where LEASE_ID in (select LEASE_ID from PIMS_LEASE where APP_CREATE_USERID = 'APP_PIMS_PROXY_ETL_EDIT'); delete from PIMS_LEASE_TENANT where LEASE_ID in (select LEASE_ID from PIMS_LEASE where APP_CREATE_USERID = 'APP_PIMS_PROXY_ETL_EDIT'); delete from PIMS_SECURITY_DEPOSIT_HOLDER where SECURITY_DEPOSIT_ID in (select SECURITY_DEPOSIT_ID FROM PIMS_SECURITY_DEPOSIT where LEASE_ID in (select LEASE_ID from PIMS_LEASE where APP_CREATE_USERID = 'APP_PIMS_PROXY_ETL_EDIT')); delete from PIMS_SECURITY_DEPOSIT_HOLDER where PERSON_ID in (select PERSON_ID from PIMS_PERSON where APP_CREATE_USERID = 'APP_PIMS_PROXY_ETL_EDIT'); delete from PIMS_SECURITY_DEPOSIT_RETURN_HOLDER where SECURITY_DEPOSIT_RETURN_ID in (select security_deposit_return_id from PIMS_SECURITY_DEPOSIT_RETURN where SECURITY_DEPOSIT_ID in (select SECURITY_DEPOSIT_ID FROM PIMS_SECURITY_DEPOSIT where LEASE_ID in (select LEASE_ID from PIMS_LEASE where APP_CREATE_USERID = 'APP_PIMS_PROXY_ETL_EDIT'))); delete from PIMS_SECURITY_DEPOSIT_RETURN where SECURITY_DEPOSIT_ID in (select SECURITY_DEPOSIT_ID FROM PIMS_SECURITY_DEPOSIT where LEASE_ID in (select LEASE_ID from PIMS_LEASE where APP_CREATE_USERID = 'APP_PIMS_PROXY_ETL_EDIT')); delete from PIMS_SECURITY_DEPOSIT where LEASE_ID in (select LEASE_ID from PIMS_LEASE where APP_CREATE_USERID = 'APP_PIMS_PROXY_ETL_EDIT'); delete from PIMS_PROPERTY_IMPROVEMENT where LEASE_ID in (select LEASE_ID from PIMS_LEASE where APP_CREATE_USERID = 'APP_PIMS_PROXY_ETL_EDIT'); delete from PIMS_INSURANCE where LEASE_ID in (select LEASE_ID from PIMS_LEASE where APP_CREATE_USERID = 'APP_PIMS_PROXY_ETL_EDIT'); delete from PIMS_LEASE where APP_CREATE_USERID = 'APP_PIMS_PROXY_ETL_EDIT'; ROLLBACK;" xmlns:SQLTask="www.microsoft.com/sqlserver/dts/tasks/sqltask" /> @@ -2050,6 +2046,7 @@ where [refTable].[FIRST_NAME] = ? description="OLE DB Destination" name="OLE DB Destination" usesDispositions="true" + validateExternalMetadata="False" version="4"> + startId="Package\Main Flow 1\LOAD LEASES\Lookup Purpose Code.Outputs[Lookup Match Output]" /> + startId="Package\Main Flow 1\LOAD LEASES\TFA_File_Number.Outputs[Lookup Match Output]" /> + startId="Package\Main Flow 1\LOAD LEASES\LEASE_CATEGORY_TYPE.Outputs[Lookup Match Output]" /> - + - + @@ -13149,30 +13146,30 @@ where [refTable].[PID] = ? TopLeft="647.428571428571,1791.57142857143" /> + TopLeft="1531,1149"> + End="-689,65.5"> + End="0,32.5" /> + Point1="0,32.5" + Point2="0,36.5" + Point3="-4,36.5" /> + End="-685,36.5" /> + Point1="-685,36.5" + Point2="-689,36.5" + Point3="-689,40.5" /> + End="-689,65.5" /> @@ -13183,30 +13180,18 @@ where [refTable].[PID] = ? + TopLeft="1356.25,1554"> + End="0,33.5"> - - - - + End="0,33.5" /> @@ -13217,18 +13202,30 @@ where [refTable].[PID] = ? + TopLeft="695,748"> + End="-198.5,49.5"> + End="0,24.5" /> + + + + @@ -13239,18 +13236,18 @@ where [refTable].[PID] = ? + TopLeft="482.25,523"> + End="0,81.5"> + End="0,81.5" /> @@ -13665,6 +13662,28 @@ where [refTable].[PID] = ? RelativePosition="Any" /> + + + + + + + + + + + + + + @@ -14145,28 +14164,6 @@ where [refTable].[PID] = ? RelativePosition="Any" /> - - - - - - - - - - - - - - diff --git a/etl/LISDB_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