Skip to content

Commit 7fb3d5e

Browse files
encodeURIComponent namespace and name in GET (column)lineage requests (#2984)
* encodeURIComponent namespace and name in GET lineage request Signed-off-by: Maarten Hubrechts <[email protected]> * Use same coding style for encoding as in jobs and datasets requests Signed-off-by: Maarten Hubrechts <[email protected]> --------- Signed-off-by: Maarten Hubrechts <[email protected]>
1 parent 41d9d3d commit 7fb3d5e

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

web/src/store/requests/columnlineage.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ export const getColumnLineage = async (
1515
name: string,
1616
depth: number
1717
) => {
18-
const nodeId = generateNodeId(nodeType, namespace, name)
19-
// Node ID cannot be URL encoded
18+
const encodedNamespace = encodeURIComponent(namespace)
19+
const encodedName = encodeURIComponent(name)
20+
const nodeId = generateNodeId(nodeType, encodedNamespace, encodedName)
2021
const url = `${API_URL}/column-lineage?nodeId=${nodeId}&depth=${depth}&withDownstream=true`
2122
return genericFetchWrapper(url, { method: 'GET' }, 'fetchColumnLineage')
2223
}

web/src/store/requests/lineage.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ export const getLineage = async (
1212
name: string,
1313
depth: number
1414
) => {
15-
const nodeId = generateNodeId(nodeType, namespace, name)
16-
// Node ID cannot be URL encoded
15+
const encodedNamespace = encodeURIComponent(namespace)
16+
const encodedName = encodeURIComponent(name)
17+
const nodeId = generateNodeId(nodeType, encodedNamespace, encodedName)
1718
const url = `${API_URL}/lineage?nodeId=${nodeId}&depth=${depth}`
1819
return genericFetchWrapper(url, { method: 'GET' }, 'fetchLineage')
1920
}

0 commit comments

Comments
 (0)