I figure that Disable query is misleading. It's different then skipping, as it doesn't run anymore once disabled and re-enabled after.
Use case:
- I have a insert bulk query to BigQuery that runs every 30s. * Source is a temp state
- If the state value is not an object, skip this run
So I entered this in Disable query condition:
{{ typeof newActions.value !== 'object' }}. Problem is that even if this evaluated to true and to false lter (something to insert), the loop has stopped.
Once disabled, you must re-run it.
Is that by design ?
Note, there is no good workaround i.e. if I change array of records to insert to {{ (typeof newActions.value === 'object') ? Object.values(newActions.value) : [] }}, retool engine still calls the resource if nothing to insert as I see an empty BEGIN/COMMIT in bigquery's logs. That's a bug to me.
On the latter, bulk insert query - maybe others too - is very picky: if I pass [], it calls but doesn't error out. If I pass null, it doesn't error out and the query runs forever (elapsed time endless). Only way out is to refresh the app/page. Why can it just skip or raise error ?