user3843858
user3843858

Reputation: 331

Loading CSV using U-SQL is working but select is not working

I am reading a csv file using

@serch=
       EXTRACT
         col1 int,
         col2 string,
         col3 string
FROM @"/datalake/in/in.csv"
    USING Extractors.Csv();

OUTPUT @serch
    TO  @"/datalake/output/out.csv"
      USING Outputters.Csv();

It is working fine but when we will do

select * from @serch or select col1,col2 from @serch 

it is not working

Upvotes: 0

Views: 122

Answers (1)

Igor
Igor

Reputation: 51

would be good if you can paste complete statement that is failing for you. Based on what you posted above, looks like you are missing rowset variable. so, your code should be something like @r = SELECT * ... followed by OUTPUT statement.

Furthermore, today, ADLA does not support interactive queries capabilities that allows returning results back to client or user. If that was the intent of your query above, that does not work today. So, the only way to get results is to output rowsets to files. Once interactive is supported, you would be able to do something like you outlined above.

hope this explains and clarifies, Igor

Upvotes: 1

Related Questions