Skip to content

How smart should datatype detection be? #66

@vegitron

Description

@vegitron

(Question for SQLSHR-229)

In the Beta version of SQLShare, we try to guess the type of data a column is in, so that a column of integers can reliably have integer operations performed on it. I'm hoping to expand that to things like dates, and other complex types.

But - it doesn't always work out. Taxonomy IDs for example look like numbers, but aren't.

I have two ideas for addressing this:

  1. give up on smart detection, and just make everything nvarchar(max), and let users cast as needed.
  2. create 2 columns when it's detected as not-text. 1 being the detected type, and the other being an nvarchar(max) column of the original data.

Do either of those sound good, or is there another approach that should be taken?

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