greetings! excited to do some data engineering … j...
# getting-started
d
greetings! excited to do some data engineering … just messing around but I got a little stuck trying to import MTA turnstile data. http://web.mta.info/developers/data/nyct/turnstile/turnstile_220108.txt the error is (line 27 in log)
Copy code
KeyError: 'c/a'
if I clean up the headers, change the ‘C/A’ column to ‘CA’ and also remove extra spaces at the end of the header line, then it imports OK. Guessing it can’t map ‘C/A’ to a valid Postgres column name? In general if I want to preprocess the file found at the URL what is a good approach? I think these files may have a few issues that need to get cleaned up before they import. or if there’s a way to map headers in the csv to reasonable column names that would be a great start? apologies if I missed something straightforward.
v
Try the meltanolabs variant target-postgres, it's still fairly new but there's definietly something with the column name of
C/A
not mapping properly. Not certain the other variant will work but if it doesn't if you could share the same logs we'll be sure to do something to fix it as this looks like a target bug.
d
that worked! I had to change the key to ‘ca’. many thanks!