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

Struggling to define schema overrides (on taps) #6

Closed
amotl opened this issue Dec 13, 2023 · 2 comments
Closed

Struggling to define schema overrides (on taps) #6

amotl opened this issue Dec 13, 2023 · 2 comments

Comments

@amotl
Copy link
Contributor

amotl commented Dec 13, 2023

Hi again,

while working on MeltanoLabs/target-postgres#251, I am struggling to define schema override rules. For development purposes, I am using tap-singer-jsonl.

Within meltano.yml, I've defined a schema override rule on the tap-singer-jsonl element.

schema:
  my_table:
    value:
      type: "foo"

After running meltano invoke like:

meltano --log-level=debug invoke tap-singer-jsonl

I can see in .meltano/run/tap-singer-jsonl/tap.properties.json:

{
  "streams": [
    {
      "tap_stream_id": "array_number",
      "key_properties": [
        "id"
      ],
      "schema": {
        "properties": {
          "id": {
            "type": "integer"
          },
          "value": {
            "type": "foo"
          }
        },
        "type": "object",
        "required": [
          "id"
        ]
      },
      "metadata": {},
      "selected": true
    }
  ]
}

NB: metadata has been compressed.

However, it looks like it does not have any influence on the output of the tap at all. The schema override rule is not being taken into consideration.

With kind regards,
Andreas.

@amotl
Copy link
Contributor Author

amotl commented Dec 13, 2023

I should have noted the I also needed to define the capabilities attribute in the tap-singer-jsonl section of meltano.yml.

capabilities:
  - catalog
  - discover

Otherwise, invoking meltano invoke would yield such a warning, and will not propagate the schema override rule into the tap.properties.json file at all.

[warning  ] A catalog file was found, but it will be ignored as the extractor does not advertise the `catalog` or `properties` capability

This is most probably the issue here: tap-singer-jsonl just isn't ready for this kind of manipulation / behaviour override, effectively not implementing what it needs to fulfil the catalog capability contract?

NB: The original only says it provides the discover capability.

@amotl
Copy link
Contributor Author

amotl commented Dec 13, 2023

We converged this report into Learning Singer » Defining schema overrides on taps.

@amotl amotl closed this as not planned Won't fix, can't repro, duplicate, stale Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant