Skip to content

Commit

Permalink
Merge branch 'datahub-project:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
anshbansal authored Dec 23, 2024
2 parents 29edbf7 + d06980f commit 2145afa
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jobs:
run: |
./gradlew :datahub-frontend:build :datahub-web-react:build --parallel
env:
NODE_OPTIONS: "--max-old-space-size=3072"
NODE_OPTIONS: "--max-old-space-size=4096"
- name: Gradle compile (jdk8) for legacy Spark
if: ${{ matrix.command == 'except_metadata_ingestion' && needs.setup.outputs.backend_change == 'true' }}
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-unified.yml
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ jobs:
./gradlew :datahub-frontend:dist -x test -x yarnTest -x yarnLint --parallel
mv ./datahub-frontend/build/distributions/datahub-frontend-*.zip datahub-frontend.zip
env:
NODE_OPTIONS: "--max-old-space-size=3072"
NODE_OPTIONS: "--max-old-space-size=4096"
- name: Build and push
uses: ./.github/actions/docker-custom-build-and-push
with:
Expand Down
3 changes: 1 addition & 2 deletions datahub-web-react/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ node {
}

// Version of node to use.
version = '21.2.0'
version = '22.12.0'

// Version of Yarn to use.
yarnVersion = '1.22.22'
Expand Down Expand Up @@ -93,7 +93,6 @@ task yarnLintFix(type: YarnTask, dependsOn: [yarnInstall, yarnGenerate]) {
}

task yarnBuild(type: YarnTask, dependsOn: [yarnInstall, yarnGenerate]) {
environment = [NODE_OPTIONS: "--max-old-space-size=3072 --openssl-legacy-provider"]
args = ['run', 'build']

outputs.cacheIf { true }
Expand Down
2 changes: 1 addition & 1 deletion datahub-web-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
"analyze": "source-map-explorer 'dist/assets/*.js'",
"start": "yarn run generate && vite",
"ec2-dev": "yarn run generate && CI=true;export CI;vite",
"build": "yarn run generate && NODE_OPTIONS='--max-old-space-size=3072 --openssl-legacy-provider' CI=false vite build",
"build": "yarn run generate && NODE_OPTIONS='--max-old-space-size=4096 --openssl-legacy-provider' CI=false vite build",
"test": "vitest",
"generate": "graphql-codegen --config codegen.yml",
"lint": "eslint . --ext .ts,.tsx --quiet && yarn format-check && yarn type-check",
Expand Down
2 changes: 1 addition & 1 deletion docs-website/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ node {
}

// Version of node to use.
version = '21.2.0'
version = '22.12.0'

// Version of Yarn to use.
yarnVersion = '1.22.22'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@
DEFAULT_DATABASE_TABLE_NAME = "metadata_aspect_v2"
DEFAULT_KAFKA_TOPIC_NAME = "MetadataChangeLog_Timeseries_v1"
DEFAULT_DATABASE_BATCH_SIZE = 10_000
DEFAULT_EXCLUDE_ASPECTS = {
"dataHubIngestionSourceKey",
"dataHubIngestionSourceInfo",
"datahubIngestionRunSummary",
"datahubIngestionCheckpoint",
"dataHubSecretKey",
"dataHubSecretValue",
"globalSettingsKey",
"globalSettingsInfo",
"testResults",
}


class DataHubSourceConfig(StatefulIngestionConfigBase):
Expand Down Expand Up @@ -44,7 +55,7 @@ class DataHubSourceConfig(StatefulIngestionConfigBase):
)

exclude_aspects: Set[str] = Field(
default_factory=set,
default=DEFAULT_EXCLUDE_ASPECTS,
description="Set of aspect names to exclude from ingestion",
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from datetime import datetime
from typing import Any, Collection, Iterable, List, Optional, Set, Tuple, Type

from pydantic import BaseModel, validator
from pydantic import BaseModel, Field, validator

from datahub.configuration.datetimes import parse_absolute_time
from datahub.ingestion.api.closeable import Closeable
Expand Down Expand Up @@ -72,8 +72,8 @@ class ColumnUpstreamJob(BaseModel):


class ColumnUpstreamLineage(BaseModel):
column_name: str
upstreams: List[ColumnUpstreamJob]
column_name: Optional[str]
upstreams: List[ColumnUpstreamJob] = Field(default_factory=list)


class UpstreamTableNode(BaseModel):
Expand Down
24 changes: 24 additions & 0 deletions metadata-ingestion/tests/unit/snowflake/test_snowflake_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
DEFAULT_TEMP_TABLES_PATTERNS,
SnowflakeV2Config,
)
from datahub.ingestion.source.snowflake.snowflake_lineage_v2 import UpstreamLineageEdge
from datahub.ingestion.source.snowflake.snowflake_query import (
SnowflakeQuery,
create_deny_regex_sql_filter,
Expand Down Expand Up @@ -664,3 +665,26 @@ def test_create_snowsight_base_url_ap_northeast_1():

def test_snowflake_utils() -> None:
assert_doctest(datahub.ingestion.source.snowflake.snowflake_utils)


def test_snowflake_query_result_parsing():
db_row = {
"DOWNSTREAM_TABLE_NAME": "db.schema.downstream_table",
"DOWNSTREAM_TABLE_DOMAIN": "Table",
"UPSTREAM_TABLES": [
{
"query_id": "01b92f61-0611-c826-000d-0103cf9b5db7",
"upstream_object_domain": "Table",
"upstream_object_name": "db.schema.upstream_table",
}
],
"UPSTREAM_COLUMNS": [{}],
"QUERIES": [
{
"query_id": "01b92f61-0611-c826-000d-0103cf9b5db7",
"query_text": "Query test",
"start_time": "2022-12-01 19:56:34",
}
],
}
assert UpstreamLineageEdge.parse_obj(db_row)
2 changes: 1 addition & 1 deletion smoke-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ node {
}

// Version of node to use.
version = '21.2.0'
version = '22.12.0'

// Version of Yarn to use.
yarnVersion = '1.22.22'
Expand Down

0 comments on commit 2145afa

Please sign in to comment.