cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Apply filter on data reading via multiple sources

sandeepmalhotra
Participant
0 Likes
363

Hello Everyone 

I have created an entity set in SAP CAP which has few columns from on-premise entity set and few from HANA cloud table.

Sample Entity Set

 

entity MyEntity       as
    select from onpremise.Entity as a inner join db.AnotherTable as b
 on a.pk = b.fpk {
      key a.pk as key,
        a.p1 as p1,
        a.p2 as p2,
        b.p3 as p3,
        b.p4 as p4
}

Property pf,p1 and p2 from on-premise entity service but p3 and p4 from HANA cloud . HANA cloud Table is created in db folder.

I have successfully read the data using SAP cloud SDK from on-premise and cds.ql from hana cloud . 

If UI passes $filter like p1=‘v1’ and p3=‘v2' (mix of property from on-premise and hana cloud). How I can split the filter in better way so that I can use respective filter while reading from on-premise and hana cloud .

Is there any generic way to handle $filter,$top and $skip. Are there any specific cds method I need to use to perform the filter and other odata operations

Kindly guide me

Thanks

Sandeep

 

 

Accepted Solutions (0)

Answers (0)