Skip to content

Fail to validate table with GEOGRAPHY type in Databricks #1483

Description

@mahic

The tool fails after importing and testing a table with GEOGRAPHY type in Databricks

Steps to reproduce

Step 1

CREATE TABLE catalog.schema.geotable (
    id INT,
    geo GEOGRAPHY(4326)
) USING DELTA;

Step 2
datacontract import databricks --table catalog.schema.geotable --output geotable.yaml

Step 3
datacontract test geotable.yaml

Results in following output

Testing geotable.yaml
Server: databricks (type=databricks, schema=schema, catalog=catalog)
╭────────┬────────────────────────────────────────────────────────┬───────┬────────────────────────────────────────────────────╮
│ Result │ Check                                                  │ Field │ Details                                            │
├────────┼────────────────────────────────────────────────────────┼───────┼────────────────────────────────────────────────────┤
│ failed │ Check that field 'geo' is present                      │ geo   │ Could not read model 'geotable':      │
│        │                                                        │       │ '4326'                                             │
│ failed │ Check that field geo has physical type geography(4326) │ geo   │ Could not read model 'geotable':      │
│        │                                                        │       │ '4326'                                             │
│ failed │ Check that field 'id' is present                       │ id    │ Could not read model 'geotable':      │
│        │                                                        │       │ '4326'                                             │
│ failed │ Check that field id has physical type int              │ id    │ Could not read model 'geotable':      │
│        │                                                        │       │ '4326'                                             │
╰────────┴────────────────────────────────────────────────────────┴───────┴────────────────────────────────────────────────────╯
🔴 data contract is invalid, found the following errors:
1) id Check that field 'id' is present: Could not read model 'geotable': '4326'
2) id Check that field id has physical type int: Could not read model 'geotable': '4326'
3) geo Check that field 'geo' is present: Could not read model 'geotable': '4326'
4) geo Check that field geo has physical type geography(4326): Could not read model 'geotable': '4326'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions