I am also facing this problem. My boot command:
DATA = LOAD '${qurwf_folder_input}/data/*/' AS (...);
I want to download all files from data subfolders, but the data folder is empty, and I got the same error as you. In my specific case, I created an empty folder in the data directory. Therefore, LOAD returns an empty data set, and the script will not work.
By the way, I use the Oozie workflow to run scripts, and during the preparation process I create empty folders.
source share