I’m having a problem using a copy command with the exceptions and rejected data clause. When I run this type of query:
Copy myTable From '/myDirectory/source*' On Any Node
Rejected Data '/rejects_directory/' On node_1, '/rejects_directory/' on node_2
Exceptions '/exceptions_directory/' On node_1, '/exceptions_directory/' on node_2
I get:
Error 2016: Copy: Could not open rejected data file for writing: Is a directory
If I change the query to specify a rejection and exception file like so:
Copy myTable From '/myDirectory/source*' On Any Node
Rejected Data '/rejects_directory/rejects.txt' On node_1, '/rejects_directory/rejects.txt' on node_2
Exceptions '/exceptions_directory/exceptions.txt' On node_1, '/exceptions_directory/exceptions.txt' on node_2
I get:
Error 2016: Copy: Could not open rejected data file for writing: Is not a directory
Are you kidding me? I specified a directory in the first query! If I just comment out the rejected data and exceptions lines, the query works fine, but then I’m stuck searching through each node of my cluster for my reject files. What makes this even stranger is that the table and source directory are passed through as parameter values in a shell script and the query works fine in most cases, but throws the error in others. Any ideas why this is happening? Additional info, I'm using version 6.1.3. The rejected and exception directories are a common mount point on each node. Each source file being loaded has a unique name, therefore the reject files will have a unique name.
Sign up
Already have an account? Login
Welcome to the Rocket Forum!
Please log in or register:
Employee Login | Registration Member Login | RegistrationEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.