1
votes

I am trying to create a U-SQL script that can be generic across many datasets. These datasets are all encapsulated in their own Table Value Function. So for example I would like to achieve something like this:

DECLARE @ExtractFunction String = "ENT.dbo.ExtractFromSetA";

@Output = SELECT COUNT(*) AS Count FROM
@ExtractFunction("*","*","*") AS Z;

OUTPUT @Output 
TO "/DELETE/OuputCount.tsv"
USING Outputters.Tsv(); 

What I want is a to be able to have Data Factory pass in the particular TVF that the script should run against. However, I can't find a way to specify that a string is actually the name of the TVF. I could see also wanting this if you wanted to pass in a schema or db based on an environment you were working with.

Thanks!

1

1 Answers

1
votes

U-SQL does not provide dynamic function name invocation like this.

You will have to code-gen the script with a code-generator and then invoke the code-generated script in the next step. You could orchestrate that with ADF.

Also feel free to file a feature request at http://aka.ms/adlfeedback.