You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2021/12/12 13:47:32 UTC
[GitHub] [dolphinscheduler] zhongjiajie edited a comment on issue #7156: [Feature][Auto DAG NEW] Automatically implement task dependency recommendations
zhongjiajie edited a comment on issue #7156:
URL: https://github.com/apache/dolphinscheduler/issues/7156#issuecomment-991900845
@lenboo Did you ask whether sql parser could parse below sql script or not?
```sql
-- Can the following sql script parser to the following dependencies?
-- users -> target_table
-- orders -> target_table
-- last 3 months registered users
with user_cte as (
select id, name, regist_time
from users
where regist_time > date_sub(current_date, 30 * 3)
)
-- last month orders
, order_cte as (
select id, user_id, amount
from orders
where pay_time > date_sub(current_date, 30)
)
-- Total order amount in last 3 months registered users
insert overwrite target_table
select u.id
, u.name
, sum(o.amount) as total_amount
from user_cte u
join order_cte o on o.user_id = u.id
group by u.id, u.name
```
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org