Unable to put a lake DB using azure rest API

Hitesh BK 0 Reputation points
2024-04-09T07:30:10.58+00:00

I m trying to create a lake DB from github actions using a json
Im following the rest API documentation
https://learn.microsoft.com/en-us/rest/api/synapse/data-plane/put-database/put-database?view=rest-synapse-data-plane-2021-04-01&tabs=HTTP#ddltype

Im using this payload also tried changing it multiple ways but always gives the error
{

"Code": "InvalidSasDdlPayload",

"Message": "Bad request. Invalid DDL payload property \u0027createorUpdatePayload\u0027 for \u0027database-testDB\u0027"

}

what is the issue

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,921 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Smaran Thoomu 15,845 Reputation points Microsoft Vendor
    2024-04-10T07:09:10.2433333+00:00

    Hi @Hitesh BK

    Thanks for the question and using MS Q&A platform.

    The error message "InvalidSasDdlPayload" with the message "Bad request. Invalid DDL payload property 'createorUpdatePayload' for 'database-testDB'" indicates that there is an issue with the payload that you are sending to create or update the database in Azure Synapse Analytics.

    Based on the error message, it seems that there is a typo in the payload property name. The correct property name is "createOrUpdatePayload" (note the capitalization of "O" and "U"), but the error message shows "createorUpdatePayload" (missing the capital "O").

    To resolve this issue, you should update the payload property name to "createOrUpdatePayload" and try again. Here is an example payload that you can use:

    
    {
    
        "location": "<location>",
    
        "properties": {
    
            "collation": "<collation>",
    
            "maxSizeBytes": "<maxSizeBytes>",
    
            "readScale": "<readScale>",
    
            "requestedServiceObjectiveId": "<requestedServiceObjectiveId>"
    
        },
    
        "createOrUpdatePayload": {
    
            "name": "<databaseName>",
    
            "sku": {
    
                "name": "<skuName>",
    
                "tier": "<skuTier>"
    
            }
    
        }
    
    }
    
    

    Make sure to replace the placeholders with the appropriate values for your database.

    I hope this helps! Let me know if you have any further questions.

    0 comments No comments

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.