Location provided by DATA_SOURCE 'sales_data' cannot contain any wildcards.

siddharth ranjan 0 Reputation points
2024-09-02T11:08:28.6633333+00:00

Getting this error while following instructions in https://microsoftlearning.github.io/dp-203-azure-data-engineer/Instructions/Labs/03-Transform-data-with-sql.html

while running following code:
USE Sales;

GO;

SELECT Item AS Product, SUM(Quantity) AS ItemsSold, ROUND(SUM(UnitPrice) - SUM(TaxAmount), 2) AS NetRevenue

FROM OPENROWSET( BULK 'sales/csv/*.csv',

DATA_SOURCE = 'sales_data', FORMAT = 'CSV', PARSER_VERSION = '2.0', HEADER_ROW = TRUE ) AS orders GROUP BY Item;

Usage of filepath function with DATA_SOURCE 'sales_data' might result in unexpected results if number of wildcards in data source LOCATION changes. Location provided by DATA_SOURCE 'sales_data' cannot contain any wildcards.

This question is related to the following Learning Module

Azure Azure Training
{count} votes

1 answer

Sort by: Most helpful
  1. Rakesh Gurram 15,700 Reputation points Microsoft External Staff Moderator
    2024-10-07T10:43:50.6133333+00:00

    Hi siddharth ranjan,

    The error you are facing might be due to one of the following reasons:

    1. The directory you're trying to create already exists.
    2. There's a problem accessing the directory.
    3. You don't have the necessary permissions for the directory.

    Please don't hesitate to reach out to us if you have any other queries.

    Thank you.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.