
io.kestra.plugin.gcp.LoadCsvValidator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of plugin-gcp Show documentation
Show all versions of plugin-gcp Show documentation
Integrate Google Cloud Platform services with Kestra data workflows.
package io.kestra.plugin.gcp;
import io.kestra.plugin.gcp.bigquery.AbstractLoad;
import io.kestra.plugin.gcp.bigquery.LoadCsvValidation;
import jakarta.validation.ConstraintValidator;
import jakarta.validation.ConstraintValidatorContext;
public class LoadCsvValidator implements ConstraintValidator {
@Override
public boolean isValid(AbstractLoad value, ConstraintValidatorContext context) {
if (value == null) {
return true; // nulls are allowed according to spec
}
if (value.getFormat() == AbstractLoad.Format.CSV && value.getCsvOptions() == null) {
return false;
}
return true;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy