Skip to content

Running dsq in interactive modes more than once on the same file results in an error #101

@iamatypeofwalrus

Description

@iamatypeofwalrus

I want to use dsq in the interactive mode -i, however, when I open the same file more than once with interactive mode dsq always fails to start interactive mode. It fails with the following error message: table "t_0" already exists.

  • I'm able to produce this consistently with any valid csv file I pass to it.
  • I have not tried other file types.
  • I'm using whatever version of dsq is available on brew
  • I've also validated that this behavior exists on main by building the source locally

Here's an example file I created and saved as test.csv

$ cat test.csv 
column1, column2, column3
a,b,c
d,e,f

The first invocation of dsq -i is usually successful, however, it emits this log line: Cache invalid, re-import required. even if I've never run -i before.

$ dsq -i test.csv       
Cache invalid, re-import required.
dsq> exit
EOF

All subsequent invocations of dsq -i test.csv fail with:

$ dsq -i test.csv
table "t_0" already exists

$ echo $?        
1

Removing the sqlite DB for that file allows me to run -i, however, with the same Cache invalid... log error as before:

$ rm $(dsq -D test.csv)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions