Skip to content

Commit cf3f113

Browse files
Merge branch 'master' into popover-to-matches
2 parents ef19bf5 + a432f49 commit cf3f113

File tree

46 files changed

+12923
-838
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+12923
-838
lines changed

.github/workflows/build-and-test.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,7 @@ jobs:
3333
with:
3434
python-version: "3.7"
3535
- name: Gradle build (and test)
36-
# there is some race condition in gradle build, which makes gradle never terminate in ~30% of the runs
37-
# running build first without datahub-web-react:yarnBuild and then with it is 100% stable
38-
# datahub-frontend:unzipAssets depends on datahub-web-react:yarnBuild but gradle does not know about it
3936
run: |
40-
./gradlew build -x :metadata-ingestion:build -x :metadata-ingestion:check -x docs-website:build -x datahub-web-react:yarnBuild -x datahub-frontend:unzipAssets -x :metadata-io:test -x :metadata-integration:java:datahub-protobuf:build
4137
./gradlew build -x :metadata-ingestion:build -x :metadata-ingestion:check -x docs-website:build -x :metadata-integration:java:spark-lineage:test -x :metadata-io:test
4238
- uses: actions/upload-artifact@v2
4339
if: always()

.github/workflows/publish-datahub-jars.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish Datahub Java Jars (Client, Spark Lineage, Protobuf)
1+
name: Publish Datahub Java Jars (Client, Spark Lineage, Protobuf, Ranger)
22

33
on:
44
push:
@@ -142,7 +142,8 @@ jobs:
142142
echo signingKey=$SIGNING_KEY >> gradle.properties
143143
./gradlew -PreleaseVersion=${{ needs.setup.outputs.tag }} :metadata-integration:java:datahub-protobuf:publish
144144
./gradlew :metadata-integration:java:datahub-protobuf:closeAndReleaseRepository --info
145-
- name: build and publish datahub-ranger-plugin
145+
- name: publish datahub-ranger-plugin snapshot jar
146+
if: ${{ github.event_name != 'release' }}
146147
env:
147148
RELEASE_USERNAME: ${{ secrets.RELEASE_USERNAME }}
148149
RELEASE_PASSWORD: ${{ secrets.RELEASE_PASSWORD }}
@@ -152,6 +153,18 @@ jobs:
152153
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
153154
run: |
154155
echo signingKey=$SIGNING_KEY >> gradle.properties
155-
# Publish apache ranger plugin to maven
156156
./gradlew :datahub-ranger-plugin:printVersion
157-
./gradlew :datahub-ranger-plugin:publishMavenJavaPublicationToMavenLocal
157+
./gradlew :datahub-ranger-plugin:publish
158+
- name: release datahub-ranger-plugin jar
159+
if: ${{ github.event_name == 'release' }}
160+
env:
161+
RELEASE_USERNAME: ${{ secrets.RELEASE_USERNAME }}
162+
RELEASE_PASSWORD: ${{ secrets.RELEASE_PASSWORD }}
163+
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
164+
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
165+
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
166+
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
167+
run: |
168+
echo signingKey=$SIGNING_KEY >> gradle.properties
169+
./gradlew -PreleaseVersion=${{ needs.setup.outputs.tag }} :datahub-ranger-plugin:publish
170+
./gradlew :datahub-ranger-plugin:closeAndReleaseRepository --info

datahub-ranger-plugin/build.gradle

Lines changed: 1 addition & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
1-
import org.apache.tools.ant.filters.ReplaceTokens
2-
3-
41
apply plugin: 'java'
52
apply plugin: 'signing'
63
apply plugin: 'maven-publish'
74
apply plugin: 'io.codearte.nexus-staging'
8-
9-
10-
11-
import org.apache.tools.ant.filters.ReplaceTokens
5+
apply from: '../metadata-integration/java/versioning.gradle'
126

137

