Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
warfollowmy_ver
Creator III
Creator III

Script. Bug. Delete a non-existing field from the table.

Hello!

I'm trying to remove a field that does not exist from the table, but the script does not report an error. Why?

Labels (4)
1 Solution

Accepted Solutions
Brett_Bleess
Former Employee
Former Employee

I believe Rob is on the right track on this one, as I see the same behavior in 12.30 SR1 release, and I have checked defect system as well as Help, and there is nothing definitive stating that it will throw an error in this case.  I can see the error being thrown when the field does not exist as Rob mentioned, as that is definitely an error, but in your sample, the field does exist, you are just asking that it be dropped from a table to which it does not belong, which to be honest I would expect should likely throw a Field not found message, but I get nothing when running things.  If you have not submitted this to Support via a case, I would recommend doing so, in order that we officially open up a bug investigation with R&D to confirm proper behavior on this.  

Thanks for the thoughts on this Rob, I am pretty sure you are likely dead on with your theory here, but it is odd behavior for sure.

Ok, I followed up with Jeff Koch, one of our OEM guys and asked him about things, and he agreed completely with Rob's explanation, things are working as expected here, as the Field and Table exist, and you do not want the field in the table, which it is not, so the script does not throw an error, as the condition you requested is met.  Given this, I would not submit the case at this point, as I would fully expect R&D to say the same thing here, but hopefully this additional information will make you feel a little more comfortable about the rationale.  I did not get fully until Jeff walked me through things as well, but it makes sense now that this is how we would really want it to behave.  The key factor is the result of your request is correct, the field is not in the table you specified, so that is why it does not error in this case, whereas if you specify something that does not exist, it does error.  

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.

View solution in original post

4 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I think it's working as designed. You could read 

Drop Field X From Table Y

as 

Drop Field X From Table Y if X exists in Table Y

As long both X and Y are valid identifiers, there is no error.

On the other hand, 

Drop Field Z from Table Y

throws an error if Z is not an existing field or Y is not an existing table. 

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

warfollowmy_ver
Creator III
Creator III
Author

That is, in both cases there is no deleted field in the table, but in one case an error is generated, but not in the other.
I think this is a program error.
Brett_Bleess
Former Employee
Former Employee

I believe Rob is on the right track on this one, as I see the same behavior in 12.30 SR1 release, and I have checked defect system as well as Help, and there is nothing definitive stating that it will throw an error in this case.  I can see the error being thrown when the field does not exist as Rob mentioned, as that is definitely an error, but in your sample, the field does exist, you are just asking that it be dropped from a table to which it does not belong, which to be honest I would expect should likely throw a Field not found message, but I get nothing when running things.  If you have not submitted this to Support via a case, I would recommend doing so, in order that we officially open up a bug investigation with R&D to confirm proper behavior on this.  

Thanks for the thoughts on this Rob, I am pretty sure you are likely dead on with your theory here, but it is odd behavior for sure.

Ok, I followed up with Jeff Koch, one of our OEM guys and asked him about things, and he agreed completely with Rob's explanation, things are working as expected here, as the Field and Table exist, and you do not want the field in the table, which it is not, so the script does not throw an error, as the condition you requested is met.  Given this, I would not submit the case at this point, as I would fully expect R&D to say the same thing here, but hopefully this additional information will make you feel a little more comfortable about the rationale.  I did not get fully until Jeff walked me through things as well, but it makes sense now that this is how we would really want it to behave.  The key factor is the result of your request is correct, the field is not in the table you specified, so that is why it does not error in this case, whereas if you specify something that does not exist, it does error.  

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
warfollowmy_ver
Creator III
Creator III
Author

You know better. I think that this is strange at least and illogical ...