0

I want to pass the slice start/end time properties of a pipeline to a U-SQL activity through the "parameters" property of the activity/pipeline.

The purpose is to generate dynamic file names based on the date the slice starts and orchestrate the process to run daily and process a file of that date.

Is that doable?

1 Answer 1

2

That should be possible. Here is an example of how I am using the slice date to dynamically define folder structure.

"typeProperties": {
                "scriptPath": "script.usql",
                "scriptLinkedService": "LinkedService_AS_Storage",
                "degreeOfParallelism": 3,
                "priority": 100,
                "parameters": {
                    "in": "$$Text.Format('/RawData/{0:yyyy}/{0:MM}/{0:dd}/In.csv',SliceStart)",
                    "out": "$$Text.Format('/TempData/{0:yyyy}/{0:MM}/{0:dd}/Out.csv',SliceStart)"
                }
            }

Inside the USQL script you would just reference the @in or @out parameters. Be careful, U-SQL has case-sensitive syntax. They are actually added to the top of the script file when azure data factory gets it from storage to run.

Hope this helps.

Sign up to request clarification or add additional context in comments.

1 Comment

Yes, this is exactly how it works. Thank you for your help!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.