Summary
The user encountered an error while trying to load CSV data into Snowflake using the File source connector. The error message indicates an issue with converting a column to an integer.
Question
Hi, team. sorry for disturb you all.
i got below error when i use File (CSV, JSON, Excel, Feather, Parquet) v0.4.0 source connector to load csv data into snowflake.
I tried to set the column as string in Reader Options but still got below error.
does anyone had the same issue like below?
Traceback (most recent call last):
File "/airbyte/integration_code/main.py", line 8, in <module>
run()
File "/airbyte/integration_code/source_file/run.py", line 14, in run
launch(source, sys.argv[1:])
File "/usr/local/lib/python3.9/site-packages/airbyte_cdk/entrypoint.py", line 209, in launch
for message in source_entrypoint.run(parsed_args):
File "/usr/local/lib/python3.9/site-packages/airbyte_cdk/entrypoint.py", line 116, in run
yield from map(AirbyteEntrypoint.airbyte_message_to_string, self.read(source_spec, config, config_catalog, state))
File "/usr/local/lib/python3.9/site-packages/airbyte_cdk/entrypoint.py", line 158, in read
yield from self.source.read(self.logger, config, catalog, state)
File "/airbyte/integration_code/source_file/source.py", line 203, in read
raise err
File "/airbyte/integration_code/source_file/source.py", line 184, in read
for row in client.read(fields=fields):
File "/airbyte/integration_code/source_file/client.py", line 425, in read
fields = set(fields) if fields else None
File "/airbyte/integration_code/source_file/source.py", line 210, in selected_fields
fields = [int(str_col_idx) for str_col_idx in fields]
File "/airbyte/integration_code/source_file/source.py", line 210, in <listcomp>
fields = [int(str_col_idx) for str_col_idx in fields]
ValueError: invalid literal for int() with base 10: 'rate'```
<br>
---
This topic has been created from a Slack thread to give it more visibility.
It will be on Read-Only mode here. [Click here](https://airbytehq.slack.com/archives/C021JANJ6TY/p1716462838495009) if you want
to access the original thread.
[Join the conversation on Slack](https://slack.airbyte.com)
<sub>
["error", "csv", "snowflake", "file-source-connector", "data-loading"]
</sub>