Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import java.util.List;
import org.openmetadata.schema.services.connections.pipeline.MatillionConnection;
import org.openmetadata.schema.services.connections.pipeline.matillion.MatillionDPCAuth;
import org.openmetadata.schema.services.connections.pipeline.matillion.MatillionETLAuth;
import org.openmetadata.schema.utils.JsonUtils;

Expand All @@ -30,7 +31,9 @@ public Object convert(Object object) {
MatillionConnection matillionConnection =
(MatillionConnection) JsonUtils.convertValue(object, this.clazz);

tryToConvertOrFail(matillionConnection.getConnection(), List.of(MatillionETLAuth.class))
tryToConvertOrFail(
matillionConnection.getConnection(),
List.of(MatillionETLAuth.class, MatillionDPCAuth.class))
Comment on lines +35 to +36
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The indentation in this multi-line tryToConvertOrFail(...) call doesn’t match the project’s standard Java formatting (and is likely to be rewritten by Spotless / google-java-format). Please reformat this block (e.g., by running mvn spotless:apply) so the continuation indentation is consistent and CI formatting checks don’t fail.

Suggested change
matillionConnection.getConnection(),
List.of(MatillionETLAuth.class, MatillionDPCAuth.class))
matillionConnection.getConnection(),
List.of(MatillionETLAuth.class, MatillionDPCAuth.class))

Copilot uses AI. Check for mistakes.
.ifPresent(matillionConnection::setConnection);

return matillionConnection;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"$id": "https://open-metadata.org/schema/entity/services/connections/pipeline/matillion/matillionDPC.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Matillion DPC Auth Config",
"description": "Matillion Data Productivity Cloud Auth Config.",
"javaType": "org.openmetadata.schema.services.connections.pipeline.matillion.MatillionDPCAuth",
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"MatillionDPC"
],
"default": "MatillionDPC"
},
"clientId": {
"title": "Client ID",
"description": "OAuth2 Client ID for Matillion DPC authentication.",
"type": "string"
},
"clientSecret": {
"title": "Client Secret",
"description": "OAuth2 Client Secret for Matillion DPC authentication.",
"type": "string",
"format": "password"
},
"region": {
"title": "Region",
"description": "Matillion DPC region. Determines the API base URL.",
"type": "string",
"enum": [
"us1",
"eu1"
],
"default": "us1"
},
"personalAccessToken": {
"title": "Personal Access Token",
"description": "Personal Access Token for Matillion DPC. Alternative to OAuth2 Client Credentials.",
"type": "string",
"format": "password"
}
},
"required": [],
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MatillionDPC auth config currently has an empty required list, which means an empty object (or one with only region) can pass schema validation. This will allow invalid connections to be saved and then fail later at runtime. Consider enforcing that either personalAccessToken is provided, or both clientId and clientSecret are provided (and ideally disallow providing both auth methods at once).

Suggested change
"required": [],
"required": [],
"anyOf": [
{
"required": [
"personalAccessToken"
]
},
{
"required": [
"clientId",
"clientSecret"
]
}
],

Copilot uses AI. Check for mistakes.
"additionalProperties": false
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
"oneOf": [
{
"$ref": "matillion/matillionETL.json"
},
{
"$ref": "matillion/matillionDPC.json"
}
]
},
Expand All @@ -36,10 +39,18 @@
"$ref": "../../../../type/filterPattern.json#/definitions/filterPattern",
"title": "Default Pipeline Filter Pattern"
},
"lineageLookbackDays": {
"title": "Lineage Lookback Days",
"description": "Number of days to look back when fetching lineage events from Matillion DPC OpenLineage API.",
"type": "integer",
"default": 30,
"minimum": 1,
"maximum": 365
},
Comment on lines 28 to +49
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New schema fields (MatillionDPC auth option and lineageLookbackDays) aren’t covered by the existing configuration parsing tests for Matillion. Adding a unit test that parses a valid DPC config (PAT and/or client credentials) and asserts validation failures for missing credentials / out-of-range lineageLookbackDays would prevent regressions in schema-to-model generation and validation behavior.

Copilot uses AI. Check for mistakes.
Comment on lines +42 to +49
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Quality: lineageLookbackDays is DPC-specific but on shared connection

The lineageLookbackDays property is placed at the top-level matillionConnection.json schema, meaning it will be visible for both ETL and DPC connection types. However, its description explicitly says it's for the "Matillion DPC OpenLineage API." If ETL connections don't use lineage lookback, this could confuse users configuring an ETL connection. Consider either:

  1. Moving it inside the matillionDPC.json schema, or
  2. Updating the description to be generic if it applies to both types.

Suggested fix:

Either move lineageLookbackDays into matillionDPC.json, or update the description to not mention DPC specifically if it applies to both connection types.

Was this helpful? React with 👍 / 👎 | Reply gitar fix to apply this suggestion

"supportsMetadataExtraction": {
"title": "Supports Metadata Extraction",
"$ref": "../connectionBasicType.json#/definitions/supportsMetadataExtraction"
}
},
"additionalProperties": false
}
}
Loading