Is the MeltanoLabs target-postgres ready for real ...
# troubleshooting
m
Is the MeltanoLabs target-postgres ready for real use? I’ve been trying to test it and am running into a
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable)
error, but it does create the table successfully. It just errors out without inserting any rows into it.
v
It works for me in prod right now, it should be! Can you share the error?
m
sure, one sec
elt.log
table exists, with no rows
if I rerun the job, I get the same error - it doesn’t write to that already-existing table
p
v
@pat_nadolny that smells about right! When the stream name uses different casing we can get into trouble for sure 😄 Normally whatever tap populates that table is going to have consistent casing
@Matt Menzenski in the mean time can you just rename the table in your postgres db to match the casing from your tap? That should make this work fine I'm going to revamp how we deal with table and column namings. After that work is done swapping to a case insensitive lookup should be pretty trivial I think, but it's a slight tweak we have to make that isn't "pure" with whatever the tap outputs so we'll probably want a flag
Really what should happen in a "strict" sense is we should just create a new table with the new casing
m
I’m not sure I’m following - it seems like it’s the same casing everywhere? It’s certainly upper-cased like this in the stream name thinkspin
I might just push an update to my tap-mongodb plugin to lowercase the stream-names
I tested with a different tap and it works fine
p
I think theoretically this is something the target should handle vs the tap to work in a way that is supported by a particular target, although that seems like a quick solve. My interpretation of the bug for my case was that it creates a table using uppercase
Account
in the db but then tries to write to it with SQL referencing lowercase
account
. Probably in Matt's case its also finding the table but lowering it before trying to write to it so the query fails as not found
v
This is just a bug in target-postgres it's not as complicated as I was thinking @Matt Menzenski I just need to fix it. It's just with capitalized stream names 😕