njnu-seafish commented on issue #18077: URL: https://github.com/apache/dolphinscheduler/issues/18077#issuecomment-4088666019
> Please describe how you want to achieve it. [@njnu-seafish](https://github.com/njnu-seafish) The following SQL query retrieves detailed information about tasks that reference a specific data source. > SELECT b.name project_name, d.name flow_name, a.name task_name, a.task_params FROM t_ds_task_definition a JOIN t_ds_project b ON a.project_code = b.code JOIN t_ds_workflow_task_relation c ON a.code = c.post_task_code JOIN t_ds_workflow_definition d ON c.workflow_definition_code = d.code WHERE a.task_type IN ('SQL','PROCEDURE') AND JSON_UNQUOTE(JSON_EXTRACT(a.task_params, '$.datasource')) = 13 LIMIT 10; This SQL query performs efficiently with task volumes in the thousands. However, for extremely large datasets, consider storing the datasource as a computed column and adding an index to optimize performance. -- 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]
