โ06-30-2021 12:37 PM
I have a pipeline that creates files based upon 490 records in an Oracle table. I create the output by doing a select on static headings that I create and union it with actual records from the table and then I sftp the file. I wanted to also be able to email the file, so snapLogic support suggested adding a Copy snap and sending one to sftp and the other to email, so I added a Copy snap right after the Oracle Execute snap that then went to a CSV Formatter snap and then to a File Writer snap to sftp. The copy also went to a CSV Formatter and then a File Writer to create a file in my directory and finally an email snap to send the file. All of this worked EXCEPT that the listing I received was 491 records (which included a header) TIMES 490!!! For whatever reason, it repeated the copy 490 times!!! Any ideas as to why???
โ07-01-2021 05:43 AM
Connect_Ed_DEVL_2021_07_01.slp (64.9 KB)
โ07-01-2021 05:41 AM
I agree - the copy SHOULD do no more than just that (but maybe itโs doing more???)!!!
Iโm rather a newbie at this, so what is the slp file and how do I access/send it???
โ07-01-2021 05:53 AM
@clarrivey - Iโm assuming that the Oracle Insert is receiving multiple records. Further, if you look in the Dashboard, I would guess that you will see the Oracle - Execute Update SWEADTE snap is executing 490 times, and the Oracle - Execute3 is executing 490 times as well, pushing a great deal more data to the Copy and remaining downstream snaps than you are expecting.
My recommendation is that you either:
โ07-01-2021 06:25 AM
Kory,
Here is the sql for the Oracle - Execute3:
select โReferenceCodeโ||chr(09)||โFirstNameโ||chr(09)||โLastNameโ||chr(09)||โStatusโ||chr(09)||โGenderโ||chr(09)||โRefreshGroupโ||chr(09)||โContactTypeโ||chr(09)||โHomePhoneโ||chr(09)||โPrimaryPhoneโ||chr(09)||โTTYPhoneโ||chr(09)||โEmailAddressโ||chr(09)||โEmailAddressAltโ||chr(09)||โSMSPhoneโ||chr(09)||โInstitutionโ
from sys.dual
union
select
rtrim(id)||chr(09)||
rtrim(fname)||chr(09)||
rtrim(lname)||chr(09)||
rtrim(ecls_code)||chr(09)||
rtrim(gender)||chr(09)||
rtrim(dept)||chr(09)||
rtrim(contact_type)||chr(09)||
rtrim(hr_phone)||chr(09)||
rtrim(primary_phone)||chr(09)||
rtrim(tty_phone)||chr(09)||
rtrim(ca_email)||chr(09)||
rtrim(primary_email)||chr(09)||
rtrim(sms_phone)||chr(09)||
โWHEATON COLLEGEโ
from sweadte
When I run it in sql (via TOAD), I get 491 output records. THAT is what I would expect to be in my Copy! I understand that Oracle - Execute Update SWEADTE snap is updating 490 records, but I donโt really understand what you mean that they are โpushing a great deal more data to the Copyโฆโ? Please forgive my ignorance, but I thought the snaps executed in order (i.e. 2nd one didnโt run until 1st one was complete). It doesnโt make any sense to me to split the pipeline - it SHOULD be able to handle it! And Iโm also not sure I fully understand the significance of a Tail snap, so I will have to look that up in the documentation.
โ07-01-2021 06:29 AM
One other quick question: in the View(s), you have things like input0 and output0. Can these stay the same throughout the pipeline, or do they need to be updated?