Skip to content

Commit 880d6af

Browse files
enhancement(downstream-asset): modify payload for fetching downstream assets
1 parent a4e3991 commit 880d6af

File tree

1 file changed

+190
-70
lines changed

1 file changed

+190
-70
lines changed

adapters/api/get-downstream-assets.js

+190-70
Original file line numberDiff line numberDiff line change
@@ -26,43 +26,103 @@ export default async function getDownstreamAssets(
2626
};
2727

2828
var raw = stringify({
29-
guid: guid,
30-
size: Math.max(Math.ceil(ASSETS_LIMIT / totalModifiedFiles), 1),
31-
from: 0,
32-
depth: 21,
33-
direction: "OUTPUT",
34-
entityFilters: {
35-
condition: "AND",
36-
criterion: [
37-
{
38-
attributeName: "__typeName",
39-
operator: "not_contains",
40-
attributeValue: "Process",
41-
},
42-
{
43-
attributeName: "__state",
44-
operator: "eq",
45-
attributeValue: "ACTIVE",
46-
},
47-
],
29+
"guid": guid,
30+
"size": Math.max(Math.ceil(ASSETS_LIMIT / totalModifiedFiles), 1),
31+
"from": 0,
32+
"depth": 21,
33+
"direction": "OUTPUT",
34+
"entityFilters": {
35+
"condition": "AND",
36+
"criterion": [
37+
{
38+
"attributeName": "__state",
39+
"operator": "eq",
40+
"attributeValue": "ACTIVE"
41+
},
42+
{
43+
"attributeName": "__typeName",
44+
"operator": "neq",
45+
"attributeValue": "DbtProcess"
46+
},
47+
{
48+
"attributeName": "__typeName",
49+
"operator": "neq",
50+
"attributeValue": "DbtColumnProcess"
51+
},
52+
{
53+
"attributeName": "__typeName",
54+
"operator": "neq",
55+
"attributeValue": "DataEntityMappingProcess"
56+
},
57+
{
58+
"attributeName": "__typeName",
59+
"operator": "neq",
60+
"attributeValue": "DataAttributeMappingProcess"
61+
},
62+
{
63+
"attributeName": "__typeName",
64+
"operator": "neq",
65+
"attributeValue": "Process"
66+
},
67+
{
68+
"attributeName": "__typeName",
69+
"operator": "neq",
70+
"attributeValue": "ColumnProcess"
71+
},
72+
{
73+
"attributeName": "__typeName",
74+
"operator": "neq",
75+
"attributeValue": "BIProcess"
76+
},
77+
{
78+
"attributeName": "__typeName",
79+
"operator": "neq",
80+
"attributeValue": "FivetranProcess"
81+
},
82+
{
83+
"attributeName": "__typeName",
84+
"operator": "neq",
85+
"attributeValue": "FivetranColumnProcess"
86+
}
87+
]
4888
},
49-
attributes: [
50-
"name",
51-
"description",
52-
"userDescription",
53-
"sourceURL",
54-
"qualifiedName",
55-
"connectorName",
56-
"certificateStatus",
57-
"certificateUpdatedBy",
58-
"certificateUpdatedAt",
59-
"ownerUsers",
60-
"ownerGroups",
61-
"classificationNames",
62-
"meanings",
89+
"entityTraversalFilters": {
90+
"condition": "AND",
91+
"criterion": [
92+
{
93+
"attributeName": "__state",
94+
"operator": "eq",
95+
"attributeValue": "ACTIVE"
96+
}
97+
]
98+
},
99+
"relationshipTraversalFilters": {
100+
"condition": "AND",
101+
"criterion": [
102+
{
103+
"attributeName": "__state",
104+
"operator": "eq",
105+
"attributeValue": "ACTIVE"
106+
}
107+
]
108+
},
109+
"attributes": [
110+
"name",
111+
"description",
112+
"userDescription",
113+
"sourceURL",
114+
"qualifiedName",
115+
"connectorName",
116+
"certificateStatus",
117+
"certificateUpdatedBy",
118+
"certificateUpdatedAt",
119+
"ownerUsers",
120+
"ownerGroups",
121+
"classificationNames",
122+
"meanings"
63123
],
64-
excludeMeanings: false,
65-
excludeClassifications: false,
124+
"excludeMeanings": false,
125+
"excludeClassifications": false
66126
});
67127

68128
var requestOptions = {
@@ -168,43 +228,103 @@ export async function getDownstreamLineageForAssets({
168228
};
169229

170230
var raw = stringify({
171-
guid: guid,
172-
size: Math.max(Math.ceil(ASSETS_LIMIT / totalModifiedFiles), 1),
173-
from: 0,
174-
depth: 21,
175-
direction: "OUTPUT",
176-
entityFilters: {
177-
condition: "AND",
178-
criterion: [
179-
{
180-
attributeName: "__typeName",
181-
operator: "not_contains",
182-
attributeValue: "Process",
183-
},
184-
{
185-
attributeName: "__state",
186-
operator: "eq",
187-
attributeValue: "ACTIVE",
188-
},
189-
],
231+
"guid": guid,
232+
"size": Math.max(Math.ceil(ASSETS_LIMIT / totalModifiedFiles), 1),
233+
"from": 0,
234+
"depth": 21,
235+
"direction": "OUTPUT",
236+
"entityFilters": {
237+
"condition": "AND",
238+
"criterion": [
239+
{
240+
"attributeName": "__state",
241+
"operator": "eq",
242+
"attributeValue": "ACTIVE"
243+
},
244+
{
245+
"attributeName": "__typeName",
246+
"operator": "neq",
247+
"attributeValue": "DbtProcess"
248+
},
249+
{
250+
"attributeName": "__typeName",
251+
"operator": "neq",
252+
"attributeValue": "DbtColumnProcess"
253+
},
254+
{
255+
"attributeName": "__typeName",
256+
"operator": "neq",
257+
"attributeValue": "DataEntityMappingProcess"
258+
},
259+
{
260+
"attributeName": "__typeName",
261+
"operator": "neq",
262+
"attributeValue": "DataAttributeMappingProcess"
263+
},
264+
{
265+
"attributeName": "__typeName",
266+
"operator": "neq",
267+
"attributeValue": "Process"
268+
},
269+
{
270+
"attributeName": "__typeName",
271+
"operator": "neq",
272+
"attributeValue": "ColumnProcess"
273+
},
274+
{
275+
"attributeName": "__typeName",
276+
"operator": "neq",
277+
"attributeValue": "BIProcess"
278+
},
279+
{
280+
"attributeName": "__typeName",
281+
"operator": "neq",
282+
"attributeValue": "FivetranProcess"
283+
},
284+
{
285+
"attributeName": "__typeName",
286+
"operator": "neq",
287+
"attributeValue": "FivetranColumnProcess"
288+
}
289+
]
290+
},
291+
"entityTraversalFilters": {
292+
"condition": "AND",
293+
"criterion": [
294+
{
295+
"attributeName": "__state",
296+
"operator": "eq",
297+
"attributeValue": "ACTIVE"
298+
}
299+
]
300+
},
301+
"relationshipTraversalFilters": {
302+
"condition": "AND",
303+
"criterion": [
304+
{
305+
"attributeName": "__state",
306+
"operator": "eq",
307+
"attributeValue": "ACTIVE"
308+
}
309+
]
190310
},
191-
attributes: [
192-
"name",
193-
"description",
194-
"userDescription",
195-
"sourceURL",
196-
"qualifiedName",
197-
"connectorName",
198-
"certificateStatus",
199-
"certificateUpdatedBy",
200-
"certificateUpdatedAt",
201-
"ownerUsers",
202-
"ownerGroups",
203-
"classificationNames",
204-
"meanings",
311+
"attributes": [
312+
"name",
313+
"description",
314+
"userDescription",
315+
"sourceURL",
316+
"qualifiedName",
317+
"connectorName",
318+
"certificateStatus",
319+
"certificateUpdatedBy",
320+
"certificateUpdatedAt",
321+
"ownerUsers",
322+
"ownerGroups",
323+
"classificationNames",
324+
"meanings"
205325
],
206-
excludeMeanings: false,
207-
excludeClassifications: false,
326+
"excludeMeanings": false,
327+
"excludeClassifications": false
208328
});
209329

210330
var requestOptions = {

0 commit comments

Comments
 (0)