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

Consider running tap output into a target in CI #95

Open
Ry-DS opened this issue Mar 21, 2022 · 2 comments
Open

Consider running tap output into a target in CI #95

Ry-DS opened this issue Mar 21, 2022 · 2 comments

Comments

@Ry-DS
Copy link
Contributor

Ry-DS commented Mar 21, 2022

In #93 I decided to run the tap thru a simple target target-sqlite to see if the new streams I added worked.
By doing this, I instantly found mistyped fields in the Events stream.
Example error:

CRITICAL '20730626430' is not of type 'integer', 'null'
CRITICAL 
CRITICAL Failed validating 'type' in schema['properties']['id']:
CRITICAL     {'type': ['integer', 'null']}
CRITICAL
CRITICAL On instance['id']:
CRITICAL     '20730626430'

I think this would be a great testing method to ensure our schemas are correctly typed.

Possibly a new step that runs:
poetry run tap-github --config c.json --catalog ca.json | poetry run target-sqlite -c sq.json and crashes if the exit code is non-zero.

Thoughts on implementing this?

@laurentS laurentS self-assigned this Mar 23, 2022
@laurentS
Copy link
Contributor

Possibly related https://gitlab.com/meltano/sdk/-/issues/259

@laurentS laurentS removed their assignment Mar 23, 2022
@aaronsteers
Copy link
Contributor

aaronsteers commented Mar 24, 2022

Hi, @laurentS and @Ry-DS. I agree running a test to include landing in target-sqlite or even target-jsonl is probably helpful for catching JSON Schema typing issues. This is fairly common for tap developers in general, I think, and I've heard of others passing data through target-jsonl exactly for this purpose.

There are SDK-based solutions as well, such as including an option for JSON Schema type validations against reach record when testing in pytest.

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

3 participants