Skip to content

Commit

Permalink
[Community][minor]: Updating metadata with full_path in SharePoint lo…
Browse files Browse the repository at this point in the history
…ader (#25593)

- **Description:** Updating metadata for sharepoint loader with full
path i.e., webUrl
- **Issue:** NA
- **Dependencies:** NA
- **Tests:** NA
- **Docs** NA

Co-authored-by: dristy.cd <[email protected]>
Co-authored-by: ccurme <[email protected]>
  • Loading branch information
3 people authored Aug 21, 2024
1 parent 34d0417 commit b002702
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ def lazy_load(self) -> Iterator[Document]:
auth_identities = self.authorized_identities(file_id)
if self.load_extended_metadata is True:
extended_metadata = self.get_extended_metadata(file_id)
extended_metadata.update({"source_full_url": target_folder.web_url})
for parsed_blob in blob_parser.lazy_parse(blob):
if self.load_auth is True:
parsed_blob.metadata["authorized_identities"] = auth_identities
Expand All @@ -94,6 +95,7 @@ def lazy_load(self) -> Iterator[Document]:
auth_identities = self.authorized_identities(file_id)
if self.load_extended_metadata is True:
extended_metadata = self.get_extended_metadata(file_id)
extended_metadata.update({"source_full_url": target_folder.web_url})
for parsed_blob in blob_parser.lazy_parse(blob):
if self.load_auth is True:
parsed_blob.metadata["authorized_identities"] = auth_identities
Expand Down Expand Up @@ -130,6 +132,9 @@ def lazy_load(self) -> Iterator[Document]:
blob_part.metadata["authorized_identities"] = auth_identities
if self.load_extended_metadata is True:
blob_part.metadata.update(extended_metadata)
blob_part.metadata.update(
{"source_full_url": target_folder.web_url}
)
yield blob_part

def authorized_identities(self, file_id: str) -> List:
Expand Down

0 comments on commit b002702

Please sign in to comment.