BlackbitDigitalCommerce / pimcore-data-director

Import Bundle for Pimcore
16 stars 3 forks source link

Filter condition from store table #112

Closed betterapp closed 1 year ago

betterapp commented 1 year ago

Hello

We have Data Port and filter condition like this:

image

As I know this filter condition use query table.

Is it possible to use somehow store table for specified field ?

BlackbitDevs commented 1 year ago

There is a checkbox directly above the filter condition field to configure if inheritance shall be used for the database queries (aka if query or store tables should be used):

Bildschirmfoto 2023-08-02 um 15 58 33

Currently there is no convenience helper to filter a single field from the store table why other condition parts use the query table. But of course you could do this with a subselect.

If you do not want to use a subselect you could remove the SendToSAP = '1' condition part and add a raw data field with data query selector withoutInheritance:SendToSAP. Then in attribute mapping you could check its value skip this item if value != 1. But of course this will cause quite a high load as the raw data processing then gets started also for objects which would have been filtered out by the SendToSAP = '1' SQL condition right at the beginning.

So I would recommend to disable the Using inheritance checkbox if the whole query shall be based in store table. And if not, I would use a subselect.