Skip to content

Commit

Permalink
Merge branch 'master' into snow_queries_v2_pr3
Browse files Browse the repository at this point in the history
  • Loading branch information
mayurinehate authored Dec 24, 2024
2 parents a93fcf4 + 4d990b0 commit b7f76d3
Show file tree
Hide file tree
Showing 47 changed files with 1,237 additions and 249 deletions.
196 changes: 193 additions & 3 deletions datahub-graphql-core/src/main/resources/entity.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,16 @@ type Query {
Fetch all Business Attributes
"""
listBusinessAttributes(input: ListBusinessAttributesInput!): ListBusinessAttributesResult

"""
Fetch a Data Process Instance by primary key (urn)
"""
dataProcessInstance(urn: String!): DataProcessInstance


}


"""
An ERModelRelationship is a high-level abstraction that dictates what datasets fields are erModelRelationshiped.
"""
Expand Down Expand Up @@ -9832,15 +9840,45 @@ type MLModelGroup implements EntityWithRelationships & Entity & BrowsableEntity
privileges: EntityPrivileges
}

"""
Properties describing a group of related ML models
"""
type MLModelGroupProperties {
"""
Display name of the model group
"""
name: String

"""
Detailed description of the model group's purpose and contents
"""
description: String

createdAt: Long
"""
When this model group was created
"""
created: AuditStamp

"""
When this model group was last modified
"""
lastModified: AuditStamp

"""
Version identifier for this model group
"""
version: VersionTag

"""
Custom key-value properties for the model group
"""
customProperties: [CustomPropertiesEntry!]

"""
Deprecated creation timestamp
@deprecated Use the 'created' field instead
"""
createdAt: Long @deprecated(reason: "Use `created` instead")
}

"""
Expand Down Expand Up @@ -9990,40 +10028,103 @@ description: String
}

type MLMetric {
"""
Name of the metric (e.g. accuracy, precision, recall)
"""
name: String

"""
Description of what this metric measures
"""
description: String

"""
The computed value of the metric
"""
value: String

"""
Timestamp when this metric was recorded
"""
createdAt: Long
}

type MLModelProperties {
"""
The display name of the model used in the UI
"""
name: String!

"""
Detailed description of the model's purpose and characteristics
"""
description: String

date: Long
"""
When the model was last modified
"""
lastModified: AuditStamp

"""
Version identifier for this model
"""
version: String

"""
The type/category of ML model (e.g. classification, regression)
"""
type: String

"""
Mapping of hyperparameter configurations
"""
hyperParameters: HyperParameterMap

hyperParams: [MLHyperParam]
"""
List of hyperparameter settings used to train this model
"""
hyperParams: [MLHyperParam]

"""
Performance metrics from model training
"""
trainingMetrics: [MLMetric]

"""
Names of ML features used by this model
"""
mlFeatures: [String!]

"""
Tags for categorizing and searching models
"""
tags: [String!]

"""
Model groups this model belongs to
"""
groups: [MLModelGroup]

"""
Additional custom properties specific to this model
"""
customProperties: [CustomPropertiesEntry!]

"""
URL to view this model in external system
"""
externalUrl: String

"""
When this model was created
"""
created: AuditStamp

"""
Deprecated timestamp for model creation
@deprecated Use 'created' field instead
"""
date: Long @deprecated(reason: "Use `created` instead")
}

