Skip to content

Using fields and tables options together #78

@waylan

Description

@waylan

It is not clear from the documentation how to use both the fields and tables options together. For example, if the tables option renames a table, should the fields csv file use the original table name or the new table name?

For example, if table.csv is passed to the tables option with this content:

table_name table_title
foo bar

Then should the fields.csv reference the foo table or the bar table? If I run it with csv output tuned off (so that it only outputs the fields.csv and tables.csv files), the generated fields.csv file uses foo. Therefore, I used foo, like this:

table_name field_name
foo _link
foo name

However, when I try that, I get the following error:

RuntimeError: Error loading CSV file C:\Users\wlimberg\Documents\orders\data\csv/bar.csv: The system cannot find the file specified. (os error 2)

Caused by:
   0: Error loading CSV file C:\Users\wlimberg\Documents\orders\data\csv/bar.csv: The system cannot find the file specified. (os error 2)
   1: The system cannot find the file specified. (os error 2)

Location:
    src\lib.rs:290:17

If I instead edit the fields file to use bar for the table name, I get this error instead: RuntimeError: sending on a disconnected channel.

To be clear, I want to accomplish 2 things:

  1. Rename a table with the tables option.
  2. Use the fields option (with the only_fields option) to exclude some columns from the renamed table.

However, I can't seem to be able to accomplish both. I can only do one or the other.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions