Table Definition #438
-
I'm not sure I am clear on the purpose of the Table Definition in the documentation. As far as I can see the example shown on the Quick Start doesn't appear to be referenced anywhere? Is it just a reference so that we can create a table that matches the names of the index fields? As I understand it, ElectroDB doesn't create the table, but rather expects one to exist on AWS? But later on in the Recipes, under "Using ElectroDB with an Existing Dataset" it suggests that using ElectroDB with an existing table requires additional considerations like ignoring ownership? What am I missing here? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @filipeestacio 👋 Great question, let me see if I can close the gap! The Table Definitions in the documentation are there to help people understand how ElectroDB schemas map to table definitions and also to help people bootstrap the DynamoDB to try the examples. As you noticed, this is a separate concept from I hope this helps; let me know if you'd like more detail on any of the above! |
Beta Was this translation helpful? Give feedback.
Hi @filipeestacio 👋
Great question, let me see if I can close the gap! The Table Definitions in the documentation are there to help people understand how ElectroDB schemas map to table definitions and also to help people bootstrap the DynamoDB to try the examples.
As you noticed, this is a separate concept from
ignoreOwnership
. TheignoreOwnership
option is helpful for users using a table that already contains data. By default, ElectroDB sets "identifier" fields (__edb_e__
and__edb_v__
) on each item and uses those properties to determine which Entity owns the item. If ElectroDB did not create an item, it will lack these fields and be discarded and/or filtered out.I hope this helps; let …