Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create empty table failed on rust engine #2354

Closed
Veiasai opened this issue Mar 28, 2024 · 3 comments
Closed

Create empty table failed on rust engine #2354

Veiasai opened this issue Mar 28, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@Veiasai
Copy link

Veiasai commented Mar 28, 2024

Environment

WSL2 Ubuntu
Delta-rs version:
python deltalake==0.16.3
Binding:

Environment:

  • Cloud provider:
  • OS:
  • Other:

Bug

What happened:
write_deltalake with schema provided, and [] as data input, it can work with pyarrow engine. but it failed with rust.

                write_deltalake(
                    "./test",
                    [],
                    schema=Schema(fields=fields),
                    )

_internal.DeltaError: Generic error: No data source supplied to write command.
What you expected to happen:

How to reproduce it:

from deltalake import write_deltalake, DeltaTable
from deltalake.schema import Schema, Field, PrimitiveType
write_deltalake(
    "./test",
    [],
    schema=Schema(fields=[Field.from_json('''{
            "name": "col",
            "type": "integer",
            "nullable": true,
            "metadata": {}
        }''')]),
        engine="rust"
    )

More details:

@Veiasai Veiasai added the bug Something isn't working label Mar 28, 2024
@ion-elgreco
Copy link
Collaborator

You can create a table using the DeltaTable.create API. https://delta-io.github.io/delta-rs/api/delta_table/#deltalake.DeltaTable.create

@Veiasai
Copy link
Author

Veiasai commented Mar 28, 2024

Yea, I found that just now and it worked.

@ion-elgreco
Copy link
Collaborator

Alright, closing this one then : )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants