[jira] [Updated] (CARBONDATA-3597) Support DataSet merge functionality in Carbon

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (CARBONDATA-3597) Support DataSet merge functionality in Carbon

Akash R Nilugal (Jira)

     [ https://issues.apache.org/jira/browse/CARBONDATA-3597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ravindra Pesala updated CARBONDATA-3597:
----------------------------------------
    Description:
Merge dataset is essential to improve the performance of SCD and CDC scenarios and also it eases the development effort.

The expected behavior as follows.

SQL Syntax

{code}

MERGE INTO [db_name.]target_table [AS target_alias]

USING [db_name.]source_table [AS source_alias]

ON <merge_condition>

[ WHEN MATCHED [ AND <condition> ] THEN <matched_actions> ]

[ WHEN MATCHED [ AND <condition> ] THEN <matched_actions> ]

[ WHEN NOT MATCHED [ AND <condition> ]  THEN <not_matched_actions> ]

{code}

 

DataFrame API

{code}

targetDS.merge(sourceDS, _<condition>_). 

  whenMatched(_<condition>_).

  updateExpr(updateMap).

  insertExpr(insertMap_u).

  whenNotMatched(_<condition>_).

  insertExpr(insertMap).

  whenNotMatchedAndExistsOnlyOnTarget(_<condition>_).

  delete().

  insertHistoryTableExpr(insertMap_d, <table_name>).

  execute()

{code}

 

> Support DataSet merge functionality in Carbon
> ---------------------------------------------
>
>                 Key: CARBONDATA-3597
>                 URL: https://issues.apache.org/jira/browse/CARBONDATA-3597
>             Project: CarbonData
>          Issue Type: New Feature
>            Reporter: Ravindra Pesala
>            Priority: Major
>         Attachments: Support DataSet Merge in CarboonData_V1.docx
>
>
> Merge dataset is essential to improve the performance of SCD and CDC scenarios and also it eases the development effort.
> The expected behavior as follows.
> SQL Syntax
> {code}
> MERGE INTO [db_name.]target_table [AS target_alias]
> USING [db_name.]source_table [AS source_alias]
> ON <merge_condition>
> [ WHEN MATCHED [ AND <condition> ] THEN <matched_actions> ]
> [ WHEN MATCHED [ AND <condition> ] THEN <matched_actions> ]
> [ WHEN NOT MATCHED [ AND <condition> ]  THEN <not_matched_actions> ]
> {code}
>  
> DataFrame API
> {code}
> targetDS.merge(sourceDS, _<condition>_). 
>   whenMatched(_<condition>_).
>   updateExpr(updateMap).
>   insertExpr(insertMap_u).
>   whenNotMatched(_<condition>_).
>   insertExpr(insertMap).
>   whenNotMatchedAndExistsOnlyOnTarget(_<condition>_).
>   delete().
>   insertHistoryTableExpr(insertMap_d, <table_name>).
>   execute()
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)