Difference between revisions of "JCatalog"

From CaseTalk Wiki
Jump to: navigation, search
m
m
Line 5: Line 5:
[[File:DataExplorerOfflineCatalog.png]]
[[File:DataExplorerOfflineCatalog.png]]


The content of the jCatalog file displayed above is:
The content of the jCatalog file (as generated by the JdbcExplorer) displayed above is:


   {
   {
Line 114: Line 114:
     "createdon": "2023-04-25T11:27:34.795546700Z",
     "createdon": "2023-04-25T11:27:34.795546700Z",
     "user": "admin"
     "user": "admin"
  }
= Manual =
If crafting such a file by hand, or automated, some details can be skipped leading to a slimmer jcatalog file:
  {
    "connection": {
        "catalogs": [{
            "name": "marcowobben",
            "schemas": [
                {
                    "name": "public",
                    "tables": [
                        {
                            "columns": [
                                {
                                    "name": "contact_id"
                                },
                                {
                                    "name": "customer_id"
                                },
                                {
                                    "name": "contact_name"
                                },
                                {
                                    "name": "phone"
                                },
                                {
                                    "name": "email"
                                }
                            ],
                            "name": "contacts",
                            "primarykey": {
                                "columns": [{
                                    "column": "contact_id",
                                    "position": "1"
                                }],
                                "name": "contacts_pkey"
                            }
                        },
                        {
                            "columns": [
                                {
                                    "name": "customer_id"
                                },
                                {
                                    "name": "customer_name"
                                }
                            ],
                            "name": "customers",
                            "primarykey": {
                                "columns": [{
                                    "column": "customer_id",
                                    "position": "1"
                                }],
                                "name": "customers_pkey"
                            }
                        }
                    ]
                }
            ]
        }]
    }
   }
   }

Revision as of 08:50, 14 August 2023

An example of a jcatalog file is printed below. This is an example output using the jdbcExplorer embedded in CaseTalk. These jCatalog files can be stored in your roaming profile (AppData) to be used by CaseTalk next time you open the Data Explorer.

Naturally, the metadata cannot be queried, since there's no data behind it or a server to handle it, but it can be used in documenting offline catalog information or use it for reverse engineering and lineage mapping, through drag and drop.

DataExplorerOfflineCatalog.png

The content of the jCatalog file (as generated by the JdbcExplorer) displayed above is:

 {
   "connection": {
       "catalogs": [{
           "name": "marcowobben",
           "schemas": [
               {
                   "name": "public",
                   "tables": [
                       {
                           "columns": [
                               {
                                   "autoinc": "YES",
                                   "datatype": "int4",
                                   "name": "contact_id",
                                   "nullable": "NO",
                                   "position": "1",
                                   "precision": "10",
                                   "size": "10"
                               },
                               {
                                   "datatype": "int4",
                                   "name": "customer_id",
                                   "nullable": "YES",
                                   "position": "2",
                                   "precision": "10",
                                   "size": "10"
                               },
                               {
                                   "datatype": "varchar",
                                   "name": "contact_name",
                                   "nullable": "NO",
                                   "position": "3",
                                   "precision": "10",
                                   "size": "255"
                               },
                               {
                                   "datatype": "varchar",
                                   "name": "phone",
                                   "nullable": "YES",
                                   "position": "4",
                                   "precision": "10",
                                   "size": "15"
                               },
                               {
                                   "datatype": "varchar",
                                   "name": "email",
                                   "nullable": "YES",
                                   "position": "5",
                                   "precision": "10",
                                   "size": "100"
                               }
                           ],
                           "foreignkeys": [{
                               "columns": [{
                                   "column": "customer_id",
                                   "position": "1",
                                   "ref_column": "customer_id"
                               }],
                               "name": "fk_customer",
                               "ref_table": "customers"
                           }],
                           "name": "contacts",
                           "primarykey": {
                               "columns": [{
                                   "column": "contact_id",
                                   "position": "1"
                               }],
                               "name": "contacts_pkey"
                           }
                       },
                       {
                           "columns": [
                               {
                                   "autoinc": "YES",
                                   "datatype": "int4",
                                   "name": "customer_id",
                                   "nullable": "NO",
                                   "position": "1",
                                   "precision": "10",
                                   "size": "10"
                               },
                               {
                                   "datatype": "varchar",
                                   "name": "customer_name",
                                   "nullable": "NO",
                                   "position": "2",
                                   "precision": "10",
                                   "size": "255"
                               }
                           ],
                           "name": "customers",
                           "primarykey": {
                               "columns": [{
                                   "column": "customer_id",
                                   "position": "1"
                               }],
                               "name": "customers_pkey"
                           }
                       }
                   ]
               }
           ]
       }],
       "string": "jdbc:postgresql://192.168.1.106:5432/marcowobben"
   },
   "createdon": "2023-04-25T11:27:34.795546700Z",
   "user": "admin"
 }

Manual

If crafting such a file by hand, or automated, some details can be skipped leading to a slimmer jcatalog file:

 {
   "connection": {
       "catalogs": [{
           "name": "marcowobben",
           "schemas": [
               {
                   "name": "public",
                   "tables": [
                       {
                           "columns": [
                               {
                                   "name": "contact_id"
                               },
                               {
                                   "name": "customer_id"
                               },
                               {
                                   "name": "contact_name"
                               },
                               {
                                   "name": "phone"
                               },
                               {
                                   "name": "email"
                               }
                           ],
                           "name": "contacts",
                           "primarykey": {
                               "columns": [{
                                   "column": "contact_id",
                                   "position": "1"
                               }],
                               "name": "contacts_pkey"
                           }
                       },
                       {
                           "columns": [
                               {
                                   "name": "customer_id"
                               },
                               {
                                   "name": "customer_name"
                               }
                           ],
                           "name": "customers",
                           "primarykey": {
                               "columns": [{
                                   "column": "customer_id",
                                   "position": "1"
                               }],
                               "name": "customers_pkey"
                           }
                       }
                   ]
               }
           ]
       }]
   }
 }