Giter Site home page Giter Site logo

Comments (7)

jochenchrist avatar jochenchrist commented on July 29, 2024

Can you try this as a workaround:

servers:
  test:
    type: dataframe
models:
  test_table:
    description: Test description.
    type: table
    fields:
      test_field:
        required: true
        description: Another description.
        type: array
        title: Test
        required: false
        example: '[''02'',''03'']'
        items:
          type: string
          description: Last description.
        config:
          databricksType: array<string>

from datacontract-cli.

Alp-Edeka avatar Alp-Edeka commented on July 29, 2024

Thank you for your response @jochenchrist. Unfortunately, I am still getting the same type mismatch. I am assuming that adding something here could fix my issue:

def convert_to_databricks(field: Field) -> None | str:

from datacontract-cli.

jochenchrist avatar jochenchrist commented on July 29, 2024

OK, need to dig deeper in here (

if field.config and "databricksType" in field.config:
should respect the config option).

Just to make sure: Are you using the latest version of the CLI tool?

from datacontract-cli.

Alp-Edeka avatar Alp-Edeka commented on July 29, 2024

@jochenchrist I am using version 0.10.7, not the latest one.

from datacontract-cli.

Alp-Edeka avatar Alp-Edeka commented on July 29, 2024

"More simple" data types seem to also have the same issue. For example, the data contract

servers:
  test:
    type: dataframe
models:
  test_model:
    description: Test description 1.
    type: table 
    fields:
      test_field:
        required: true
        description: Test description 2.
        type: timestamp_tz
        example: "2024-06-01T12:00:00.000Z"
        config:
          databricksType: timestamp

throws the output:

Column,Event,Details
test_field,:icon-fail: Type Mismatch, Expected Type: timestamp_tz; Actual Type: timestamp

from datacontract-cli.

jochenchrist avatar jochenchrist commented on July 29, 2024

Just to get sure, could you try testing with latest version v0.10.9?
(you might need to install with extras pip install datacontract-cli[all] --upgrade)

from datacontract-cli.

Alp-Edeka avatar Alp-Edeka commented on July 29, 2024

I now tried

%pip install datacontract-cli[all] --upgrade
dbutils.library.restartPython()

inside a notebook and ran the test again with the same outcome.

from datacontract-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.