I'm having a table "Sample" with 3 columns COL1, COL2, COL3 and a flat file with below contents
1¦2¦3
1¦2¦3¦4
When I tried to load data from flat file to table, the data is loaded as below
Flat file
|
Actual
|
Expected
|
Values inserted in table |
||
COL |
COL |
COL |
|||
1|2|3 |
pass |
pass |
1 |
2 |
3 |
1|2|3|4 |
pass |
fail |
1 |
2 |
3 |4 |
But the package should fail, if it gets the values for more than 3 columns. To resolve this I used text qualifier “in flat file. But still I’m facing some issues when the text qualifier is missing.
Flat file
|
Actual
|
Expected
|
Values inserted in table |
||
COL |
COL |
COL |
|||
"1"|"2"|"3" |
pass |
pass |
1 |
2 |
3 |
"1"|"2"|"3"|"4" |
fail |
fail |
no row inserted |
||
"1"|"2"|3" |
pass |
fail |
1 |
2 |
3" |
"1"|"2"|"3 |
fail |
fail |
no row inserted |
How to resolve this issue?