Sub-Pipeline : GetUnzipFile

Review the GetUnzipFile sub-pipeline when scheduling inventory imports.

  1. Script (bc_api). Call Get Unzip.ds . This script unzips a file.
VariableTypeComment
@input ZIPFileNameStringThe file name of the .zip file
@input SourceDirectorydw.io.FileThe processing directory where the file is located
@input importLoggerObjectimport logger
@output UnzipDirectorydw.io.FileThe unzip directory where the extracted import file is located
@output ZIPFiledw.io.FileThe .zip file
@output importLoggerObjectimport logger
@output importErrorObjectimport error
  1. Script (bc_api). Calls [GetFilesFromDirectory.ds](b2c-get-files-from-directory-ds.md) . This script retrieves a file list from an FTP/HTTP(S) server.

    VariableTypeComment
    @input Directorydw.io.Filethe directory to browse
    @input SortDirectionString'ASCENDING' or 'DESCENDING'
    @input NamePatternStringThe pattern for the filenames (use ".*" to get all)
    @input importLoggerObject import loggerinput for import logger
    @output FileListdw.util CollectionThe files matching the pattern
    @output importLoggerObject import loggerdebug output for import logger
    @output importErrorObject import errorerror output for import logger
  2. Loop : UpzipFiles[]

  3. Pipelet : Script (bc_api). Calls [RenameFile.ds](b2c-rename-file-ds.md) .

  4. Pipelet : Eval (bc_api). Delete the original Import .zip file with ZipFile.remove() .

  5. Pipelet: Assign (bc_api). Set the following value.

    ImportFile = UnzipFile.name

  6. Loop to UnzipFiles[] until all files are processed.

  7. Pipelet : Eval (bc_api). Delete the original Import .zip file direcctory with UnzipDirectory.remove() .

  8. Continue after calling node.