locked
Strange characters in DSC File Set with .ToDsc

    Domanda

  • I am creating a new File Set from an exisiting file set. My line record is tab delimited. I am adding 3 fields to the beginning of each record.  My Linq Query is as follows:


    string fileVersion = "1.0";
    string recordVersion = "1.0";
    string sourceVersion = "sourcesystem_2011-08-31_00_001";

    var DSCFileSetData = context.FromDsc<LineRecord>(inputDSCFileSet)
         .Select(r => String.Concat(sourceVersion, '\t', fileVersion, '\t', recordVersion, '\t', r.ToString())).Skip(1)
        .ToDsc(outputDSCFileSet)
        .SubmitAndWait(context);

     

    If I execute the query in Linqpad and not create the file set, the data looks correct.

    1.0 1.0 1314749219 ss ja,en;q=0.5 2011-08-31 00:06:59 2681877029674091487 ...

     

    After creating the file set, when i query the new file set data, it returns some strange characters in the start of the line.

    ��□□ 1.0 1.0 1314749219 ss ja,en;q=0.5 2011-08-31 00:06:59 2681877029674091487  ...

    Any ideas?


    --Patrick Gallucci
    martedì 4 ottobre 2011 19:46

Risposte

  • Thanks Jesse, Not sure. I did just see this in the Programmers guide on page 45.

    Note: The LINQ Concat operator is not supported by LINQ to HPC.

    I changed the code to

    sourceVersion + '    ' + recordVersion + '    ' + r.ToString().Skip(1)

    And it seems to work....


    --Patrick Gallucci
    • Contrassegnato come risposta Patrick Gallucci mercoledì 12 ottobre 2011 13:59
    mercoledì 12 ottobre 2011 13:59

Tutte le risposte