diff --git a/api/src/main/java/marquez/service/models/ColumnLineageInputField.java b/api/src/main/java/marquez/service/models/ColumnLineageInputField.java index a74cc43700..ffee7546aa 100644 --- a/api/src/main/java/marquez/service/models/ColumnLineageInputField.java +++ b/api/src/main/java/marquez/service/models/ColumnLineageInputField.java @@ -19,6 +19,6 @@ public class ColumnLineageInputField { @NotNull private String namespace; @NotNull private String dataset; @NotNull private String field; - @NotNull private String transformationDescription; - @NotNull private String transformationType; + private String transformationDescription; + private String transformationType; } diff --git a/clients/java/src/main/java/marquez/client/models/ColumnLineageInputField.java b/clients/java/src/main/java/marquez/client/models/ColumnLineageInputField.java index ea2a87cefe..acfdf47589 100644 --- a/clients/java/src/main/java/marquez/client/models/ColumnLineageInputField.java +++ b/clients/java/src/main/java/marquez/client/models/ColumnLineageInputField.java @@ -19,6 +19,6 @@ public class ColumnLineageInputField { @NonNull private String namespace; @NonNull private String dataset; @NonNull private String field; - @NonNull String transformationDescription; - @NonNull String transformationType; + private String transformationDescription; + private String transformationType; } diff --git a/clients/java/src/test/java/marquez/client/models/ColumnLineageInputFieldTest.java b/clients/java/src/test/java/marquez/client/models/ColumnLineageInputFieldTest.java new file mode 100644 index 0000000000..d688265dd8 --- /dev/null +++ b/clients/java/src/test/java/marquez/client/models/ColumnLineageInputFieldTest.java @@ -0,0 +1,25 @@ +/* + * Copyright 2018-2023 contributors to the Marquez project + * SPDX-License-Identifier: Apache-2.0 + */ + +package marquez.client.models; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; + +import org.junit.jupiter.api.Test; + +@org.junit.jupiter.api.Tag("UnitTests") +public class ColumnLineageInputFieldTest { + @Test + void testToleratesNullTransformationTypeAndDescription() { + ColumnLineageInputField field = new ColumnLineageInputField("ns", "ds", "field", null, null); + + assertEquals("ns", field.getNamespace()); + assertEquals("ds", field.getDataset()); + assertEquals("field", field.getField()); + assertNull(field.getTransformationDescription()); + assertNull(field.getTransformationType()); + } +}