I am trying to use Oracle external tables to load flat files in a database but I have a problem The same is being done with the number of files we get with the location section, along with the date of the files, so I was hoping to use the wildcard in the location section but it does not seem that I am capable.
I think that I am right, I am unable to use wildcards, do anyone have any idea how can I do this without writing a large amount of code in the external table?
Current Thoughts:
The only way I can think of doing this at this time is to have a shell watch script and parameter table. The user can specify: input directory, file mask, external table etc. Then when a file is found in the directory, the shell script creates a list of files found with the file mask. For each file, an external table command was found to change the location in the external table given in that file and to launch the remaining PL / SQL associated with that file. It can be duplicated for file found with file mask. I think the advantage of this is that I can add logs and the expiry of bad files after every run.
I will post a solution that I did at the end that appears to be the only way.
I have a file viewer compared to appearing for files in the input diary given with a fixed file mask. I also include the name of the external table in the lookup table, I just added a new Continue to change a table with a list of table names.
This was not a lot of problem for me because I'm already using Shell to view most files File manipulation Hopefully it saves someone looking for a solution for a solution < / P>
No comments:
Post a Comment