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
JoeFields
Frequent Visitor

Error when applying schema with nullable records

I am getting errors on Record type objects when I try to apply a schema in my custom connector even though I have added the nullable type identifier.

The below example shows whenever I have location = null, it throws an error.

JoeFields_0-1695926712423.png

 

Here is a condensed listing of how I am defining my schema in my PQ file:

ProjectType = type table [
...
    location = nullable LocationType,
...],
    LocationType = type [
        country = text,
        state = text,
        streetName = text,
        streetNumber = text,
        suite = text,
        city = text,
        zip = text,
        complete = text,
        coords = nullable CoordsType
    ]

I have defined location as being a nullable record.

 

I copied the Table.ChangeType helper function from here: https://learn.microsoft.com/en-us/power-query/helper-functions#tablechangetype.

 

If I change the schema definition to nullable any then it works but then I do not have my schema applied for the location records that are provided.

ProjectType = type table [
...
    location = nullable any,
...],

 

0 REPLIES 0

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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
Top Kudoed Authors