There is a division at one my clients that is requiring an export from a source system which looks like this the following:
Code: Select all
"Name","Project_Activity_Alias"
"PFP-C0000200","Compound Support 00013 AD-4833 MET - AD-4833 MET Support - CVM"
"PFP-C0078100","AD-4833MET Analytical Method Dev. & Valid. - AD-4833 MET Support - CVM"
"PFP-C0078200","Compound Support 00015 AD-4833 SU - AD-4833 SU Support - CVM"
"PFP-A0002100","Compound Support 00012 AD-4833 - AD-4833 T2D"
"PFP-A0022800","Reg Filing 00012 AD-4833 00050 Type 2 diabetes - AD-4833 T2D"
"PFP-A0043500","Epidemiology Study (AD-4833) - AD-4833 T2D"
"PFP-A0043900","Observational (EU) (AD-4833) - AD-4833 T2D"
"PFP-A0146300","Kaiser EMEA (AD-4833) T2D - AD-4833 T2D"
After we give them the FIRST export, going forward, they ONLY want a file that consists of any new lines, as well as any changes made to the Project_Activity_Alias.
So what I am thinking is the following:
I have ability to add an additional column to the above export called "Last Changed On". Then, each month when they request a new file, Id export from my source system. It would look like such:
Code: Select all
"Name","Project_Activity_Alias","Last Changed On"
"PFP-C0000200","Compound Support 00013 AD-4833 MET - AD-4833 MET Support - CVM","5/5/2016 3:04:50 PM"
"PFP-C0078100","AD-4833MET Analytical Method Dev. & Valid. - AD-4833 MET Support - CVM","10/21/2015 5:08:27 PM"
"PFP-C0078200","Compound Support 00015 AD-4833 SU - AD-4833 SU Support - CVM","10/21/2015 5:08:27 PM"
"PFP-A0002100","Compound Support 00012 AD-4833 - AD-4833 T2D","10/21/2015 5:08:27 PM"
"PFP-A0022800","Reg Filing 00012 AD-4833 00050 Type 2 diabetes - AD-4833 T2D","10/21/2015 5:08:27 PM"
"PFP-A0043500","Epidemiology Study (AD-4833) - AD-4833 T2D","10/21/2015 5:08:28 PM"
"PFP-A0043900","Observational (EU) (AD-4833) - AD-4833 T2D","10/21/2015 5:08:28 PM"
"PFP-A0146300","Kaiser EMEA (AD-4833) T2D - AD-4833 T2D","10/21/2015 5:08:28 PM"
What needs to happen first is cycle through the original export and compare to the most recent export, writing net new lines to a file. Then, second pass, it needs to compare the lines that exist in BOTH files and then check the Last Changed On date. If the Last Changed On Date in the most recent export is newer than the Last Changed On date in the original export , spool that entire line to the new file.
So, let's assume this is the new export file:
Code: Select all
"Name","Project_Activity_Alias","Last Changed On"
"PFP-C0000200","Compound Support 00013 AD-4833 MET - AD-4833 MET Support - CVM","9/29/2016 3:04:50 PM"
"PFP-C0078100","AD-4833MET Analytical Method Dev. & Valid. - AD-4833 MET Support - CVM","10/21/2015 5:08:27 PM"
"PFP-C0078200","Compound Support 00015 AD-4833 SU - AD-4833 SU Support - CVM","10/21/2015 5:08:27 PM"
"PFP-A0002100","Compound Support 00012 AD-4833 - AD-4833 T2D","10/21/2015 5:08:27 PM"
"PFP-A0022800","Reg Filing 00012 AD-4833 00050 Type 2 diabetes - AD-4833 T2D","10/21/2015 5:08:27 PM"
"PFP-A0043500","Epidemiology Study (AD-4833) - AD-4833 T2D","10/21/2015 5:08:28 PM"
"PFP-A0043900","Observational (EU) (AD-4833) - AD-4833 T2D","10/21/2015 5:08:28 PM"
"PFP-A0146300","Kaiser EMEA (AD-4833) T2D - AD-4833 T2D","9/29/2016 5:08:28 PM"
"PFP-A0189400","Project Management Activity (AD-4833) T2D - AD-4833 T2D","10/21/2015 5:08:28 PM"
"PFP-A1040400","Project Management Activity (TAK-331) IBD (Inflammatory Bowel Disease) - TAK-331 - IBD (Inflammatory Bowel Disease)","4/19/2016 2:13:55 PM"
"PFP-A1043400","P1 SRD Study (TAK-331) - TAK-331 - IBD (Inflammatory Bowel Disease)","9/19/2016 7:47:05 PM"
"PFP-C1019800","CTM Mfg. (TAK-331) - TAK-331 - IBD (Inflammatory Bowel Disease)","7/20/2016 5:00:07 PM"
"PFP-C1023400","Compound Support TAK-331 - TAK-331 - IBD (Inflammatory Bowel Disease)","4/19/2016 2:13:49 PM"
"PFP-C1023500","Analytical Method Dev. & Valid (TAK-331) - TAK-331 - IBD (Inflammatory Bowel Disease)","4/20/2016 1:12:16 PM"
"PFP-C1023700","Process/Formulation Dev (TAK-331) - TAK-331 - IBD (Inflammatory Bowel Disease)","4/20/2016 1:12:17 PM"
"PFP-C1023800","Stability Expense (TAK-331) - TAK-331 - IBD (Inflammatory Bowel Disease)","4/20/2016 1:12:17 PM"
"PFP-C1023900","Tech Transfer (TAK-331) - TAK-331 - IBD (Inflammatory Bowel Disease)","4/20/2016 1:12:17 PM"
"PFP-A1043700","Project Management Activity (Curosurf) Multiple cancer - TAK-164 Multiple Cancer","5/23/2016 1:57:38 PM"
"PFP-A1043800","CXXXXX Ph1 Dose Esc/Exp (TAK-164) - TAK-164 Multiple Cancer","5/26/2016 7:56:16 PM"
"PFP-A1043900","CXXXXX Human ADME (TAK-164) - TAK-164 Multiple Cancer","5/26/2016 7:56:16 PM"
As you can see, there are news lines as well as newer Last Changed On dates from the original export.
Therefore, the file I'd essentially send would look like the following:
Code: Select all
"PFP-C0000200","Compound Support 00013 AD-4833 MET - AD-4833 MET Support - CVM"
"PFP-A0146300","Kaiser EMEA (AD-4833) T2D - AD-4833 T2D"
"PFP-A0189400","Project Management Activity (AD-4833) T2D - AD-4833 T2D"
"PFP-A1040400","Project Management Activity (TAK-331) IBD (Inflammatory Bowel Disease) - TAK-331 - IBD (Inflammatory Bowel Disease)"
"PFP-A1043400","P1 SRD Study (TAK-331) - TAK-331 - IBD (Inflammatory Bowel Disease)"
"PFP-C1019800","CTM Mfg. (TAK-331) - TAK-331 - IBD (Inflammatory Bowel Disease)"
"PFP-C1023400","Compound Support TAK-331 - TAK-331 - IBD (Inflammatory Bowel Disease)"
"PFP-C1023500","Analytical Method Dev. & Valid (TAK-331) - TAK-331 - IBD (Inflammatory Bowel Disease)"
"PFP-C1023700","Process/Formulation Dev (TAK-331) - TAK-331 - IBD (Inflammatory Bowel Disease)"
"PFP-C1023800","Stability Expense (TAK-331) - TAK-331 - IBD (Inflammatory Bowel Disease)"
"PFP-C1023900","Tech Transfer (TAK-331) - TAK-331 - IBD (Inflammatory Bowel Disease)"
"PFP-A1043700","Project Management Activity (Curosurf) Multiple cancer - TAK-164 Multiple Cancer"
"PFP-A1043800","CXXXXX Ph1 Dose Esc/Exp (TAK-164) - TAK-164 Multiple Cancer"
"PFP-A0146300","Kaiser EMEA (AD-4833) T2D - AD-4833 T2D"
I'm hoping this is easily attainable.
Thanks!