Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Declare more fields as nullable #212

Closed
edgarrmondragon opened this issue Sep 8, 2023 · 1 comment · Fixed by #214
Closed

Declare more fields as nullable #212

edgarrmondragon opened this issue Sep 8, 2023 · 1 comment · Fixed by #214
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@edgarrmondragon
Copy link
Member

From a Slack conversation:

Trying to run tap-dbt and I'm running into some issues that I think would apply more generally to other taps too, but I couldn't find an answer in the forums or slack:

  1. Allowing NULL types globally: The expected schema for most of the fields in tap-dbt does not allow NULL values. For example in the runs stream, the field dbt_version is configured to expect a type of string like:
          "dbt_version": {
            "type": "string"
          }

The solution would involve one of two alternatives:


@edgarrmondragon edgarrmondragon added bug Something isn't working good first issue Good for newcomers labels Sep 8, 2023
@mjsqu
Copy link
Contributor

mjsqu commented Sep 11, 2023

I think the schema is being derived from the content retrieved from: tap_dbt.client.OPENAPI_URL. For example the following block is retrieved for the Jobs endpoint:

    Job:
      type: "object"
      required:
        - id
        - account_id
        - project_id
        - environment_id
        - dbt_version
        - name
        - execute_steps
        - state
        - triggers
        - settings
        - schedule
      properties:
        id:
          type: integer
          nullable: true
          description: Must be `null` when creating a new Job
...
        dbt_version:
          type: string
          nullable: true
          description: Overrides the dbt_version specified on the attached Environment if provided
          example: 0.17.1

Whereas the extracted schema is:

      "schema": {
        "properties": {
          "id": {
            "description": "Must be `null` when creating a new Job",
            "type": "integer"
          },
...
          "dbt_version": {
            "description": "Overrides the dbt_version specified on the attached Environment if provided",
            "type": "string"
          }

nullable does not appear to be carried over when converting the yaml to the json schema.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants