Skip to content

feat: Support message writing flags #2706

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

Open
edgarrmondragon opened this issue Oct 4, 2024 · 5 comments · Fixed by #2961
Open

feat: Support message writing flags #2706

edgarrmondragon opened this issue Oct 4, 2024 · 5 comments · Fixed by #2961
Labels
kind/Feature New feature or request valuestream/SDK

Comments

@edgarrmondragon
Copy link
Collaborator

edgarrmondragon commented Oct 4, 2024

Feature scope

Taps (catalog, state, tests, etc.)

Description

When encoding/writing Singer messages to stdout, it'd be good to support certain flags that abstract the specifics of json, simplejson, msgspec, etc.

Some flags could be:

  • ascii
  • nan as null
  • nan passthrough

TDB the specifics and how these interact with one another.

Related:

@tjvananne
Copy link

tjvananne commented Apr 4, 2025

Bump. I think NaN as null would be a really nice feature or configuration setting. Especially since it's likely that most targets are going to be SQL-based databases or warehouses.

Context: We're migrating from the transferwise variants of tap-postgres and target-snowflake. It doesn't look like it's currently possible to make the switch to the meltanolabs variant because we're getting so many Out of range float values are not JSON compliant errors.

I'm guessing we could use inline stream mappers to convert all these float fields to varchar for ingestion, but it's hundreds (possibly thousands?) of fields. Any other thoughts on workarounds? Thanks!

@edgarrmondragon
Copy link
Collaborator Author

Context: We're migrating from the transferwise variants of tap-postgres and target-snowflake. It doesn't look like it's currently possible to make the switch to the meltanolabs variant because we're getting so many Out of range float values are not JSON compliant errors.

That's interesting, I don't see any indication in the source of the pipelinewise connectors that would suggest they support NaN values. If we know the value causing problems, it may point to a more specific bug in the tap or targets.

@tjvananne
Copy link

@edgarrmondragon It looks like pipelinewise's tap-postgres extractor converts NaN, Inf, and -Inf to None/null based on this code.

@edgarrmondragon
Copy link
Collaborator Author

@edgarrmondragon It looks like pipelinewise's tap-postgres extractor converts NaN, Inf, and -Inf to None/null based on this code.

I see. That kind of type conforming is actually fairly easy to patch here, so I'll open a PR.

@edgarrmondragon
Copy link
Collaborator Author

Reinstalling the MeltanoLabs/tap-postgres should get you the latest SDK patch, which handles those values.

@edgarrmondragon edgarrmondragon removed their assignment May 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/Feature New feature or request valuestream/SDK
Projects
Status: Discussed
Development

Successfully merging a pull request may close this issue.

2 participants