Skip to content

Commit

Permalink
feat: Introducing optional DataPlatform logo url (#2127)
Browse files Browse the repository at this point in the history
Co-authored-by: John Joyce <[email protected]>
  • Loading branch information
jjoyce0510 and jjoyce0510 authored Feb 20, 2021
1 parent b9e9a08 commit 4f8d8b3
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ public DataPlatformInfo apply(@Nonnull final com.linkedin.dataplatform.DataPlatf
final DataPlatformInfo result = new DataPlatformInfo();
result.setType(PlatformType.valueOf(input.getType().toString()));
result.setDatasetNameDelimiter(input.getDatasetNameDelimiter());
if (input.hasLogoUrl()) {
result.setLogoUrl(input.getLogoUrl().toString());
}
return result;
}
}
5 changes: 5 additions & 0 deletions datahub-graphql-core/src/main/resources/gms.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,11 @@ type DataPlatformInfo {
The delimiter in the dataset names on the data platform
"""
datasetNameDelimiter: String!

"""
A logo URL associated with the platform
"""
logoUrl: String
}

enum PlatformType {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@
"owningTeam" : "urn:li:internalTeam:wherehows"
}
}
}, {
"type" : "typeref",
"name" : "Url",
"namespace" : "com.linkedin.common",
"ref" : "string",
"java" : {
"class" : "com.linkedin.common.url.Url",
"coercerClass" : "com.linkedin.common.url.UrlCoercer"
}
}, {
"type" : "record",
"name" : "DataPlatform",
Expand Down Expand Up @@ -76,6 +85,10 @@
"name" : "datasetNameDelimiter",
"type" : "string",
"doc" : "The delimiter in the dataset names on the data platform, e.g. '/' for HDFS and '.' for Oracle"
}, {
"name" : "logoUrl",
"type" : "com.linkedin.common.Url",
"optional" : true
} ]
},
"doc" : "Metadata associated with a dataplatform information",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1453,4 +1453,4 @@
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
namespace com.linkedin.dataplatform

import com.linkedin.common.Url

/**
* Information about a data platform
*/
Expand Down Expand Up @@ -70,4 +72,9 @@ record DataPlatformInfo {
* The delimiter in the dataset names on the data platform, e.g. '/' for HDFS and '.' for Oracle
*/
datasetNameDelimiter: string

/**
* The URL for a logo associated with the platform
*/
logoUrl: optional Url
}

0 comments on commit 4f8d8b3

Please sign in to comment.