Create table by import file, questions about serial numbers and pictures

I have imported a file in CSV format, and I have two questions about the created table:

1、The column (id) in the csv file will also be imported, so there will be two columns showing serial numbers, and the order is different. Can this situation be avoided? I just want one column to represent the serial number :sweat_smile:

2、If I export a file and import it again, the picture will not be displayed normally. Is it the URL of the picture? How can I make the picture display properly after importing?

Table before export:

1、The column (id) in the csv file will also be imported, so there will be two columns showing serial numbers, and the order is different. Can this situation be avoided? I just want one column to represent the serial number :sweat_smile:

The reason why that is happening is because when you run an export it will export the data in the same order you can currently see in your view. So if you have applied sorts or filters it will leave out every entry that was filtered out and it will order the exported csv by the sort that you have applied.

On the other hand, when you then import the CSV it will just assign ids in the order that the data was inserted, the new ID is not inferred from the exported ID.

In my opinion, a neat feature we could add, is to add a dropdown to the import saying something like Infer row Id from field X where you can select the exported ID field for example and turn that into your new IDs.

That looks like it’s a bug, I can’t image we would want literal strings in the file field. I will open an issue for that :slight_smile:

Issue: Image field csv export/import not working (#1444) · Issues · Baserow / baserow · GitLab

Hi @Alex ,thanks to your explanation, I know why the order of the two columns is different.
In fact, I don’t need to automatically generate the id 2 column. When I import a csv file to create a table, the table will always automatically generate a column (id 2). I don’t want to generate this column when importing. Can I do this? :smiley:

It seems that this column will be generated when a table is exported. How can I not generate this column when exporting?
image

Table before export, and it is what I want after importing:

I’m happy to help Baserow find bug. I will pay attention to this issue :smile:

Hey :slight_smile:

I don’t want to generate this column when importing. Can I do this? :smiley:

You can’t decide which column is imported via Baserow, but you can either

  • delete the generated ID column in your exported CSV file
  • or delete the id2 field after the import is done

Both solutions should solve your problem?

Let me know if that doesn’t work for you for some reason :slight_smile:

1 Like

Recently, I feel unwell and have not continued to work. I think your method is useful, and I will try it! Thank you :smile:

1 Like