<#C01TCRBBJD7|> Hi, I'm starting this poc project...
# troubleshooting
l
#C01TCRBBJD7 Hi, I'm starting this poc project with Meltano and getting blocked by an error. I have a tap-csv that reads from a csv file with this data:
Copy code
first_col, second_col
value1, value2
And tries to transfer it to a target-snowflake, getting this error:
Copy code
2023-06-20T15:29:16.986808Z [info     ] snowflake.connector.errors.ProgrammingError: 000904 (42000): SQL compilation error: error line 1 at position 194 cmd_type=elb consumer=True name=target-snowflake producer=False stdio=stderr string_id=target-snowflake
2023-06-20T15:29:16.987293Z [info     ] invalid identifier 'SECOND_COL' cmd_type=elb consumer=True name=target-snowflake producer=False stdio=stderr string_id=target-snowflake
2023-06-20T15:29:17.253802Z [error    ] Loader failed
2023-06-20T15:29:17.261494Z [error    ] Block run completed.
It happens with both variants, meltano and transferwise. Any help is welcome.
u
@luis_vallejo if you run the tap without the target what do you see?
meltano invoke tap-csv > output.json
. Did the table exist in snowflake prior to this error and can you validate that the table structure is correct? You can also try removing
.meltano/run/tap-csv/
in case theres a cached schema thats messing with your sync
l
Hi @pat_nadolny, watching the structure of the table created by the tap-snowflake, I saw this
Copy code
create or replace TABLE TESTDB.RAW.TEST (
    FIRST_COL VARCHAR(16777216) NOT NULL,
    " SECOND_COL" VARCHAR(16777216),
    _SDC_RECEIVED_AT TIMESTAMP_NTZ(9),
    _SDC_EXTRACTED_AT TIMESTAMP_NTZ(9),
    _SDC_BATCHED_AT TIMESTAMP_NTZ(9),
    _SDC_DELETED_AT TIMESTAMP_NTZ(9),
    _SDC_SEQUENCE NUMBER(38,0),
    _SDC_TABLE_VERSION NUMBER(38,0),
    primary key (FIRST_COL)
);
The problem seems to be caused by the space in the header of the csv (first_col, second_col). So removing the space, .meltano/run/tap-csv/ and the table on Snowflake, did the trick. All is working now, thanks!!
u
ahh ok yeah thats it. I'll create an issue to look into this, it should probably just remove the space for you or replace it with an underscore