Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
nadavgross authored Jul 11, 2024
2 parents 78518d2 + 623b6f9 commit 7013a04
Show file tree
Hide file tree
Showing 19 changed files with 175,778 additions and 210 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import static com.linkedin.metadata.Constants.*;
import static com.linkedin.metadata.authorization.ApiOperation.DELETE;
import static com.linkedin.metadata.authorization.ApiOperation.MANAGE;
import static com.linkedin.metadata.authorization.PoliciesConfig.MANAGE_ACCESS_TOKENS;

import com.datahub.authorization.AuthUtil;
import com.datahub.authorization.ConjunctivePrivilegeGroup;
Expand Down Expand Up @@ -52,9 +53,11 @@ public static boolean canManagePolicies(@Nonnull QueryContext context) {

public static boolean canGeneratePersonalAccessToken(@Nonnull QueryContext context) {
return AuthUtil.isAuthorized(
context.getAuthorizer(),
context.getActorUrn(),
PoliciesConfig.GENERATE_PERSONAL_ACCESS_TOKENS_PRIVILEGE);
context.getAuthorizer(),
context.getActorUrn(),
PoliciesConfig.GENERATE_PERSONAL_ACCESS_TOKENS_PRIVILEGE)
|| AuthUtil.isAuthorized(
context.getAuthorizer(), context.getActorUrn(), MANAGE_ACCESS_TOKENS);
}

public static boolean canManageTokens(@Nonnull QueryContext context) {
Expand Down
1 change: 1 addition & 0 deletions docs/how/updating-datahub.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ This file documents any backwards-incompatible changes in DataHub and assists pe
No loss of functionality expected unless explicitly mentioned in Breaking Changes.

### Other Notable Changes
- #10498 - Tableau ingestion can now be configured to ingest multiple sites at once and add the sites as containers. The feature is currently only available for Tableau Server.

## 0.13.3

Expand Down
5 changes: 2 additions & 3 deletions metadata-ingestion/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,7 @@
# LookML files with spaces between an item and the following comma.
# See https://github.com/joshtemple/lkml/issues/73.
"lkml>=1.3.4",
"sql-metadata==2.2.2",
*sqllineage_lib,
*sqlglot_lib,
"GitPython>2",
"python-liquid",
}
Expand Down Expand Up @@ -372,7 +371,7 @@
"kafka-connect": sql_common | {"requests", "JPype1"},
"ldap": {"python-ldap>=2.4"},
"looker": looker_common,
"lookml": looker_common | sqlglot_lib,
"lookml": looker_common,
"metabase": {"requests"} | sqlglot_lib,
"mlflow": {
"mlflow-skinny>=2.3.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from collections import OrderedDict
from dataclasses import dataclass
from datetime import datetime, timezone
from typing import Dict, Iterable, List, Optional, Set, Tuple, Type
from typing import Dict, Iterable, List, Optional, Set, Tuple

import lkml
import lkml.simple
Expand All @@ -22,7 +22,6 @@
platform_name,
support_status,
)
from datahub.ingestion.api.registry import import_path
from datahub.ingestion.api.source import MetadataWorkUnitProcessor, SourceCapability
from datahub.ingestion.api.workunit import MetadataWorkUnit
from datahub.ingestion.source.common.subtypes import (
Expand Down Expand Up @@ -96,7 +95,6 @@
SubTypesClass,
)
from datahub.sql_parsing.sqlglot_lineage import ColumnRef
from datahub.utilities.sql_parser import SQLParser

logger = logging.getLogger(__name__)

Expand All @@ -111,15 +109,6 @@ class LookerView:
raw_file_content: str
view_details: Optional[ViewProperties] = None

@classmethod
def _import_sql_parser_cls(cls, sql_parser_path: str) -> Type[SQLParser]:
assert "." in sql_parser_path, "sql_parser-path must contain a ."
parser_cls = import_path(sql_parser_path)

if not issubclass(parser_cls, SQLParser):
raise ValueError(f"must be derived from {SQLParser}; got {parser_cls}")
return parser_cls

@classmethod
def determine_view_file_path(
cls, base_folder_path: str, absolute_file_path: str
Expand Down
Loading

0 comments on commit 7013a04

Please sign in to comment.