diff --git a/metadata-models/src/main/pegasus/com/linkedin/platformresource/PlatformResourceInfo.pdl b/metadata-models/src/main/pegasus/com/linkedin/platformresource/PlatformResourceInfo.pdl new file mode 100644 index 0000000000000..32dff19b44a53 --- /dev/null +++ b/metadata-models/src/main/pegasus/com/linkedin/platformresource/PlatformResourceInfo.pdl @@ -0,0 +1,57 @@ +namespace com.linkedin.platformresource + +import com.linkedin.common.SerializedValue + +/** + * Platform Resource Info. + * These entities are for miscelaneous data that is used in non-core parts of the system. + * For instance, if we want to persist & retrieve data from auxiliary integrations such as Slack or Microsoft Teams. + */ +@Aspect = { + "name": "platformResourceInfo" +} +record PlatformResourceInfo { + /** + * The type of the resource. + * Intended as a loose specifier of the generic type of the resource. + * Producer is not forced to conform to a specific set of symbols for + * resource types. + * The @PlatformResourceType enumeration offers a paved path for agreed upon + * common terms, but is not required to be followed. + * Example values could be: conversation, user, grant, etc. + * Resource types are indexed for ease of access. + * e.g. Get me all platform resources of type user for the platform looker + */ + @Searchable = { + "fieldType": "KEYWORD" + } + resourceType: string + + /** + * The primary key for this platform resource. + * e.g. for a slack member this would be the memberID. + * primary keys specified here don't need to include any additional specificity for the + dataPlatform + * The @PlatformResourceKey is supposed to represent that + */ + @Searchable = { + "fieldType": "KEYWORD" + } + primaryKey: string + + /** + * The secondary keys this platform resource can be located by. + * I.e., for a slack member this would be email or phone. + */ + @Searchable = { + "/*": { + "fieldType": "KEYWORD" + } + } + secondaryKeys: optional array[string] + + /** + * The serialized value of this platform resource item. + */ + value: optional SerializedValue +} \ No newline at end of file diff --git a/metadata-models/src/main/pegasus/com/linkedin/platformresource/PlatformResourceKey.pdl b/metadata-models/src/main/pegasus/com/linkedin/platformresource/PlatformResourceKey.pdl new file mode 100644 index 0000000000000..8514c73bc26eb --- /dev/null +++ b/metadata-models/src/main/pegasus/com/linkedin/platformresource/PlatformResourceKey.pdl @@ -0,0 +1,28 @@ +namespace com.linkedin.platformresource + +/** + * Key for a Platform Resource. + * Platform Resources are assets that are not part of the core data model. + * They are stored in DataHub primarily to help with application-specific + * use-cases that are not sufficiently generalized to move into the core data model. + * For instance, if we want to persist & retrieve additional user profile data + * from auxiliary integrations such as Slack or Microsoft Teams for resolving details later. + */ +@Aspect = { + "name": "platformResourceKey" +} +record PlatformResourceKey { + /** + * A unique id for this entity. + * There are no constraints on the format of this id, but most implementations + * will choose to use a UUID. + * This id should be globally unique for the entire DataHub instance and + uniquely identify the resource that is being stored, so most + implementations + * will combine logical attributes like platform name, platform instance, + * platform-specific-id and the resource type to create the unique id. + * e.g. slack:slack-instance:slack-user-id:user-info + * or guid(slack, slack-instance, slack-user-id, user-info) etc. + */ + id: string +} \ No newline at end of file diff --git a/metadata-models/src/main/pegasus/com/linkedin/platformresource/PlatformResourceType.pdl b/metadata-models/src/main/pegasus/com/linkedin/platformresource/PlatformResourceType.pdl new file mode 100644 index 0000000000000..8a3736e8b6793 --- /dev/null +++ b/metadata-models/src/main/pegasus/com/linkedin/platformresource/PlatformResourceType.pdl @@ -0,0 +1,11 @@ + +enum PlatformResourceType { + /** + * e.g. a Slack member resource, Looker user resource, etc. + */ + USER_INFO, + /** + * I.e. a Slack channel + */ + CONVERSATION +} \ No newline at end of file diff --git a/metadata-models/src/main/resources/entity-registry.yml b/metadata-models/src/main/resources/entity-registry.yml index 7beb08a6b1032..9b692b51dc2b5 100644 --- a/metadata-models/src/main/resources/entity-registry.yml +++ b/metadata-models/src/main/resources/entity-registry.yml @@ -615,6 +615,17 @@ entities: aspects: - dataHubConnectionDetails - dataPlatformInstance + - name: platformResource + doc: >- + Platform Resources are assets that are unmodeled and stored outside of + the core data model. They are stored in DataHub primarily to help with + application-specific use-cases that are not sufficiently generalized to move into the core data model. + category: core + keyAspect: platformResourceKey + aspects: + - dataPlatformInstance + - platformResourceInfo + - status events: plugins: aspectPayloadValidators: