Skip to main content

Extending Pega Knowledge Loader for other repositories

Out of the box, you can configure Pega Knowledge Loader™ to import content from SharePoint or Confluence repositories, but you can also configure it for other types of repositories that are not supported out of the box. This topic provides instructions on how to configure the Knowledge Loader, send the data to a Pega Knowledge Buddy™ and extract content from an unsupported file type.

Configuring the Knowledge Loader

Perform the following steps to configure Knowledge Loader to retrieve content from repositories that are not supported out of the box (for example, Google Cloud):

  1. In Infinity Studio, create a custom Case Type for the Knowledge Loader that extends from the Pegaknowledge-Work-Loader-Repository class.
  2. Add input fields to the View rule of the case to create a user interface for the repository.
  3. Set up authentication based on the repository's API requirements.
  4. Configure authentication for Knowledge Buddy.
  5. Send data to Knowledge Buddy.
  6. Enable the job schedulers and queue processor.
  7. Extract content from unsupported file types, if necessary.
  8. Map UI fields to required properties.
    Nota: For detailed instructions on how to perform the steps presented in this section, see Extend the Pega Knowledge Loader application.

Retrieving content from an external repository

For the Knowledge Loader to retrieve content from an external repository, you must first connect the repository to the Knowledge Loader application.

GetRepositoryFiles_Extn rule

To retrieve files and folders from a source repository using the Knowledge Loader application, configure the GetRepositoryFiles_Extn rule and set the following properties on the D_RepositoryFiles Data Page:

Property name Description

.ID

Unique ID of the document in the external repository.

.relativePath

Relative path of the file in the external repository.

.absolutePath

Absolute path of the file in the external repository.

.fileName

Name of the file.

.fileExtension

Extension of the file (for example, .txt, .pdf, .docx)

.timeLastModified

Timestamp of the last modification which is used to track updates in the repository.

.version

Version of the file.

.pxObjClass

For folders, enter Pega-API-Storage; for files, enter Pega-API-Storage-File.

GetfileStream_Extn rule

To retrieve file content from the source repository using the GetfileStream_Extn rule, set the following property on the D_RepositoryFileStream Data Page:

Property name Description

.content

The Base64 encoded content of the file.

GetRepositoryFileMetaData_Extn rule

To retrieve file metadata from the source repository using the GetRepositoryFileMetaData_Extn rule, set the following properties on the D_RepositoryFileMetaData Data Page:

Property name Description

.ID

Unique ID of the document from the source repository.

.relativePath

Relative path of the file in the source repository.

.absolutePath

Absolute path of the file in the source repository.

.fileName

Name of the file.

.fileExtension

Extension of the file (for example, .txt, .pdf, .docx).

.timeLastModified

Timestamp of the last modification, used to check for updates in the source repository.

.version

Version number of the file.

.CustomAttributes

Custom attributes added in the Cloud repository for each file.

.CustomAttributes.pyLabel

Name of the custom attribute.

.CustomAttributes.pyValueLabel

Value of the custom attribute.

Sending data to Knowledge Buddy

The Ingestion API sends data to Knowledge Buddy, including all file metadata. To customize attributes, modify properties, or adjust chunking, use the PrepareContentForIngestion_Extn Data Transform.

Set the following properties on the Ingestion API:

Property name Description

objectId

The unique ID of the document in the source repository.

dataSource

The Knowledge Buddy data source to ingest files into.

collection

The Knowledge Buddy collection for article ingestion.

title

The name of the file as document title.

roles

The role used to secure access to ingested documents.

content

The file content to be ingested.

URL

The URL for the external access to the document.

version

The version number used to track file updates.

repository

The name of the source repository (for example, Google Cloud, Box).

timeLastModified

The timestamp of the last modification.

user-defined attributes

The custom attributes added to the files in the Cloud repository.

Extracting content from unsupported file types

To extract content from unsupported file types, configure the following properties in the ExtractFileContent_Extn Data Transform:

Property name Description

Param.FileStream

Stores the Base64 encoded file stream.

Param.FileContent

Stores the decoded file content.


This Topic is available in the following Module:

If you are having problems with your training, please review the Pega Academy Support FAQs.

Este conteúdo foi útil?

Quer nos ajudar a melhorar esse conteúdo?

We'd prefer it if you saw us at our best.

Pega Academy has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice