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

Define an import data format and import a file in this format #13

Open
htmfilho opened this issue Oct 11, 2019 · 0 comments
Open

Define an import data format and import a file in this format #13

htmfilho opened this issue Oct 11, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@htmfilho
Copy link
Owner

htmfilho commented Oct 11, 2019

As a database developer or administrator, I want to import existing documentation into Digger so that the entire documentation gets centralized in a single place. The import logic avoids duplication, but it updates documentation fields already present.

Given the following relational model extracted from Minimily:

minimily-family

Here is its representation in a format that can be imported by Digger:

[{"name": "user_profile",
  "friendlyName": "User Profile",
  "type": "TABLE",
  "documentation": "Stores user personal preferences.",
  "columns": [
      {"name": "id",
       "friendlyName": "Identifier",
       "type": "integer(10)",
       "nullable": "false",
       "documentation": "Unique identifier auto-generated by the database."},
      {"name": "user_account",
       "friendlyName": "User Account",
       "type": "integer(10)",
       "nullable": "false",
       "foreignTable": "user_account",
       "foreignColumn": "id",
       "documentation": "The user account that the profile belongs to."},
      {"name": "first_name",
       "friendlyName": "First Name",
       "type": "varchar(30)",
       "nullable": "false",
       "documentation": "The first name of the full name"},
      {"name": "last_name",
       "friendlyName": "Last Name",
       "type": "varchar(30)",
       "nullable": "false",
       "documentation": "The last name of the full name"},
      {"name": "email",
       "friendlyName": "Email",
       "type": "varchar(100)",
       "nullable": "false",
       "documentation": "Unique email address"}]},
 {"name": "family",
  "friendlyName": "Family",
  "type": "TABLE",
  "documentation": "Defines a family.",
  "columns": [
      {"name": "id",
       "friendlyName": "Identifier",
       "type": "integer(10)",
       "nullable": "false",
       "documentation": "Unique identifier auto-generated by the database."},
      {"name": "name",
       "friendlyName": "Name",
       "type": "varchar(100)",
       "nullable": "false",
       "documentation": "Name of the family."},
      {"name": "profile",
       "friendlyName": "Profile",
       "type": "integer(10)",
       "nullable": "false",
       "foreignTable": "user_profile",
       "foreignColumn": "id",
       "documentation": "The profile that created the family."}]},
 {"name": "family_member",
  "friendlyName": "Family Member",
  "type": "TABLE",
  "documentation": "Defines a user profile as member of the family."},
  "columns": [
      {"name": "id",
       "friendlyName": "Identifier",
       "type": "integer(10)",
       "nullable": "false",
       "documentation": "Unique identifier auto-generated by the database."},
      {"name": "family",
       "friendlyName": "Family",
       "type": "integer(10)",
       "nullable": "false",
       "foreignTable": "family",
       "foreignColumn": "id",
       "documentation": "Family of the user profile."},
      {"name": "user_profile",
       "friendlyName": "User Profile",
       "type": "integer(10)",
       "nullable": "false",
       "foreignTable": "user_profile",
       "foreignColumn": "id",
       "documentation": "The profile that belongs to the family."},
      {"name": "organizer",
       "friendlyName": "Organizer",
       "type": "tinyint(1)",
       "nullable": "true",
       "documentation": "Indicates that the user profile is the organizer of the family."}]}]

When defining a table, only the name is required. When defining a column, the name, type, size, and nullable are required.

A table with name as the only attribute and without columns is considered as a table to be ignored. For example:

{"name": "CATALOGS"}
@htmfilho htmfilho added the enhancement New feature or request label Oct 11, 2019
@htmfilho htmfilho assigned htmfilho and unassigned htmfilho Oct 11, 2019
@htmfilho htmfilho added this to the 0.7.0 milestone Oct 14, 2019
@htmfilho htmfilho removed this from the 0.7.0 milestone May 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant