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

[Documentation] How to create a table in Javascropt #639

Closed
ternaus opened this issue Nov 8, 2023 · 0 comments · Fixed by #736
Closed

[Documentation] How to create a table in Javascropt #639

ternaus opened this issue Nov 8, 2023 · 0 comments · Fixed by #736

Comments

@ternaus
Copy link

ternaus commented Nov 8, 2023

In https://lancedb.github.io/lancedb/basic/#how-to-connect-to-a-database

The proposed way to createTable in javascript is:

const tb = await db.createTable("my_table",
                  data=[{"vector": [3.1, 4.1], "item": "foo", "price": 10.0},
                        {"vector": [5.9, 26.5], "item": "bar", "price": 20.0}])

It is not a valid javascript syntax.
But

const tb = await db.createTable("my_table",
                  [{"vector": [3.1, 4.1], "item": "foo", "price": 10.0},
                        {"vector": [5.9, 26.5], "item": "bar", "price": 20.0}])

works.

Also it is unclear from the documentation how mode="overwrite" should be passed

alexkohler pushed a commit to alexkohler/lancedb that referenced this issue Apr 20, 2024

---------

Co-authored-by: Chang She <759245+changhiskhan@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant