You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can only think that somehow the step has sent an invalid structure as the dataclip body
The job code is strange but harmless, so far as I can see (I've tried breaking it down into a repro, but failed)
each('$.cachedData[*]',
state => Object.entries(state.data.value.rawData),
fn(state => {
const [tableName, rows] = state.data;
// Define the order to respect foreign keys
const insertOrder = ['person', 'patient', 'person_name', 'person_address', 'patient_identifier'];
// Only process if this table is in our current batch
if (insertOrder.includes(tableName)) {
console.log(`Processing ${tableName} with ${rows.length} rows`);
return { ...state, tableName, rows };
}
console.log(`Skipping ${tableName} - not in insert order`);
return upsertMany(
state => state.tableName,
state => state.rows
)(state)
}),
)
Activity