The problem seems to be with your @trail2, output was in json array "[{...},{...}]", which cannot be parsed by the JsonFunction.
REFERENCE ASSEMBLY [Newtonsoft.Json];
REFERENCE ASSEMBLY [Microsoft.Analytics.Samples.Formats];
DECLARE @in string="adl://xyz.azuredatalakestore.net/todelete.json";
DECLARE @out string="adl://xyz.azuredatalakestore.net/todelete.tsv";
DECLARE @mid string="adl://xyz.azuredatalakestore.net/intermediate.txt";
@trail2=EXTRACT results string FROM @in USING new Microsoft.Analytics.Samples.Formats.Json.JsonExtractor();
OUTPUT @trail2 TO @mid USING Outputters.Text(quoting:false);
@jsonify=EXTRACT name string,
id string,
deviceName string ,
deviceModel string,
clientip string
FROM @mid USING new Microsoft.Analytics.Samples.Formats.Json.JsonExtractor();
@logSchema=SELECT name AS sysName,
id AS sysId,
deviceName AS domainDeviceName,
deviceModel AS domainDeviceModel,
clientip AS domainClientIp
FROM @jsonify;
OUTPUT @logSchema TO @out USING Outputters.Tsv();