Forum Discussion

kkishore's avatar
kkishore
New Contributor III
4 years ago
Solved

Zip file write snap creating zip file with source folder structure , how to avoid file structure

Hi Team, I am just reading the file from source location and writing the zip file in sldb, but it is creating the zip file with source structure when i unzip. source file path is : /home/data/int...
  • Aleksandar_A's avatar
    12 months ago

    Hello arvindnsn,

    You can filter the array that comes out from the Gate Snap using the following expression:

    $input0.filter(x => x.hasPath("Name")).length > 0

    Based on the result of this, if no element has Name field it will return false, otherwise it will return true.

    Attached below is a sample pipeline that you can review.

    Please let me know if this helps you.

    Regards,

    Aleksandar.