[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-05(UTC)"],[[["\u003cp\u003eThis pseudocode details a procedure for using the Data Lineage API to retrieve data lineage links from multiple regions, specifying the number of links to fetch.\u003c/p\u003e\n"],["\u003cp\u003eThe process involves creating and managing lists of regions, unreachable regions, and found links, as well as variables for pagination and tracking the last region processed.\u003c/p\u003e\n"],["\u003cp\u003eIt utilizes parallel calls to the \u003ccode\u003eprojects.locations.searchLinks\u003c/code\u003e API endpoint in each region, handling both successful and failed responses and dealing with the sorting of the regions alphabetically.\u003c/p\u003e\n"],["\u003cp\u003ePagination is managed through page tokens, which are processed to filter regions and then appended with the last region's name for use in subsequent calls.\u003c/p\u003e\n"],["\u003cp\u003eThe pseudocode outlines how to handle cases where fewer than the requested number of links are found, including making an additional request in the last region to get the correct \u003ccode\u003enextPageToken\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Fetch lineage links from multiple regions\n\nThe following pseudocode outlines a procedure you can follow using\nthe Data Lineage API to fetch data lineage links\nfrom all available regions.\n\n1. Input setup:\n - `linksToFetch` = 5 (number of links to fetch from all regions)\n - `regionalPageToken` = \"\" (last received regional page token used for pagination)\n2. Create:\n 1. list of all regions to fan-out called `regions`.\n 2. list of unreachable regions called `unreachable`.\n 3. an empty list of found links called `foundLinks`.\n 4. an empty variable `nextPageToken` and `nextRegionalPageToken`.\n 5. an empty variable `lastRegion`.\n 6. an empty variable `lastRegionLinksCount`.\n3. Sort `regions` alphabetically.\n4. Parse `regionalPageToken`\n 1. If it is empty then continue to step 5\n 2. If it is not empty then\n 1. parse `regionalPageToken` by splitting it by first dot into two segments\n 2. filter out regions by taking only the ones that are after (in alphabetical order) the first segment from parsed `regionalPageToken`.\n 3. store the second segment aside to use it in all [projects.locations.searchLinks](/dataplex/docs/reference/data-lineage/rest/v1/projects.locations/searchLinks) calls.\n5. Make a call to [projects.locations.searchLinks](/dataplex/docs/reference/data-lineage/rest/v1/projects.locations/searchLinks) in each region in the `regions` list in parallel.\n6. Wait for all requests to complete.\n7. Filter out successful responses and store failed region names in the `unreachable` list.\n8. For each of the responses (starting with first region in alphabetical order)\n 1. if no links were returned along with a non empty page token\n 1. store region name in `lastRegion`.\n 2. save received pageToken in `nextPageToken`.\n 3. ignore the remaining responses.\n 2. otherwise\n 1. store region name in `lastRegion`.\n 2. save received links in `foundLinks` (up to `linksToFetch`).\n 3. save received pageToken in `nextPageToken`.\n 4. store number of taken links from the response in `lastRegionLinksCount`.\n 5. if `foundLinks` is less than `linksToFetch`\n 1. continue the pseudocode with the next received response in the alphabetical order.\n 6. if `foundLinks` equals `linksToFetch`\n 1. make another request to [projects.locations.searchLinks](/dataplex/docs/reference/data-lineage/rest/v1/projects.locations/searchLinks) endpoint in the same region but set the `pageSize` parameter to the value of `lastRegionLinksCount`.\n 2. store received pageToken in `nextPageToken`.\n 3. continue to step 9\n9. Prepend `nextPageToken` with the `lastRegion` (i.e. `[region].[receivedNextPageToken]`) to create `nextRegionalPageToken` to handle pagination in consecutive calls."]]