From 8ccb0f123448f8e720a2d66a536f5f3a11ae849f Mon Sep 17 00:00:00 2001 From: Stewart Jingga Date: Mon, 8 Nov 2021 19:08:04 +0700 Subject: [PATCH 1/2] feat(assets): move description to Resource --- odpf/assets/bucket.proto | 11 +++-------- odpf/assets/common/resource.proto | 4 ++++ odpf/assets/dashboard.proto | 6 +----- odpf/assets/group.proto | 2 +- odpf/assets/job.proto | 4 ---- odpf/assets/table.proto | 4 ---- odpf/assets/topic.proto | 4 ---- 7 files changed, 9 insertions(+), 26 deletions(-) diff --git a/odpf/assets/bucket.proto b/odpf/assets/bucket.proto index a1fa851d..205975ea 100644 --- a/odpf/assets/bucket.proto +++ b/odpf/assets/bucket.proto @@ -9,7 +9,6 @@ option go_package = "github.com/odpf/proton/assets"; import "google/protobuf/timestamp.proto"; import "odpf/assets/facets/ownership.proto"; -import "odpf/assets/facets/lineage.proto"; import "odpf/assets/facets/properties.proto"; import "odpf/assets/common/resource.proto"; @@ -66,19 +65,15 @@ message Blob { // Example: `gcs`. string source = 3; - // The description of the blob. - // Example: `This is a config file for x app` - string description = 4; - // The length of the object content. // Example: `300` - int64 size = 5; + int64 size = 4; // Delete time of the blob object. - google.protobuf.Timestamp delete_time = 6; + google.protobuf.Timestamp delete_time = 5; // Expire time of the blob object. - google.protobuf.Timestamp expire_time = 7; + google.protobuf.Timestamp expire_time = 6; // The ownership of the blob. // For an example check out ownership. diff --git a/odpf/assets/common/resource.proto b/odpf/assets/common/resource.proto index 405ff02e..2d417c42 100644 --- a/odpf/assets/common/resource.proto +++ b/odpf/assets/common/resource.proto @@ -29,4 +29,8 @@ message Resource { // The REST URL for accessing the resource. URL returns the resource itself. // Example: `https://xyz.com/v1/users/user-123` string url = 5; + + // The description of the resource. + // Example: `This resource is being used for storing important number` + string description = 6; } diff --git a/odpf/assets/dashboard.proto b/odpf/assets/dashboard.proto index ea53be05..70e5c1b4 100644 --- a/odpf/assets/dashboard.proto +++ b/odpf/assets/dashboard.proto @@ -19,10 +19,6 @@ message Dashboard { // Representation of the resource odpf.assets.common.Resource resource = 1; - // The description of the dashboard. - // Example: "This dashboard was created by the Metabase team." - string description = 4; - // The list of the charts in the dashboard. // For an example, check the schema of the chart. repeated Chart charts = 21; @@ -90,7 +86,7 @@ message Chart { // For an example check out ownership. odpf.assets.facets.Ownership ownership = 31; - // The lineage of the dashboard. + // The lineage of the chart. // For an example check out lineage schema. odpf.assets.facets.Lineage lineage = 32; diff --git a/odpf/assets/group.proto b/odpf/assets/group.proto index b17678b4..e8a47f93 100644 --- a/odpf/assets/group.proto +++ b/odpf/assets/group.proto @@ -20,7 +20,7 @@ message Group { // The email of the group. // Example: `xyz@xyz.com` - string email = 3; + string email = 2; // The members of the group. // For example look at schema of the member. diff --git a/odpf/assets/job.proto b/odpf/assets/job.proto index 718315f9..11af9bbb 100644 --- a/odpf/assets/job.proto +++ b/odpf/assets/job.proto @@ -19,10 +19,6 @@ message Job { // Representation of the resource odpf.assets.common.Resource resource = 1; - // The description of the job. - // Example: 'This job is used to process data from a stream.' - string description = 5; - // The ownership of the topic. // For an example check out ownership. odpf.assets.facets.Ownership ownership = 31; diff --git a/odpf/assets/table.proto b/odpf/assets/table.proto index 2991fb15..cd56db35 100644 --- a/odpf/assets/table.proto +++ b/odpf/assets/table.proto @@ -22,10 +22,6 @@ message Table { // Representation of the resource odpf.assets.common.Resource resource = 1; - // The description of the table. - // Example: 'My User table'. - string description = 4; - // The metrics about the table. // For example check the profile schem. TableProfile profile = 21; diff --git a/odpf/assets/topic.proto b/odpf/assets/topic.proto index dbcdf703..e261d9fb 100644 --- a/odpf/assets/topic.proto +++ b/odpf/assets/topic.proto @@ -21,10 +21,6 @@ message Topic { // Representation of the resource odpf.assets.common.Resource resource = 1; - // The description of the topic. - // Example: 'This is a topic for my application'. - string description = 4; - // The metrics of the topic. // For an example check out topic profile schema. TopicProfile profile = 21; From 2cc9ae0d4ee482ade543450fd5996adea6996473 Mon Sep 17 00:00:00 2001 From: Stewart Jingga Date: Mon, 8 Nov 2021 19:08:24 +0700 Subject: [PATCH 2/2] feat(assets): add lineage to Dashboard model --- odpf/assets/dashboard.proto | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/odpf/assets/dashboard.proto b/odpf/assets/dashboard.proto index 70e5c1b4..ccb3edfc 100644 --- a/odpf/assets/dashboard.proto +++ b/odpf/assets/dashboard.proto @@ -35,6 +35,10 @@ message Dashboard { // Timstamp facet can be used to set the creation and updation timestamp of a user. odpf.assets.common.Timestamp timestamps = 33; + // The lineage of the dashboard. + // For an example check out lineage schema. + odpf.assets.facets.Lineage lineage = 34; + // The timestamp of the generated event. // Event schemas is defined in the common event schema. odpf.assets.common.Event event = 100;