Giter VIP home page Giter VIP logo

Comments (4)

soerenwolfers avatar soerenwolfers commented on June 29, 2024

The file is not corrupted, it's simply not in parquet format because how could duckdb possibly know that you wanted it in parquet format? You need to add (FORMAT PARQUET) to your COPY statement if you want to write a parquet file but don't want to use a parquet file ending.

As to duckdb getting this right automatically: personally I'd be more surprised if it didn't, but feel free to make a PR at the documentation repository (note that each page of the documentation website has a link at the bottom to the corresponding source in GitHub, e.g. https://duckdb.org/docs/sql/statements/copy.html links to https://github.com/duckdb/duckdb-web/edit/main/docs/sql/statements/copy.md)

from duckdb.

SteampunkIslande avatar SteampunkIslande commented on June 29, 2024

The file is not corrupted, it's simply not in parquet format because how could duckdb possibly know that you wanted it in parquet format? You need to add (FORMAT PARQUET) to your COPY statement if you want to write a parquet file but don't want to use a parquet file ending.

Thanks, I had forgot about this FORMAT statement, feeling stupid now...

As to duckdb getting this right automatically: personally I'd be more surprised if it didn't, but feel free to make a PR at the documentation repository (note that each page of the documentation website has a link at the bottom to the corresponding source in GitHub, e.g. https://duckdb.org/docs/sql/statements/copy.html links to https://github.com/duckdb/duckdb-web/edit/main/docs/sql/statements/copy.md)

Thanks, I like this feature but it feels like this kind of guard code should always be under the responsibility of the user. But now I know it's not required when working with duckdb :)

from duckdb.

soerenwolfers avatar soerenwolfers commented on June 29, 2024

It's not required in this instance. It might fail in more complex problems, and I agree with you that it's bad practice to overwrite an input file, especially when using a declarative system like duckdb.

from duckdb.

SteampunkIslande avatar SteampunkIslande commented on June 29, 2024

Oooof, so I guess I should remove my pull request...

Really thought it was an actual feature

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.