Do you have any news regarding my bug ? <https://a...
# ask-community-for-troubleshooting
c
u
@Charles the issue was added to the backlog. If possible provide logs and examples to reproduce your problem. Do you want to contribute and solve the issue?
c
I'll try ! Where is the columns order set up in the airbyte source code (inside the file connector ?) ?
File connector use pandas so if you have the option to use some argument in pandas will simplify your work
c
OK i'll look into it !
OK, so in order to preserve the columns order (because usecols do not preserve columns order) I need to use
Copy code
df_ret = pd.read_csv(filepath, index_col=False, usecols=cols_to_use)[cols_to_use]
but this is inside airbyte source code
So, inside the UI I need to implement a full workflow to setup columns order with csv import
is it worth it ?
u
@Charles what is happening is this part here: https://github.com/airbytehq/airbyte/blob/fe38f692764a6b8851684e8cc5178bfd91cd931f/airbyte-integrations/connectors/source-file/source_file/client.py#L361 when the columns are collect is created a
set
and sets are alphabetically sorted in Python.
What you can do is create another variable to "reorder" the columns variable based on df.columns