Search…
Create a new data_type
This happens the first time we accept data for a given type.
The first time we accept data for a new data_type, we need to create the schema. Run this in Dolt and then make a Pull Request.
  1. 1.
    Create the Schema in data-intake.
    1
    CREATE TABLE `table_name` (
    2
    --these fields are required:
    3
    `id` varchar(32) NOT NULL DEFAULT (replace(UUID(), "-", "")),
    4
    `datasets_id` varchar(32),
    5
    `date_insert` datetime DEFAULT NOW(),
    6
    --add the rest of the columns here:
    7
    `exampleField` varchar(255),
    8
    PRIMARY KEY (`id`)
    9
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
    Copied!
  2. 2.
    Add it to the data_types table in the Datasets repo.
    1
    INSERT INTO data_types
    2
    VALUES (30, "data_type_name", "This is a human-readable explanation.")
    Copied!
Copy link
Edit on GitHub