148
repositories {
@@ -31,53 +25,6 @@ dependencies {
3125
testCompile externalDependency.testng
3226
}
3327

34-
def detailedVersionString = "0.0.0-unknown-SNAPSHOT"
35-
def snapshotVersion = false
36-
if (project.hasProperty("releaseVersion")) {
37-
version = releaseVersion
38-
detailedVersionString = releaseVersion
39-
} else {
40-
try {
41-
// apply this plugin in a try-catch block so that we can handle cases without .git directory
42-
apply plugin: "com.palantir.git-version"
43-
def details = versionDetails()
44-
detailedVersionString = gitVersion()
45-
version = details.lastTag
46-
version = version.startsWith("v")? version.substring(1): version
47-
def suffix = details.isCleanTag? "": "-SNAPSHOT"
48-
snapshotVersion = ! details.isCleanTag
49-
}
50-
catch (Exception e) {
51-
e.printStackTrace()
52-
// last fall back
53-
version = detailedVersionString
54-
}
55-
}
56-
// trim version if it is of size 4 to size 3
57-
def versionParts = version.tokenize(".")
58-
if (versionParts.size() > 3) {
59-
// at-least 4 part version
60-
// we check if the 4th part is a .0 in which case we want to create a release
61-
if (versionParts[3] != '0') {
62-
snapshotVersion = true
63-
}
64-
versionParts = versionParts[0..2]
65-
version = versionParts[0..2].join('.')
66-
}
67-
68-
if (snapshotVersion) {
69-
if (versionParts[versionParts.size()-1].isInteger()) {
70-
version = versionParts[0..versionParts.size()-2].join('.') + '.' + (versionParts[versionParts.size()-1].toInteger()+1).toString() + "-SNAPSHOT"
71-
} else {
72-
// we are unable to part the last token as an integer, so we just append SNAPSHOT to this version
73-
version = versionParts[0..versionParts.size()-1].join('.') + '-SNAPSHOT'
74-
}
75-
}
76-
77-
processResources {
78-
filter(ReplaceTokens, tokens:[fullVersion: detailedVersionString])
79-
}
80-
8128

8229
publishing {
8330
publications {

datahub-web-react/src/app/entity/shared/tabs/Dataset/Schema/SchemaTable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ export default function SchemaTable({
123123

124124
const termColumn = {
125125
width: 125,
126-
title: 'Terms',
126+
title: 'Glossary Terms',
127127
dataIndex: 'globalTags',
128128
key: 'tag',
129129
render: termRenderer,

datahub-web-react/src/app/search/SearchFilterLabel.tsx

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import * as React from 'react';
12
import { BookOutlined } from '@ant-design/icons';
23
import { Tag, Tooltip } from 'antd';
3-
import * as React from 'react';
44
import styled from 'styled-components';
55
import {
66
AggregationMetadata,
@@ -21,6 +21,7 @@ import { useEntityRegistry } from '../useEntityRegistry';
2121
import { ENTITY_FILTER_NAME } from './utils/constants';
2222
import CustomAvatar from '../shared/avatar/CustomAvatar';
2323
import { IconStyleType } from '../entity/Entity';
24+
import { formatNumber } from '../shared/formatNumber';
2425

2526
type Props = {
2627
aggregation: AggregationMetadata;
@@ -46,7 +47,8 @@ export const SearchFilterLabel = ({ aggregation, field }: Props) => {
4647
const entityType = aggregation.value.toUpperCase() as EntityType;
4748
return (
4849
<span>
49-
{entityType ? entityRegistry.getCollectionName(entityType) : aggregation.value} ({countText})
50+
{entityType ? entityRegistry.getCollectionName(entityType) : aggregation.value} (
51+
{formatNumber(countText)})
5052
</span>
5153
);
5254
}
@@ -60,7 +62,7 @@ export const SearchFilterLabel = ({ aggregation, field }: Props) => {
6062
<StyledTag $colorHash={tag?.urn} $color={tag?.properties?.colorHex}>
6163
{truncatedDisplayName}
6264
</StyledTag>
63-
({countText})
65+
({formatNumber(countText)})
6466
</Tooltip>
6567
);
6668
}
@@ -94,7 +96,7 @@ export const SearchFilterLabel = ({ aggregation, field }: Props) => {
9496
<span style={{ marginRight: 8 }}>
9597
{entityRegistry.getIcon(EntityType.CorpGroup, 16, IconStyleType.ACCENT)}
9698
</span>
97-
{truncatedDisplayName} ({countText})
99+
{truncatedDisplayName} ({formatNumber(countText)})
98100
</Tooltip>
99101
);
100102
}
@@ -109,7 +111,7 @@ export const SearchFilterLabel = ({ aggregation, field }: Props) => {
109111
<BookOutlined style={{ marginRight: '3%' }} />
110112
{truncatedDisplayName}
111113
</Tag>
112-
({countText})
114+
({formatNumber(countText)})
113115
</Tooltip>
114116
);
115117
}
@@ -124,7 +126,7 @@ export const SearchFilterLabel = ({ aggregation, field }: Props) => {
124126
<PreviewImage src={platform.properties?.logoUrl} alt={platform.name} />
125127
)}
126128
<span>
127-
{truncatedDisplayName} ({countText})
129+
{truncatedDisplayName} ({formatNumber(countText)})
128130
</span>
129131
</Tooltip>
130132
);
@@ -136,7 +138,7 @@ export const SearchFilterLabel = ({ aggregation, field }: Props) => {
136138
const truncatedDisplayName = displayName.length > 25 ? `${displayName.slice(0, 25)}...` : displayName;
137139
return (
138140
<Tooltip title={displayName}>
139-
{truncatedDisplayName} ({countText})
141+
{truncatedDisplayName} ({formatNumber(countText)})
140142
</Tooltip>
141143
);
142144
}
@@ -151,7 +153,7 @@ export const SearchFilterLabel = ({ aggregation, field }: Props) => {
151153
<PreviewImage src={container.platform?.properties?.logoUrl} alt={container.properties?.name} />
152154
)}
153155
<span>
154-
{truncatedDisplayName} ({countText})
156+
{truncatedDisplayName} ({formatNumber(countText)})
155157
</span>
156158
</Tooltip>
157159
);
@@ -163,7 +165,7 @@ export const SearchFilterLabel = ({ aggregation, field }: Props) => {
163165
const truncatedDomainName = displayName.length > 25 ? `${displayName.slice(0, 25)}...` : displayName;
164166
return (
165167
<Tooltip title={displayName}>
166-
<DomainLink domain={domain} name={truncatedDomainName} />({countText})
168+
<DomainLink domain={domain} name={truncatedDomainName} />({formatNumber(countText)})
167169
</Tooltip>
168170
);
169171
}
@@ -175,7 +177,7 @@ export const SearchFilterLabel = ({ aggregation, field }: Props) => {
175177
return (
176178
<Tooltip title={displayName}>
177179
<span>
178-
{truncatedDomainName} ({countText})
180+
{truncatedDomainName} ({formatNumber(countText)})
179181
</span>
180182
</Tooltip>
181183
);
@@ -186,7 +188,7 @@ export const SearchFilterLabel = ({ aggregation, field }: Props) => {
186188
}
187189
return (
188190
<>
189-
{aggregation.value} ({countText})
191+
{aggregation.value} ({formatNumber(countText)})
190192
</>
191193
);
192194
};

docker/kafka-setup/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ FROM confluentinc/cp-base-new:6.1.4 as confluent_base
44
# Based on https://github.com/blacktop's alpine kafka build
55
FROM python:3-alpine
66

7-
ENV KAFKA_VERSION 2.8.1
7+
ENV KAFKA_VERSION 2.8.2
88
ENV SCALA_VERSION 2.13
99

1010
# Set the classpath for JARs required by `cub`

docs-website/sidebars.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ module.exports = {
150150
"metadata-ingestion/schedule_docs/intro",
151151
"metadata-ingestion/schedule_docs/cron",
152152
"metadata-ingestion/schedule_docs/airflow",
153+
"metadata-ingestion/schedule_docs/kubernetes",
153154
],
154155
},
155156
// {

