Solved

Multiple Incremental selection fields

  • 5 July 2023
  • 5 replies
  • 99 views

(Using Timextender 20.10.35.64)

I have 2 date fields on a table. I want to load the row if one OR the other fields have changed in the data source. How do I do that?

I tried doing this (see under)  but that caused duplicates because data had already been loaded (when only the loggedat field was the incremental field)

 

 

If I do this (see under) will it only load if both of the fields have changed?

 

icon

Best answer by Thomas Lind 6 July 2023, 14:00

View original

5 replies

Userlevel 6
Badge +5

Hi @htrimas 

The first image is how you set up an OR statement on a table, whether it is a data selection rule or similar it will apply it as an OR statement when you set it up like that.

The issue you experience, would that still happen if you first ran a full load?
Normally when you change the rule to point at a different field you would do this to be sure it applies it correctly.

I will have to do a full load and wait until tomorrow to see if it works as OR. It got me worried that it would insert duplicates…

 

I asked chatgpt, here’s the answer: (is it wrong?)

When you have multiple incremental selection rules defined in Timextender, each rule is evaluated independently using the "AND" operator. This means that all the selection rules must be satisfied for a record to be considered for loading during an incremental load.

For example, let's say you have two incremental selection rules:

  1. Rule 1: Field1 <> Source.Field1
  2. Rule 2: Field2 <> Source.Field2

With these two rules, Timextender will evaluate them independently using the "AND" operator. Both Rule 1 and Rule 2 must be true for a record to be included in the incremental load. If either Rule 1 or Rule 2 evaluates to false, the record will not be loaded.

In other words, the incremental load process checks if both Rule 1 and Rule 2 are satisfied simultaneously. If any of the rules are not met, the record will be skipped.

To achieve the behavior where the record is loaded if any of the rules are satisfied (using the "OR" operator), you will need to use a calculated field as a workaround, as described in a previous response. By creating a calculated field that combines the conditions using the "OR" operator, you can achieve the desired logic.

Userlevel 6
Badge +5

I am not sure I see that as especially helpful. It is not completely wrong it is just a bit confusing. I mean what is it that is described in a previous response.

If you create two rules one below the other it will be seen as OR and when it is two rules in one it is an and.

So for incremental load in one case it will need to be both fields that has an increased number for it to see it as having new rows to add and for the other either field can have an higher value and it will be seen as having new rows.

Also when you do something similar in the ODX, it will automatically set it as OR statements as default.

 

Ok… thanks. I have set two rules again now and fully loaded the table. Hopefully it will not create duplicates if only one of the values have changed. 

Userlevel 6
Badge +5

@htrimas has the issue been resolved? If so can you please help us by marking a best answer above?

Reply