How to implement Loops in U-SQL

后端 未结 1 1630
误落风尘
误落风尘 2021-01-25 07:38

Is is possible to implement Loops (while/for) in U-SQL without using C#. If no, can anyone share the c# syntax to implement loops in u-sql.

I am extracting files from a

相关标签:
1条回答
  • 2021-01-25 08:15

    The proper way to do this is to use virtual columns, then rely on partition elimination so that only files matching predicates will actually be read (you can confirm that in the job graph).

    CREATE VIEW IF NOT EXISTS dbo.ReadingConsolidated 
    AS
    
    EXTRACT     
            ControllerID int?,          
            ParameterID int?,
            MeasureDate DateTime,
            Value float,
            date DateTime
        FROM  
        "adl://datalake.azuredatalakestore.net/{date:yyyy}/{date:M}/{date:d}/Reading.csv";
    
    
    @res =
        SELECT * FROM dbo.ReadingConsolidated
        WHERE date BETWEEN DateTime.Parse("2015/07/01") AND DateTime.Parse("2016/07/07");
    
    0 讨论(0)
提交回复
热议问题