protected in config is always true
Hello,
Setting "protected: false" is ignored, and it consistently behaves as if it were true.
Thanks for filing this issue.
Just to be clear - it looks like protected: false is only ignored in the part of the framework which performs config block validation (https://github.com/dataform-co/dataform/blob/main/core/session.ts#L142).
Obviously the trivial workaround is to simply remove the line - because this is the default.
However, we should definitely fix this! We should probably just replace sqlxConfig.hasOwnProperty("protected") with sqlxConfig.protected.
Hello, thank you for your reply. I understand that it's initially set to false by default. However, for my specific scenario, I need to dynamically set it using JavaScript.
Okay, makes sense. In that case I would either:
- Not use SQLX (and thus avoid this check), i.e. use JavaScript entirely
- Send us a PR to do the suggestion above (I'd be happy to then immediately publish that change in a new
@dataform/coreversion)