Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone:
I found a code like the following:
LOAD campo1 as MI_CAMPO,
campo1 as CAMPO_CLAVE,
campo1 as CLAVE_TABLA3,
............
FROM TABLE
WHERE Exists(MI_CAMPO,campo1));
And I do not understand it was intended to do because it is the first time you load the "TABLE" table in the system. Could someone knows why it would be interesting to do this?
Thanks in advance,
Regards
Hi Enriqueta,
This function is used to limit the number of rows that are loaded based on previous loaded data. If you wanted to load certain rows in a dimension table and limit to just ones that you need based on another field, this is very helpful.
This is straight from the help guide:
exists(IDnr, IDnr) returns -1 (true) if the value of the field IDnr in the current record already exists in any previously read record containing that field.
Hope this helps!
Hi Enriqueta,
This function is used to limit the number of rows that are loaded based on previous loaded data. If you wanted to load certain rows in a dimension table and limit to just ones that you need based on another field, this is very helpful.
This is straight from the help guide:
exists(IDnr, IDnr) returns -1 (true) if the value of the field IDnr in the current record already exists in any previously read record containing that field.
Hope this helps!
The script tells me that there is the field MI_CAMPO in a previously loaded data, no matter what table. And the load in your example loads only the rows where values in campo1 match values in the previously loaded MI_CAMPO.