metadata-ingestion-modules/airflow-plugin/setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ def get_long_description():
2828
"pydantic>=1.5.1",
2929
"apache-airflow >= 1.10.2",
3030
"acryl-datahub[airflow] >= 0.8.36",
31+
# Pinned dependencies to make dependency resolution faster.
32+
"sqlalchemy==1.3.24",
3133
}
3234

3335

@@ -114,7 +116,6 @@ def get_long_description():
114116
"Programming Language :: Python",
115117
"Programming Language :: Python :: 3",
116118
"Programming Language :: Python :: 3 :: Only",
117-
"Programming Language :: Python :: 3.6",
118119
"Programming Language :: Python :: 3.7",
119120
"Programming Language :: Python :: 3.8",
120121
"Programming Language :: Python :: 3.9",
@@ -131,7 +132,7 @@ def get_long_description():
131132
],
132133
# Package info.
133134
zip_safe=False,
134-
python_requires=">=3.6",
135+
python_requires=">=3.7",
135136
package_dir={"": "src"},
136137
packages=setuptools.find_namespace_packages(where="./src"),
137138
entry_points=entry_points,

metadata-ingestion/docs/sources/dbt/dbt.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ meta_mapping:
3535
operation: "add_term"
3636
config:
3737
term: "Finance_test"
38+
terms_list:
39+
match: ".*"
40+
operation: "add_terms"
41+
config:
42+
separator: ","
3843
```
3944
</TabItem>
4045
<TabItem value="json" label="JSON">
@@ -66,6 +71,11 @@ meta_mapping:
6671
"operation": "add_term",
6772
"config": {"term": "Finance_test"},
6873
},
74+
"terms_list": {
75+
"match": ".*",
76+
"operation": "add_terms",
77+
"config": {"separator": ","},
78+
},
6979
}
7080
```
7181
</TabItem>
@@ -74,10 +84,11 @@ meta_mapping:
7484
We support the following operations:
7585
1. add_tag - Requires ```tag``` property in config.
7686
2. add_term - Requires ```term``` property in config.
77-
3. add_owner - Requires ```owner_type``` property in config which can be either user or group. Optionally accepts the ```owner_category``` config property which you can set to one of ```['TECHNICAL_OWNER', 'BUSINESS_OWNER', 'DATA_STEWARD', 'DATAOWNER'``` (defaults to `DATAOWNER`).
87+
3. add_terms - Accepts an optional ```separator``` property in config.
88+
4. add_owner - Requires ```owner_type``` property in config which can be either user or group. Optionally accepts the ```owner_category``` config property which you can set to one of ```['TECHNICAL_OWNER', 'BUSINESS_OWNER', 'DATA_STEWARD', 'DATAOWNER'``` (defaults to `DATAOWNER`).
7889

