Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
tomdenby
Frequent Visitor

formatting - capabilities.json

The following formatting gives me this error - gets the following error error JSON capabilities.json : instance.dataViewMappings[0] is not exactly one from [subschema 0],[subschema 1],[subschema 2],[subschema 3],[subschema 4]

 

{ "dataRoles": [ { "displayName": "dbId", "name": "dbid", "kind": "Grouping" }, { "displayName": "URN", "name": "urn", "kind": "Measure" } ], "dataViewMappings": [ { "table": { "rows": { "for": { "in": "dbid" } } }, "single": { "role": "urn" } } ] }

 

Im sure it is a basic formatting issue but I can’t figure it out, would someone be able to advise ?

 

Thanks Tom

1 REPLY 1
Paulhaha
Helper I
Helper I

Hey, 

 

The capabilities.json file require some parts even if they are empty:

  • dataRoles
  • dataViewMappings
  • objects
  • privileges
{
    "dataRoles": [
        {
            "displayName": "dbId",
            "name": "dbid",
            "kind": "Grouping"
        },
        {
            "displayName": "URN",
            "name": "urn",
            "kind": "Measure"
        }
    ],
    "dataViewMappings": [
        {
            "table": {
                "rows": {
                    "for": {
                        "in": "dbid"
                    }
                }
            },
            "single": {
                "role": "urn"
            }
        }
    ],
    "objects" : [],
    "privileges" : []
}


You should try it out.

 

If you wanna have fun you can watch the schema of a capabilities.json file 🤒 powerbi-visuals-api/schema.capabilities.json at main · microsoft/powerbi-visuals-api (github.com)

 

Maybe it won't work so please provide information about when and where does this error happen (when you start the custom, in the console etc...)

 

Thanks, have a good day

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors