Skip to content
+1-888-319-3663

COMMUNITY FORUM

FOLDER SOURCE – IMPORT IWTHOUT SORTING DATA

Patty Stepp asked 12 months ago
The data I want to import is not normalized and I want to import it as is into a SQL table.  SmartConnect is sorting the data.  I want it to come in sequentially as it is in the text file.  Is there a way to do that?  I need to assign line numbers as it comes in.  If it is sorted, I cannot do that.
H|WG_PO_001|ZF4|0040000753|10/06/2020|AVIGILON VENDOR|AVIGILON Vendor|3141.60|USD|test_0000001
I|WG_PO_001|0040000753|WG_MATNR_1|2.000|320-0107B||||
S|WG_PO_001|0040000753|WG_MATNR_1|000000101709029182|||||
S|WG_PO_001|0040000753|WG_MATNR_1|000000101709029183|||||
H|WG_PO_1|ZF4|0040000754|10/06/2020|AVIGILON VENDOR|AVIGILON Vendor|1570.80|USD|test_0000003
I|WG_PO_1|0040000754|WG_MATNR_1|1.000|320-0107B||||
S|WG_PO_1|0040000754|WG_MATNR_1|000000101709029184|||||
H|WG_PO_002|ZF4|0040000763|10/21/2020|AVIGILON VENDOR|AVIGILON Vendor|9764.00|USD|CMORD0026633
I|WG_PO_002|0040000763|WG_MATNR_2|4.000|320-0107B||||
S|WG_PO_002|0040000763|WG_MATNR_2|000000101709029194|||||
S|WG_PO_002|0040000763|WG_MATNR_2|000000101709029195|||||
S|WG_PO_002|0040000763|WG_MATNR_2|000000101709029196|||||
S|WG_PO_002|0040000763|WG_MATNR_2|000000101709029197|||||
Answers
Patrick Roth Staff answered 11 months ago
SmartConnect always sorts by the Key Fields selected for the source.
 
So if you picked the 2nd column as the Key Field, it WOULD sort by that and so the “groups” would be sorted by that value.  But I’ve not really seen where the individual lines then get resorted at all within that group.  SC would just read them top-down from there.
 
But if you say, “no, I can’t have ANY lines come in a different order than what the source file is”, then you would need to add something like a Sequence value to the source file.
 
Then you would sequence it like 1,2,3,4 and would have individual lines – that is assuming your output has individual lines.  That might not work so well depending.
 
https://www.eonesolutions.com/tech-tuesday-source-file-name-from-folder-data-source/
 
In the blog above, I read the files and add a new column for the file name.  In your case, you would do the same.  But instead of the file name, you would have a sequence value and then just put them as 1,2,3,4 etc

If you would like to submit an answer or comment, please sign in to the eOne portal.