Create a table
How to create a new table (that is, a business entity to use for ingestion and in decisions)
Behind the curtain
When you create a table (an entity) in Marble, what happens under the hood is that we create a table in a dedicated (Postgresql) database. Similarly, creating fields creates columns, making fields unique creates unique indexes, etc. However, "links" between Marble entities are not represented as foreign keys in the database.
You enter the data model page with an empty view. The first step is pretty obvious: let's create a new table in our model.
![empty data model view](https://files.readme.io/117cfc4-Capture_decran_2024-05-29_a_11.15.49.png)
empty data model view
The main thing you have to decide at this point is the name of your table.
We allow alphanumeric characters as well as the underscore "_" character. Beware that table names are case sensitive, so "Accounts" and "accounts" are not the same - and you'll need to use the correct name, with correct case, in the decision and ingestion APIs.
Optionally, set a description to help the people who will be building and maintaining the rules, at least where the usage of the table is not self-explanatory.
![Create a first entity](https://files.readme.io/15b4252-Capture_decran_2024-05-29_a_11.15.59.png)
Create a first entity
There you are: you should now have an "empty" table as below. Of course, you'll see that it is not really empty, because two fields are created by default and are required for every entity.
![There you are](https://files.readme.io/4b8f92a-Capture_decran_2024-05-29_a_11.16.17.png)
There you are
object_id
represents the primary unique identifier of the object in your systems. It must be a string and is used for deduplication of ingested data (that is to say, there will only ever be one live row for any givenobject_id
value in your ingested data for this table)updated_at
represents the metadata of last update timestamp of the object in your systems. If no such notion exists for your object, don't worry: you can always use the current timestamp or a constant value every time you call the API.
Together, object_id
and updated_at
are used to reconcile successive ingested versions of a same object and deduplication.
The next step will be to defile the actual fields on your table, to be used in the scenario rules.
Updated 3 months ago