You can translate the question and the replies:

Fail query if filenames do not exist in path

Hi is it possible to fail the query if the required files are not in the path? I tried this, but in the path it is nos possible to set regular expressions (anychar). PATH /path/PATTERNAME_^DateRange("yyyyMMdd",@startdate,@enddate,"yyyyMMdd")(.*) <<< fail FILENAME PATTERN (empty) Then I tried this: PATH /path/ FILENAME PATTERN PATTERNAME_^DateRange("yyyyMMdd",@startdate,@enddate,"yyyyMMdd")(.*) But the query to the base view will not fail. It only will produce an empty result.
user
13-01-2020 09:59:55 -0500

1 Answer

Hi, In order to create an exception when there is no file in the folder, you will need to create a Stored Procedure for accessing the files that throws an exception when no file is found. For more information about [Developing Stored Procedures]( https://community.denodo.com/docs/html/browse/latest/vdp/developer/developing_extensions/developing_stored_procedures/developing_stored_procedures), see the attached link. I recommend using the [FileSystem Custom Wrapper](https://community.denodo.com/docs/html/document/denodoconnects/7.0/Denodo%20FileSystem%20CustomWrapper%20-%20User%20Manual) (available on the Denodo Support Site with a support account) in the following solution: With the FileSystem wrapper, you can create a base view which takes a parent folder input and returns details of the files in the folder. If you create a base view for a delimited file source with a variable parameter for full file path, you can join the two views on the full file path. This will return all the data from the delimited sources along with information about the file it came from; if a file is blank, the file will still show up but no information will be displayed. This will not display an error, but will let you determine if the file exists or not. Hope this helps!
Denodo Team
14-01-2020 12:03:16 -0500
You must sign in to add an answer. If you do not have an account, you can register here