This is an automated email from the ASF dual-hosted git repository. yumeng pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/incubator-devlake-website.git
commit 10ccdef4a8899d49b60935212ec95945fc2c0603 Author: Yumeng Wang <[email protected]> AuthorDate: Fri Sep 9 15:16:24 2022 +0800 Update customize.md Fixed some phrasing and format --- docs/Plugins/customize.md | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/docs/Plugins/customize.md b/docs/Plugins/customize.md index 7ed15b67c..7dfd11491 100644 --- a/docs/Plugins/customize.md +++ b/docs/Plugins/customize.md @@ -8,19 +8,22 @@ description: > ## Summary -This plugin provides user the ability to create/delete columns and extract data from some raw layer tables. +This plugin provides users the ability to create/delete columns and extract data from certain raw layer tables. The columns created with this plugin must be start with the prefix `x_` -**NOTE:** All columns created by this plugin are of datatype `VARCHAR(255)` +**NOTE:** All columns created by this plugin are of the datatype `VARCHAR(255)` ## Sample Request -To extract data, select `Advanced Mode` on the `Create Pipeline Run` page and paste a JSON config like the following: -The below example demonstrates how to extract status name from the table `_raw_jira_api_issues` and assign it to the `x_test` column of the table `issues`. -We leverage the package `https://github.com/tidwall/gjson` to extract value from the JSON. For the extraction syntax, please refer to the [docs](https://github.com/tidwall/gjson/blob/master/SYNTAX.md) -`table` domain layer table name -`rawDataTable` raw layer table, from which we extract values by json path -`rawDataParams` the filter to select records from the raw layer table. **the value should be a string not an object** -`mapping` the extraction rule, the key is extension field name, the value is json path +To extract data, switch to `Advanced Mode` on the the first step of creating a Blueprint and paste a JSON config as the following: + +The example below demonstrates how to extract status name from the table `_raw_jira_api_issues` and assign it to the `x_test` column of the table `issues`. +We leverage the package `https://github.com/tidwall/gjson` to extract value from the JSON. For the extraction syntax, please refer to this [docs](https://github.com/tidwall/gjson/blob/master/SYNTAX.md) + +- `table`: domain layer table name +- `rawDataTable`: raw layer table, from which we extract values by json path +- `rawDataParams`: the filter to select records from the raw layer table (**The value should be a string not an object**) +- `mapping` the extraction rule; the key is the extension field name; the value is json path + ```json [ [ @@ -93,4 +96,4 @@ Create extension column `x_test` for the table `issues` } ``` Drop the column `x_text` for the table `issues` -> DELETE /plugins/customize/issues/fields/x_test \ No newline at end of file +> DELETE /plugins/customize/issues/fields/x_test
