How to Handle Case Sensitivity in Dynamic JSON Input Keys ("A" vs "a") for Derived Columns in ADF Dataflow Pipeline?

Hrithik Purwar 25 Reputation points
2024-07-17T12:59:49.7733333+00:00

I am working on a dataflow pipeline in ADF with an input dataset schema that includes a column 'A'. The dataflow processes various JSON files with dynamic schemas, where some JSON files use 'A' and others use 'a' as keys. Since the schema is case insensitive, I cannot include both 'A' and 'a' in the input dataset schema. Currently, I have a derived column dependent on the value of 'A'/'a' (it combines <A> + '/' + <date> and the sink stores the folders based on the derived column path data), and it functions correctly for JSON files containing 'A'. How can I modify the dataflow to handle JSON files with 'a' as the key? Is there any other workaround to achieve this in ADF?

Here are examples of two JSON files with dynamic schemas that I'm working with:Example 1Example 2

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,445 questions
{count} votes

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.