Morning all - I'm seeing a weird issue and wonderi...
# singer-target-development
p
Morning all - I'm seeing a weird issue and wondering if its a bug or something im doing wrong. I'm using a full sync from a snowflake view to my custom target built using the SDK and im running them using
meltano elt
. I just noticed in the system db that the state is being messed up. I'm also running a similar sync using meltano from snowflake to a different target not built with the SDK which is not having this state issue.
after running once the state looks like this
{"singer_state": {"type": "STATE", "value": {"currently_syncing": *null*, "bookmarks": {"MY_SNOWFLAKE_DB-SCHEMA-TABLE_NAME": {"initial_full_table_complete": *true*}}}}}
after each run its gets futher nested under another
{"type": "STATE", "value":
so the second run looks like this
{"singer_state": {"type": "STATE", "value": {"type": "STATE", "value": {"currently_syncing": *null*, "bookmarks": {"MY_SNOWFLAKE_DB-SCHEMA-TABLE_NAME": {"initial_full_table_complete": *true*}}}}}}
it just continuously grows like that
the state message for another target that I previously built not using the SDK but also being run with
meltano elt
im seeing a state message like
{"singer_state": {"currently_syncing": *null*, "bookmarks": {"MY_SNOWFLAKE_DB-SCHEMA-TABLE_NAME": {"initial_full_table_complete": *true*}}}}
which is correct
d
@pnadolny What target are you using? It looks like it may be outputting full ``{"type": "STATE", "value": <payload> }` messages, instead of just the payload
Ah, it’s a custom target built using the SDK
I wonder if this is a bug in the SDK cc @aaronsteers
p
yes a custom target built with the SDK. I'm not seeing it with an old target build without the SDK but our new version with the SDK has it, so I'm trying to figure out if we did something wrong in our implementation or if its a bug in the SDK
d
It’s supposed to just write
state
, not a State message wrapping
state
Targets don’t output state messages, just state payloads
I suggest filing an issue and (if you’re up for it) an MR with a fix!
p
ah yeah that looks like it. This was a common issue our team ran into when writing targets pre-SDK
ill create the issue!
d
Thanks a lot!