none
Error when running a very simple U-SQL via ADLA Job / Visual Studio

    Question

  • Hi, I tried this script on Visual Studio....

    @LoanPredictor =

        EXTRACT Loan_ID             string

                , Gender            string

                , Married           string

                , Dependents        string

                , Education         string

                , Self_Employed     string

                , ApplicantIncome   int

                , CoapplicantIncome int

                , LoanAmount        int

                , Loan_Amount_Term  int

                , Credit_History    string

                , Property_Area     string

                , Loan_Status       string

        FROM "adl://sscrmpocadls.azuredatalakestore.net/clusters/sscrm-spark-ml/HdiSamples/HdiSamples/sscrmLoanPredictor/train.csv"

        USING Extractors.Csv();

    The error I get is as below:

    at token 'EXTRACT', line 11
    near the ###:
    **************
    USE DATABASE [SampleDBTutorials];
    USE SCHEMA [usql];
    // Generated Code Behind Header

    // Auto-generated header code ended
    // User script

    @LoanPredictor = 
         ### EXTRACT Loan_ID             string
                , Gender            string
                , Married           string
                , Dependents        string

    What wrong am I doing?

    Friday, January 19, 2018 11:07 AM

All replies

  • You should provide the actual error message.

    If that is the whole script that you submitted, you are missing the part that U-SQL in ADLA today is used to do batch processing. Thus the result has to be written back into a file or a U-SQL table. 

    So add something like

    OUTPUT @LoanPredictor TO "myoutput.csv"
    USING Outputters.Csv();

    Also please review some of the introduction material to U-SQL like the hands-on lab at http://aka.ms/usql-hol


    Michael Rys

    Friday, January 19, 2018 6:45 PM
    Moderator