Databricks column mapping

Vineet S 750 Reputation points
2024-03-01T11:45:07.4466667+00:00

Hey,

I got less in json files but there are more columns target table in databricks how to map if receive situation like this

{
    "Generic": {
        "id": "33",
        "Products": [
            {
                "Code": "111",
                "Amount": 1.0,
                "category": "33",
                "price": 11,
                "totalprice": 233
            }
        ],
        "Result": "test",
    },
    "Notification": {
        "Environment": "local",
        "Instance": "local",
        "Time": "00"}

Here is the mapping

Code-Codenew,Amount-Amount_new,category-category_new

Target table columns are

     "Codenew","Amount_new", "category_new","price","totalprice1","totalprice2","totalprice3","totalprice4"

how to resolve this issue

Azure Databricks
Azure Databricks
An Apache Spark-based analytics platform optimized for Azure.
2,162 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.