Function of Transform in Data Connectors Execution Status

Hello community,

Regarding the function of Transform in Data Connectors, can we access the state where the function we made is executed by global variables etc.?
For example, during configuration state or data connector execution state.

Actually, we don’t want to execute the processing of our own function while setting the configuration, but we wan to process the function only while the Data connector is executing.

Thanks!
Nobu

Hey Nobu,

The function being used as a custom transform will execute on the limited set of data in the preview table during configuration so the platform is able to render the preview, and then it will also be executed on the entire data set, for the relevant column, during execution of the connector.

Best,
DJ

Hello DJ, thank you for your reply.
Can the code be separated during configuration and execution?
Such as,

// It is assumed that execution_mode is a global variable that indicates the execution status.

export function fn(a: string) {
    if (execution_mode == preview) {
        return "preview";
    if (execution_mode == execution) {
        return `${a.toUpperCase()}`;
    }
    else {
        return a;
    }
}

Thanks,
Nobu

Hi Nobu,

That is not possible at this time. Can you explain your use case a little more and why you would not want to perform the transform for the preview table?

Thanks,
Jamie

Hello Jamie,

Since we are updating the entity in the function by using fetch with TypeScript, we do not want to execute this process during the configuration.

Thanks,
Nobu