dosubot[bot] commented on issue #7877:
URL: 
https://github.com/apache/incubator-devlake/issues/7877#issuecomment-2285017178

   <!-- Answer -->
   To access and modify the JSON file in your existing project to include the 
new `customize` plugin, you can follow the structure provided in the 
`customize.ts` file. Here is an example of how you can modify your JSON file:
   
   ```json
   {
     "plugins": [
       {
         "plugin": "customize",
         "options": {
           "transformationRules": [
             {
               "table": "commit_files",
               "rawDataTable": "_raw_gitlab_api_commit_files",
               "rawDataParams": "{\"ConnectionId\":1,\"ProjectId\":123}",
               "mapping": {
                 "x_file_path": "file_path",
                 "x_commit_sha": "commit_sha",
                 "x_change_type": "change_type"
               }
             }
           ]
         }
       }
     ]
   }
   ```
   
   This JSON structure includes the `customize` plugin with the specified 
options and transformation rules. Make sure to integrate this JSON snippet into 
the appropriate section of your existing JSON configuration file.
   
   Additionally, you can trigger data extraction by making a POST request to 
`/pipelines`:
   
   ```shell
   curl 'http://localhost:8080/pipelines' \
   --header 'Content-Type: application/json' \
   --data-raw '
   {
       "name": "extract commit files",
       "plan": [
           [
               {
                   "plugin": "customize",
                   "options": {
                       "transformationRules": [
                           {
                               "table": "commit_files",
                               "rawDataTable": "_raw_gitlab_api_commit_files",
                               "rawDataParams": 
"{\"ConnectionId\":1,\"ProjectId\":123}",
                               "mapping": {
                                   "x_file_path": "file_path",
                                   "x_commit_sha": "commit_sha",
                                   "x_change_type": "change_type"
                               }
                           }
                       ]
                   }
               }
           ]
       ]
   }
   '
   ```
   
   For more detailed information on the `customize` plugin, including how to 
list columns, create customized columns, drop columns, and upload CSV files, 
please refer to the [Customize Plugin 
documentation](https://github.com/tidwall/gjson/blob/master/SYNTAX.md) 
<sup>[[1]](https://github.com/apache/incubator-devlake/blob/main/config-ui/src/routes/blueprint/detail/components/advanced-editor/example/customize.ts)</sup><sup>[[2]](https://github.com/apache/incubator-devlake-website/blob/main/docs/Plugins/customize.md)</sup><sup>[[3]](https://github.com/apache/incubator-devlake-website/blob/main/versioned_docs/version-v0.16/Plugins/customize.md)</sup><sup>[[4]](https://github.com/apache/incubator-devlake-website/blob/main/versioned_docs/version-v0.19/Plugins/customize.md)</sup><sup>[[5]](https://github.com/apache/incubator-devlake-website/blob/main/versioned_docs/version-v0.18/Plugins/customize.md)</sup>.
   
   
   <!-- Dosu Comment Footer -->
   *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to