Skip to content

Lookup tables should be maintained directly in SQLite #17

Closed
@simonw

Description

@simonw

When evaluating -c we currently use a temporary table maintained in Python space:

def id_for_value(self, value):
if pd.isnull(value):
return None
try:
return self.value_to_id[value]
except KeyError:
id = self.next_id
self.id_to_value[id] = value
self.value_to_id[value] = id
self.next_id += 1
return id

For handling larger CSV files (#16) this would work much better if it was a SQLite table that was queried and updated as we process data. This would also help make lookup tables re-usable across multiple CSVs across several runs of the command.

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