DatahubAPI interface

An interface representing datahub related APIs

Methods

openDatahubWizardDialog(DatahubWizardDialogConfig)

Opens the datahub wizard dialog

openDialog(DatahubSelectorDialogConfig)

Opens the datahub compact view dialog

Method Details

openDatahubWizardDialog(DatahubWizardDialogConfig)

Opens the datahub wizard dialog

function openDatahubWizardDialog(config: DatahubWizardDialogConfig): Promise<DatahubWizardDialogResult>

Parameters

config
DatahubWizardDialogConfig

The configuration of the datahub wizard dialog, including:

  • datahubCompactViewPageConfig: DatahubCompactViewPageConfig DatahubCompactViewPageConfig: - headerDialogConfig: DatahubHeaderDialogConfig DatahubHeaderDialogConfig: - dialogTitleLocalized: String - dialogTitle: String - dialogAdditionalInfo: String - dialogDescriptionLocalized: String - dialogDescription: String - learnMorelink: String - datahubCompactViewConfig: DatahubCompactViewConfig DatahubCompactViewConfig: - displayColumns – An array - the columns we allow in the table - optional with default value. - dialogTitleLocalized – (Deprecated) String - The title of the dialog (localization key) - optional. - dialogDescriptionLocalized – String - The sub-title of the dialog (localization key) - optional. - supportedTypes - An array of DatahubItemType what to show at all - optional. - contextInfo – The context object - where the user is - what workspace is in use, is it my workspace, etc - optional. - datahubTableHost – String - Where the Datahub is hosted (L1, Create Report, Notebook, Shortcut) - multiSelectionEnabled - Boolean - Multi-selection of items is possible when this flag is enabled - by default the value is 'false'. - datahubButtonUserChoicesByType: It's a dictionary where the key is DatahubItemType and the value is collection of DatahubButton[] DatahubButton: - actionId: String - the ID of the action (for example: “CreateReport” or “ConnectToSQL”) - nameLocalized – The name of the button for example “Create a report” (localization key - should be added) - tooltipLocalized: The tooltip when hover on the button (localization key - should be added), optional - isAllowed: A callback function, which gets Item and returns a Boolean (whether to allow this action or not) – this function called when the user selected any item from the datahub list, optional - isDisable: A callback function, which gets Item and returns a Boolean (whether to marks the button as a disabled one or not) – this function called when the user selected any item from the datahub list, optional - shouldIncludeFuncByItemType: A dictionary where the key is DatahubItemType and the value is callback function - the function gets the 'item' as input and defines whether to display the item in the table or not (filtering in the client), for example, showing only datasets with read permission - optional. - filterDatahubByTypes - An array of strings - will open the datahub compact view filter by the values in the array. - learnMorelink - includes a string linkText and link url linkUrl. The default behavior is that learn more link is not visible, until the host customize it. Optional. - dialogAdditionalInfo - String - Additional inforamation content. Will appear only if learnMorelink is defined, optional.
  • oneLakeExplorerPageConfig: OneLakeExplorerPageConfig OneLakeExplorerPageConfig: - headerDialogConfig: DatahubHeaderDialogConfig DatahubHeaderDialogConfig: - dialogTitleLocalized: String - dialogTitle: String - dialogAdditionalInfo: String - dialogDescriptionLocalized: String - dialogDescription: String - learnMorelink: String - onelakeExplorerConfig: OnelakeExplorerConfig OnelakeExplorerConfig: - onelakeItem: OnelakeExplorerItem OnelakeExplorerItem: - workspaceObjectId: String, the selected item workspace object id - itemObjectId: String, the selected item object id - itemDisplayName: String, the selected item display name - fabricItemType: ExtendedItemTypeV2 - onelakeExplorerTypes: OnelakeExplorerType - includeTitleIcon: Boolean - areRootNodesCheckable: Boolean - localizedContentTitle: String - submitButtonName: String, the name is the Submit button

Returns

A promise which resolves when the dialog is closed - the result is DatahubWizardDialogResult object which including:

  • datahubCompactViewResult - An object with selectedDatahubItem as key, and the value is collection of SelectedDatahubItem[] SelectedDatahubItem: - workspaceObjectId: String, the selected item workspace object id - itemObjectId: String, the selected item object id - datahubItemUI: BaseDatahubItemUI BaseDatahubItemUI: - itemObjectId: String, The item object id - displayName: String, The item display name - workspaceName: String, The item workspace name - fabricItemType: String, The item type - description: String, The item description - lastVisitedTimeUTCEpochTime: Number, the last time item was visited - datasourceReferences: DatasourceReference - dsr: String, the item datasource reference - ownerUsers: Any, the users owners of the item
  • onelakeExplorerResult - An object representing OnelakeExplorerResult OnelakeExplorerResult: - selectedPath: String, the path selected in the item - selectedNodeName: String, the node selected in the item - workspaceObjectId: String, the selected item workspace object id - itemObjectId: String, the selected item object id

openDialog(DatahubSelectorDialogConfig)

Opens the datahub compact view dialog

function openDialog(config: DatahubSelectorDialogConfig): Promise<DatahubSelectorDialogResult>

Parameters

config
DatahubSelectorDialogConfig

The configuration of the datahub selector dialog, including:

  • displayColumns – An array - the columns we allow in the table - optional with default value.
  • dialogTitleLocalized – (Deprecated) String - The title of the dialog (localization key) - optional.
  • dialogDescriptionLocalized – String - The sub-title of the dialog (localization key) - optional.
  • supportedTypes - An array of DatahubItemType what to show at all - optional.
  • contextInfo – The context object - where the user is - what workspace is in use, is it my workspace, etc - optional.
  • datahubTableHost – String - Where the Datahub is hosted (L1, Create Report, Notebook, Shortcut)
  • multiSelectionEnabled - Boolean - Multi-selection of items is possible when this flag is enabled - by default the value is 'false'.
  • datahubButtonUserChoicesByType: It's a dictionary where the key is DatahubItemType and the value is collection of DatahubButton[] DatahubButton: - actionId: String - the ID of the action (for example: “CreateReport” or “ConnectToSQL”) - nameLocalized – The name of the button for example “Create a report” (localization key - should be added) - tooltipLocalized: The tooltip when hover on the button (localization key - should be added), optional - isAllowed: A callback function, which gets Item and returns a Boolean (whether to allow this action or not) – this function called when the user selected any item from the datahub list, optional - isDisable: A callback function, which gets Item and returns a Boolean (whether to marks the button as a disabled one or not) – this function called when the user selected any item from the datahub list, optional
  • shouldIncludeFuncByItemType: A dictionary where the key is DatahubItemType and the value is callback function - the function gets the 'item' as input and defines whether to display the item in the table or not (filtering in the client), for example, showing only datasets with read permission - optional.
  • filterDatahubByTypes - An array of strings - will open the datahub compact view filter by the values in the array.
  • learnMorelink - includes a string linkText and link url linkUrl. The default behavior is that learn more link is not visible, until the host customize it. Optional.
  • dialogAdditionalInfo - String - Additional inforamation content. Will appear only if learnMorelink is defined, optional.

Returns

A promise which resolves when the dialog is closed - the result is DatahubSelectorDialogResult object which including:

  • selectedDatahubItemObjectIds - The selected Item object Ids from the list.
  • buttonUserChoiceDatahub - The selected button (DatahubButton) - provided from the config