Script activity failed: Argument {0} is null or empty. Parameter name: paraKey

Francisco Dominguez 386 Reputation points
2022-03-08T15:14:05.56+00:00

Hi,

I'm using the new script activity to perform two select queries in my database. I have set the dynamic content to be like this:

@concat('SELECT BCode, SUM(Waa) FROM table1 WHERE BCode=3 AND Date=''', variables('currentDate'), ''' GROUP BY BCode ',

'SELECT BCode, SUM(Waa) FROM table1 WHERE BCode=3 AND Date=''', variables('previousDate'), ''' GROUP BY BCode')

However, when debugging the pipeline all I get is the following error:

Error code
2011
Failure type
User configuration issue
Details
Argument {0} is null or empty.
Parameter name: paraKey

However, I have other script activities before this one and none of them is failing. What is wrong?

Thanks in advance.

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,527 questions
{count} vote

2 answers

Sort by: Most helpful
  1. Carleton Hall 10 Reputation points Microsoft Employee
    2023-09-11T18:19:49.5733333+00:00

    If anyone is still watching this, the problem is that there is a return value from the SQL query that doesn't have an assigned column name.

    BAD:

    SELECT

    BCode

    ,SUM(Waa)

    FROM

    table1

    GOOD:

    SELECT

    BCode

    ,SUM(Waa) AS Waa_Sum

    FROM

    table1

    2 people found this answer helpful.
    0 comments No comments

  2. Francisco Dominguez 386 Reputation points
    2022-03-11T08:47:04.643+00:00

    Hi @KranthiPakala-MSFT ,

    I do not have paraKey anywhere in my script. I actually changed to another query, different than the ones I posted above, and my error was gone. I will be marking this as solved, but something in my previous queries wasn't right.

    Thanks for your help.