mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-31 12:39:01 +00:00
MINOR: Add UDF support for SP - backend (#18767)
This commit is contained in:
parent
4b9e214078
commit
40a70357e8
@ -138,6 +138,12 @@ public class StoredProcedureRepository extends EntityRepository<StoredProcedure>
|
||||
original.getStoredProcedureCode(),
|
||||
updated.getStoredProcedureCode());
|
||||
}
|
||||
if (updated.getStoredProcedureType() != null) {
|
||||
recordChange(
|
||||
"storedProcedureType",
|
||||
original.getStoredProcedureType(),
|
||||
updated.getStoredProcedureType());
|
||||
}
|
||||
recordChange("sourceUrl", original.getSourceUrl(), updated.getSourceUrl());
|
||||
recordChange("sourceHash", original.getSourceHash(), updated.getSourceHash());
|
||||
}
|
||||
|
@ -533,6 +533,7 @@ public class StoredProcedureResource
|
||||
.copy(new StoredProcedure(), create, user)
|
||||
.withDatabaseSchema(getEntityReference(Entity.DATABASE_SCHEMA, create.getDatabaseSchema()))
|
||||
.withStoredProcedureCode(create.getStoredProcedureCode())
|
||||
.withStoredProcedureType(create.getStoredProcedureType())
|
||||
.withSourceUrl(create.getSourceUrl())
|
||||
.withSourceHash(create.getSourceHash());
|
||||
}
|
||||
|
@ -38,6 +38,10 @@
|
||||
"description": "SQL Query definition.",
|
||||
"$ref": "../../entity/data/storedProcedure.json#/definitions/storedProcedureCode"
|
||||
},
|
||||
"storedProcedureType": {
|
||||
"description": "Type of the Stored Procedure.",
|
||||
"$ref": "../../entity/data/storedProcedure.json#/definitions/storedProcedureType"
|
||||
},
|
||||
"databaseSchema": {
|
||||
"description": "Link to the database schema fully qualified name where this stored procedure is hosted in",
|
||||
"$ref": "../../type/basic.json#/definitions/fullyQualifiedEntityName"
|
||||
|
@ -8,6 +8,24 @@
|
||||
"javaType": "org.openmetadata.schema.entity.data.StoredProcedure",
|
||||
"javaInterfaces": ["org.openmetadata.schema.EntityInterface"],
|
||||
"definitions": {
|
||||
"storedProcedureType": {
|
||||
"javaType": "org.openmetadata.schema.type.StoredProcedureType",
|
||||
"description": "This schema defines the type of the type of Procedures",
|
||||
"type": "string",
|
||||
"default": "StoredProcedure",
|
||||
"enum": [
|
||||
"StoredProcedure",
|
||||
"UDF"
|
||||
],
|
||||
"javaEnums": [
|
||||
{
|
||||
"name": "StoredProcedure"
|
||||
},
|
||||
{
|
||||
"name": "UDF"
|
||||
}
|
||||
]
|
||||
},
|
||||
"storedProcedureCode": {
|
||||
"properties": {
|
||||
"language": {
|
||||
@ -84,6 +102,11 @@
|
||||
"description": "Last update time corresponding to the new version of the entity in Unix epoch time milliseconds.",
|
||||
"$ref": "../../type/basic.json#/definitions/timestamp"
|
||||
},
|
||||
"storedProcedureType": {
|
||||
"description": "Type of the Stored Procedure.",
|
||||
"$ref": "#/definitions/storedProcedureType",
|
||||
"default": "StoredProcedure"
|
||||
},
|
||||
"updatedBy": {
|
||||
"description": "User who made the query.",
|
||||
"type": "string"
|
||||
@ -168,6 +191,10 @@
|
||||
"maxLength": 32
|
||||
}
|
||||
},
|
||||
"required": ["id","name","storedProcedureCode"],
|
||||
"required": [
|
||||
"id",
|
||||
"name",
|
||||
"storedProcedureCode"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user