-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Xu Wang
committed
Mar 15, 2022
1 parent
5535778
commit ff25c37
Showing
11 changed files
with
224 additions
and
0 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
metadata-models/src/main/pegasus/com/linkedin/metadata/key/NotebookKey.pdl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
namespace com.linkedin.metadata.key | ||
|
||
/** | ||
* Key for a Notebook | ||
*/ | ||
@Aspect = { | ||
"name": "notebookKey", | ||
} | ||
record NotebookKey { | ||
/** | ||
* The name of the Notebook tool such as QueryBook, etc. | ||
*/ | ||
@Searchable = { | ||
"fieldName": "tool", | ||
"fieldType": "TEXT_PARTIAL", | ||
"boostScore": 4.0 | ||
} | ||
notebookTool: string | ||
|
||
/** | ||
* Unique id for the Notebook. This id should be globally unique for a Notebook tool even when there are multiple deployments of it. As an example, Notebook URL could be used here for QueryBook such as 'querybook.com/notebook/773' | ||
*/ | ||
notebookId: string | ||
} |
8 changes: 8 additions & 0 deletions
8
metadata-models/src/main/pegasus/com/linkedin/notebook/ChartCell.pdl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace com.linkedin.notebook | ||
|
||
/** | ||
* Chart cell in a notebook, which will present content in chart format | ||
*/ | ||
record ChartCell includes CommonCellAttributes { | ||
|
||
} |
24 changes: 24 additions & 0 deletions
24
metadata-models/src/main/pegasus/com/linkedin/notebook/CommonCellAttributes.pdl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
namespace com.linkedin.notebook | ||
|
||
import com.linkedin.common.ChangeAuditStamps | ||
|
||
/** | ||
* Common attributes for a cell in a Notebook | ||
*/ | ||
record CommonCellAttributes { | ||
|
||
/** | ||
* Title of the cell | ||
*/ | ||
cellTitle: string | ||
|
||
/** | ||
* Unique id for the cell. This id should be globally unique for a Notebook tool even when there are multiple deployments of it. As an example, Notebook URL could be used here for QueryBook such as 'querybook.com/notebook/773/?cellId=1234' | ||
*/ | ||
cellId: string | ||
|
||
/** | ||
* Captures information about who created/last modified/deleted this Notebook cell and when | ||
*/ | ||
changeAuditStamps: ChangeAuditStamps | ||
} |
21 changes: 21 additions & 0 deletions
21
metadata-models/src/main/pegasus/com/linkedin/notebook/EditableNotebookProperties.pdl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
namespace com.linkedin.notebook | ||
|
||
import com.linkedin.common.ChangeAuditStamps | ||
|
||
/** | ||
* Stores editable changes made to properties. This separates changes made from | ||
* ingestion pipelines and edits in the UI to avoid accidental overwrites of user-provided data by ingestion pipelines | ||
*/ | ||
@Aspect = { | ||
"name": "editableNotebookProperties" | ||
} | ||
record EditableNotebookProperties includes ChangeAuditStamps { | ||
/** | ||
* Edited documentation of the Notebook | ||
*/ | ||
@Searchable = { | ||
"fieldType": "TEXT", | ||
"fieldName": "editedDescription", | ||
} | ||
description: optional string | ||
} |
26 changes: 26 additions & 0 deletions
26
metadata-models/src/main/pegasus/com/linkedin/notebook/NotebookCell.pdl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
namespace com.linkedin.notebook | ||
|
||
/** | ||
* A record of all supported cells for a Notebook. Only one type of cell will be non-null. | ||
*/ | ||
record NotebookCell { | ||
/** | ||
* The text cell content. The will be non-null only when all other cell field is null. | ||
*/ | ||
textCell: optional TextCell, | ||
|
||
/** | ||
* The query cell content. The will be non-null only when all other cell field is null. | ||
*/ | ||
queryCell: optional QueryCell, | ||
|
||
/** | ||
* The chart cell content. The will be non-null only when all other cell field is null. | ||
*/ | ||
chartCell: optional ChartCell | ||
|
||
/** | ||
* The type of this Notebook cell | ||
*/ | ||
type: NotebookCellType | ||
} |
22 changes: 22 additions & 0 deletions
22
metadata-models/src/main/pegasus/com/linkedin/notebook/NotebookCellType.pdl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
namespace com.linkedin.notebook | ||
|
||
/** | ||
* Type of Notebook Cell | ||
*/ | ||
enum NotebookCellType { | ||
|
||
/** | ||
* TEXT Notebook cell type. The cell context is text only. | ||
*/ | ||
TEXT_CELL, | ||
|
||
/** | ||
* QUERY Notebook cell type. The cell context is query only. | ||
*/ | ||
QUERY_CELL, | ||
|
||
/** | ||
* CHART Notebook cell type. The cell content is chart only. | ||
*/ | ||
CHART_CELL | ||
} |
14 changes: 14 additions & 0 deletions
14
metadata-models/src/main/pegasus/com/linkedin/notebook/NotebookContent.pdl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
namespace com.linkedin.notebook | ||
|
||
/** | ||
* Content in a Notebook | ||
*/ | ||
@Aspect = { | ||
"name": "notebookContent" | ||
} | ||
record NotebookContent { | ||
/** | ||
* The content of a Notebook which is composed by a list of NotebookCell | ||
*/ | ||
cells: array[NotebookCell] = [] | ||
} |
39 changes: 39 additions & 0 deletions
39
metadata-models/src/main/pegasus/com/linkedin/notebook/NotebookInfo.pdl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
namespace com.linkedin.notebook | ||
|
||
import com.linkedin.common.ChangeAuditStamps | ||
import com.linkedin.common.Url | ||
import com.linkedin.common.CustomProperties | ||
import com.linkedin.common.ExternalReference | ||
|
||
/** | ||
* Information about a Notebook | ||
*/ | ||
@Aspect = { | ||
"name": "notebookInfo" | ||
} | ||
record NotebookInfo includes CustomProperties, ExternalReference { | ||
|
||
/** | ||
* Title of the Notebook | ||
*/ | ||
@Searchable = { | ||
"fieldType": "TEXT_PARTIAL", | ||
"enableAutocomplete": true, | ||
"boostScore": 10.0 | ||
} | ||
title: string | ||
|
||
/** | ||
* Detailed description about the Notebook | ||
*/ | ||
@Searchable = { | ||
"fieldType": "TEXT", | ||
"hasValuesFieldName": "hasDescription" | ||
} | ||
description: optional string | ||
|
||
/** | ||
* Captures information about who created/last modified/deleted this Notebook and when | ||
*/ | ||
changeAuditStamps: ChangeAuditStamps | ||
} |
19 changes: 19 additions & 0 deletions
19
metadata-models/src/main/pegasus/com/linkedin/notebook/QueryCell.pdl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
namespace com.linkedin.notebook | ||
|
||
import com.linkedin.common.AuditStamp | ||
|
||
/** | ||
* Query cell in a Notebook, which will present content in query format | ||
*/ | ||
record QueryCell includes CommonCellAttributes { | ||
|
||
/** | ||
* Raw query to explain some specific logic in a Notebook | ||
*/ | ||
rawQuery: string | ||
|
||
/** | ||
* Captures information about who last executed this query cell and when | ||
*/ | ||
lastExecuted: optional AuditStamp | ||
} |
14 changes: 14 additions & 0 deletions
14
metadata-models/src/main/pegasus/com/linkedin/notebook/TextCell.pdl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
namespace com.linkedin.notebook | ||
|
||
/** | ||
* Text cell in a Notebook, which will present content in text format | ||
*/ | ||
record TextCell includes CommonCellAttributes { | ||
/** | ||
* The actual text in a TextCell in a Notebook | ||
*/ | ||
@Searchable = { | ||
"fieldType": "TEXT" | ||
} | ||
text: string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters