Giter VIP home page Giter VIP logo

Comments (4)

Tishj avatar Tishj commented on June 26, 2024

Thanks for the report, the error is unrelated to read_csv however.
read_csv store_rejects handles errors that happen during reading of the csv file
This error originates from writing the data to the table, which is not related to csv read.

The constraint information could perhaps be pushed down into the csv reader so it's aware and can act accordingly, but that's definitely a feature request

from duckdb.

Mytherin avatar Mytherin commented on June 26, 2024

As mentioned this is not an issue with the CSV file or the rejects table - as such this is out-of-scope for the CSV reader. You could perhaps use e.g. INSERT OR IGNORE or other SQL constructs to get the desired behavior instead.

from duckdb.

teucer avatar teucer commented on June 26, 2024

@Mytherin @Tishj Thank you for your answers. I understand the rationale.

How could I add such cases to reject_errors table? My goal is to use duckdb + sqlalchemy as a data quality assessment framework.

from duckdb.

Mytherin avatar Mytherin commented on June 26, 2024

The reject_errors table is specifically meant for finding errors within CSV files. Duplicate keys is not an error within a CSV file but a manually inserted constraint. As such you would need to do this outside of the rejects table.

from duckdb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.