7990
Note:
80-
1. Currently, dbt meta mapping is only supported for meta elements defined at the model level (not supported for columns).
91+
1. The dbt `meta_mapping` config works at the model level, while the `column_meta_mapping` config works at the column level. The `add_owner` operation is not supported at the column level.
8192
2. For string meta properties we support regex matching.
8293

8394
With regex matching, you can also use the matched value to customize how you populate the tag, term or owner fields. Here are a few advanced examples:
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Using Kubernetes
2+
3+
If you have deployed DataHub using our official [helm charts](https://github.com/acryldata/datahub-helm) you can use the
4+
datahub ingestion cron subchart to schedule ingestions.
5+
6+
Here is an example of what that configuration would look like in your **values.yaml**:
7+
8+
```yaml
9+
datahub-ingestion-cron:
10+
enabled: true
11+
crons:
12+
mysql:
13+
schedule: "0 * * * *" # Every hour
14+
recipe:
15+
configmapName: recipe-config
16+
fileName: mysql_recipe.yml
17+
```
18+
19+
This assumes the pre-existence of a Kubernetes ConfigMap which holds all recipes being scheduled in the same namespace as
20+
where the cron jobs will be running.
21+
22+
An example could be:
23+
```yaml
24+
apiVersion: v1
25+
kind: ConfigMap
26+
metadata:
27+
name: recipe-config
28+
data:
29+
mysql_recipe.yml: |-
30+
source:
31+
type: mysql
32+
config:
33+
# Coordinates
34+
host_port: <MYSQL HOST>:3306
35+
database: dbname
36+
37+
# Credentials
38+
username: root
39+
password: example
40+
41+
sink:
42+
type: datahub-rest
43+
config:
44+
server: http://<GMS_HOST>:8080
45+
```
46+
47+
For more information, please see the [documentation](https://github.com/acryldata/datahub-helm/tree/master/charts/datahub/subcharts/datahub-ingestion-cron) of this sub-chart.

0 commit comments

Comments
 (0)