Skip to content

Commit

Permalink
fix(cli): delete - handle case insensitive entity types (datahub-proj…
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanHolstien authored and maggiehays committed Aug 1, 2022
1 parent b3494dc commit 954e971
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ project.ext.externalDependency = [
'opentelemetryApi': 'io.opentelemetry:opentelemetry-api:1.0.0',
'opentelemetryAnnotations': 'io.opentelemetry:opentelemetry-extension-annotations:1.0.0',
'opentracingJdbc':'io.opentracing.contrib:opentracing-jdbc:0.2.15',
'parseqTest': 'com.linkedin.parseq:parseq:3.0.7:test',
'parquet': 'org.apache.parquet:parquet-avro:1.12.0',
'picocli': 'info.picocli:picocli:4.5.0',
'playCache': 'com.typesafe.play:play-cache_2.11:2.6.18',
Expand Down
2 changes: 1 addition & 1 deletion docs/how/build-metadata-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public interface GraphBuilder<SNAPSHOT extends RecordTemplate> {
[entity]: ../what/entity.md
[aspect]: ../what/aspect.md
[GMS]: ../what/gms.md
[Local DAO]: ../../metadata-dao/src/main/java/com/linkedin/metadata/dao/BaseLocalDAO.java
[Local DAO]: ../../metadata-dao/src/main/java/com/linkedin/metadata/ebean/EbeanAspectDAO.java
[Remote DAO]: ../../metadata-dao/src/main/java/com/linkedin/metadata/dao/BaseRemoteDAO.java
[MAE]: ../what/mxe.md#metadata-audit-event-mae
[rest.li]: https://rest.li
Expand Down
12 changes: 6 additions & 6 deletions metadata-ingestion/src/datahub/cli/cli_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,13 +321,13 @@ def get_urns_by_filter(
filter_criteria = []
if env:
filter_criteria.append({"field": "origin", "value": env, "condition": "EQUAL"})

entity_type_lower = entity_type.lower()
if (
platform is not None
and entity_type == "dataset"
or entity_type == "dataflow"
or entity_type == "datajob"
or entity_type == "container"
and entity_type_lower == "dataset"
or entity_type_lower == "dataflow"
or entity_type_lower == "datajob"
or entity_type_lower == "container"
):
filter_criteria.append(
{
Expand All @@ -337,7 +337,7 @@ def get_urns_by_filter(
}
)
if platform is not None and (
entity_type.lower() == "chart" or entity_type.lower() == "dashboard"
entity_type_lower == "chart" or entity_type_lower == "dashboard"
):
filter_criteria.append(
{
Expand Down

0 comments on commit 954e971

Please sign in to comment.