none
How to extract CSV file in Data Lake Job?

    Question

  • I cannot make extract working and wondering what is wrong.

                 

    DECLARE @in  string = "/Input/CustomerSalesDataLake.csv";
    DECLARE @out string = "/Output/CustomerSalesDataLakeOutput.csv"

    @log =
        EXTRACT  CustomerId      string,
                 CustomerName       string,
                 Sales                     float

        USING Extractors.csv();

    OUTPUT @log   
        TO @out
        USING Outputters.Csv();


    -File------------------------------
    "/Input/CustomerSalesDataLake.csv";
    CustomerId;CustomerName;Sales
    1;Ford;1000
    2;Nissan;500

    <label class="msportalfx-text-label" data-bind="text: descriptionLabel" style="font-family:az_ea_font, wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif;line-height:normal;text-transform:uppercase;color:#2d3239;">DESCRIPTION</label>
    Invalid syntax found in the script.
    <label class="msportalfx-text-label" data-bind="text: resolutionLabel" style="font-family:az_ea_font, wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif;line-height:normal;text-transform:uppercase;color:#2d3239;">RESOLUTION</label>
    Correct the script syntax, using expected token(s) as a guide.
    <label class="msportalfx-text-label" data-bind="text: detailsLabel" style="font-family:az_ea_font, wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif;line-height:normal;text-transform:uppercase;color:#2d3239;">DETAILS</label>
    at token 'EXTRACT', line 5
    near the ###:
    **************
    DECLARE @in  string = "/Input/CustomerSalesDataLake.csv";
    DECLARE @out string = "/Output/CustomerSalesDataLakeOutput.csv"
    
    @log =
         ### EXTRACT  CustomerId         string,
                 CustomerName       string,
                 Sales              float
                 
        USING Extractors.csv();
    
    OUT
    <label class="msportalfx-text-label" data-bind="text: titleLabel" style="font-family:az_ea_font, wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif;line-height:normal;text-transform:uppercase;color:#2d3239;">ERROR</label>

    E_CSC_USER_SYNTAXERROR


    Kenny_I

    Tuesday, December 6, 2016 2:43 PM

Answers

All replies