type MLFeatureProperties {
Expand Down Expand Up @@ -12804,3 +12905,92 @@ type CronSchedule {
"""
timezone: String!
}


"""
Properties describing a data process instance's execution metadata
"""
type DataProcessInstanceProperties {
"""
The display name of this process instance
"""
name: String!

"""
URL to view this process instance in the external system
"""
externalUrl: String

"""
When this process instance was created
"""
created: AuditStamp

"""
Additional custom properties specific to this process instance
"""
customProperties: [CustomPropertiesEntry!]
}

"""
Properties specific to an ML model training run instance
"""
type MLTrainingRunProperties {
"""
Unique identifier for this training run
"""
id: String

"""
List of URLs to access training run outputs (e.g. model artifacts, logs)
"""
outputUrls: [String]

"""
Hyperparameters used in this training run
"""
hyperParams: [MLHyperParam]

"""
Performance metrics recorded during this training run
"""
trainingMetrics: [MLMetric]
}

extend type DataProcessInstance {

"""
Additional read only properties associated with the Data Job
"""
properties: DataProcessInstanceProperties

"""
The specific instance of the data platform that this entity belongs to
"""
dataPlatformInstance: DataPlatformInstance

"""
Sub Types that this entity implements
"""
subTypes: SubTypes

"""
The parent container in which the entity resides
"""
container: Container

"""
Standardized platform urn where the data process instance is defined
"""
platform: DataPlatform!

"""
Recursively get the lineage of containers for this entity
"""
parentContainers: ParentContainersResult

"""
Additional properties when subtype is Training Run
"""
mlTrainingRunProperties: MLTrainingRunProperties
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,6 @@ export function getDatasetName(datainput: any): string {
datainput?.editableProperties?.name ||
datainput?.properties?.name ||
datainput?.name ||
datainput?.urn?.split(',').at(1)
datainput?.urn?.split(',')?.at(1)
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ export const filterQueries = (filterText, queries: Query[]) => {
const lowerFilterText = filterText.toLowerCase();
return queries.filter((query) => {
return (
query.title?.toLowerCase().includes(lowerFilterText) ||
query.description?.toLowerCase().includes(lowerFilterText) ||
query.query?.toLowerCase().includes(lowerFilterText)
query.title?.toLowerCase()?.includes(lowerFilterText) ||
query.description?.toLowerCase()?.includes(lowerFilterText) ||
query.query?.toLowerCase()?.includes(lowerFilterText)
);
});
};
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function matchesTagsOrTermsOrDescription(field: SchemaField, filterText: string,
.toLocaleLowerCase()
.includes(filterText),
) ||
field.description?.toLocaleLowerCase().includes(filterText)
field.description?.toLocaleLowerCase()?.includes(filterText)
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export const ExecutionDetailsModal = ({ urn, open, onClose }: Props) => {
downloadFile(output, `exec-${urn}.log`);
};

const logs = (showExpandedLogs && output) || output?.split('\n').slice(0, 5).join('\n');
const logs = (showExpandedLogs && output) || output?.split('\n')?.slice(0, 5)?.join('\n');
const result = data?.executionRequest?.result as Partial<ExecutionRequestResult>;
const status = getIngestionSourceStatus(result);

Expand Down Expand Up @@ -163,7 +163,7 @@ export const ExecutionDetailsModal = ({ urn, open, onClose }: Props) => {
} catch (e) {
recipeYaml = '';
}
const recipe = showExpandedRecipe ? recipeYaml : recipeYaml?.split('\n').slice(0, 5).join('\n');
const recipe = showExpandedRecipe ? recipeYaml : recipeYaml?.split('\n')?.slice(0, 5)?.join('\n');

const areLogsExpandable = output?.split(/\r\n|\r|\n/)?.length > 5;
const isRecipeExpandable = recipeYaml?.split(/\r\n|\r|\n/)?.length > 5;
Expand Down
4 changes: 2 additions & 2 deletions datahub-web-react/src/app/lineage/utils/titleUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,10 @@ function truncate(input, length) {
function getLastTokenOfTitle(title?: string): string {
if (!title) return '';

const lastToken = title?.split('.').slice(-1)[0];
const lastToken = title?.split('.')?.slice(-1)?.[0];

// if the last token does not contain any content, the string should not be tokenized on `.`
if (lastToken.replace(/\s/g, '').length === 0) {
if (lastToken?.replace(/\s/g, '')?.length === 0) {
return title;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const useSearchResult = () => {
};

export const useEntityType = () => {
return useSearchResultContext()?.searchResult.entity.type;
return useSearchResultContext()?.searchResult?.entity?.type;
};

export const useMatchedFields = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const RenderedField = ({
field: MatchedField;
}) => {
const entityRegistry = useEntityRegistry();
const query = useSearchQuery()?.trim().toLowerCase();
const query = useSearchQuery()?.trim()?.toLowerCase();
const customRenderedField = customFieldRenderer?.(field);
if (customRenderedField) return <b>{customRenderedField}</b>;
if (isHighlightableEntityField(field)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const SearchTextHighlighter = ({ field, text, enableFullHighlight = false }: Pro
const enableNameHighlight = appConfig.config.visualConfig.searchResult?.enableNameHighlight;
const matchedFields = useMatchedFieldsByGroup(field);
const hasMatchedField = !!matchedFields?.length;
const normalizedSearchQuery = useSearchQuery()?.trim().toLowerCase();
const normalizedSearchQuery = useSearchQuery()?.trim()?.toLowerCase();
const normalizedText = text.trim().toLowerCase();
const hasSubstring = hasMatchedField && !!normalizedSearchQuery && normalizedText.includes(normalizedSearchQuery);
const pattern = enableFullHighlight ? HIGHLIGHT_ALL_PATTERN : undefined;
Expand Down
2 changes: 1 addition & 1 deletion docs/how/updating-datahub.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
This file documents any backwards-incompatible changes in DataHub and assists people when migrating to a new version.

## Next

- #12191 - Configs `include_view_lineage` and `include_view_column_lineage` are removed from snowflake ingestion source. View and External Table DDL lineage will always be ingested when definitions are available.
- #11560 - The PowerBI ingestion source configuration option include_workspace_name_in_dataset_urn determines whether the workspace name is included in the PowerBI dataset's URN.<br/> PowerBI allows to have identical name of semantic model and their tables across the workspace, It will overwrite the semantic model in-case of multi-workspace ingestion.<br/>
Entity urn with `include_workspace_name_in_dataset_urn: false`

Expand Down
9 changes: 6 additions & 3 deletions metadata-ingestion/src/datahub/ingestion/graph/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,12 @@ def from_emitter(cls, emitter: DatahubRestEmitter) -> "DataHubGraph":
retry_max_times=emitter._retry_max_times,
extra_headers=emitter._session.headers,
disable_ssl_verification=emitter._session.verify is False,
# TODO: Support these headers.
# ca_certificate_path=emitter._ca_certificate_path,
# client_certificate_path=emitter._client_certificate_path,
ca_certificate_path=(
emitter._session.verify
if isinstance(emitter._session.verify, str)
else None
),
client_certificate_path=emitter._session.cert,
)
)

Expand Down
Loading

0 comments on commit b7f76d3

Please sign in to comment.