I have a custom USql applier which extends the IApplier class.
[SqlUserDefinedApplier]
public class CsvApplier : IApplier
{
public CsvApplier()
{
//totalcount = count;
}
public override IEnumerable<IRow> Apply(IRow input, IUpdatableRow output)
{
//....custom logic
//yield return or yield break
}
}
This applier is then used from Usql script as
@log =
SELECT t.ultimateID,
t.siteID,
.
.
.
t.eTime,
t.hours
FROM @logWithCount
CROSS APPLY
new BSWBigData.USQLApplier.CsvApplier() AS t(ultimateID string, siteID string, .... , eTime string, hours double, count long?);
I have been able to write unit tests/ATPs for decoupled parts of applier.
How can i write tests for C# code of Apply method and the custom logic dependent on input/output?
How can i automate testing of usql scripts with defined inputs and outputs such that no data lake account is needed?