npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

latona-datacatalog

v0.1.5

Published

Latona addon for generating model-based human-readable data catalog pages (md, html, Confluence Cloud)

Downloads

7

Readme

Latona - Data Catalog

Latona addon for generating model-based human-readable data catalog pages (md, html, Confluence Cloud)

Disclaimer

This is NOT a fully-fledged data catalog implementation like Apache Atlas. This is just an addon to Latona code generator. This addon renders a set of pages to simplify digesting metadata in a user-friendly way. Nothing more than that.

We used this tool on a number occasions, usually when it is too early to start thinking about heavy data cataloging tools, but presenting some collected metadata is beneficial.

Usage

Quick start

  1. Install Latona - see latona documentation
  2. Scaffold model and project - see latona documentation
  3. Add latona-datacatalog addon to package.json:
npm i latona-datacatalog
  1. Add latona-datacatalog to your latona project. To use the default configuration add this snippet to the addons array:
{
  "moduleName": "latona-datacatalog",
  "options": {
    "renderFormat": "md"
  }
}
  1. Add tables to your model. See our test model for examples. Data catalog expects tables array to be at the root of the model.

  2. Add extra collections for other catalogs. Default configuration will look for collections.businessProcesses for business process catalog, and for collections.applications for applications catalog. Nothing bad will happen if these are missing - respective catalogs will be empty in this case.

  3. Add relationship types to your model. They should land in collections.relationships by default. Each relationship type should be structured as follows (titles are used to group relationship links at the catalog item's page):

{
  "id": "string",
  "title_forward": "string",
  "title_backward": "string"
}
  1. Add relationship records. The default place for them is at collections.relationshipTypes. typeId should be one of defined at the previous steps, source is the source (upstream) object's slug, target is the target (downstream) object's slug. Typical relationship looks like this:
{
  "typeId": "fk",
  "source": "[orders].[dbo].[FactOrderItem]",
  "target": "[orders].[dbo].[DimClient]"
}
  1. Add custom markdown content to the ./content folder (use item's slug as a file name).

  2. Render as described in the Latona's guide.

Addon options

Please refer for more information to these source files:

| Option | Type | Required | Description | | ------------------------------------------------------------------------------- | ----------------------------------------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | | paths | object | yes | | | paths.outPath | string | yes | output path (default: ./output) | | paths.customContentPath | string | yes | path to the folder with custom markdown files (use slug for names and custom markdown will be injected) | | renderFormat | enum ["md", "html", "conf"] | yes | | | pageTreeFileName | string | yes | filename for the JSON file with the list of all generated pages | | conf | object | | Confluence-specific configuration | | conf.createNotesPage | boolean | | true by default | | conf.notesSlugSuffix | string | yes (only if parent object is present) | Slug suffix for "notes" pages - empty pages that may be editted directly at Confluence. Notes pages are injected into catalog pages via macro. | | conf.notesTitleSuffix | string | yes (only if parent object is present) | Suffix for "notes" page titles. | | conf.modelConfig | object | yes (only if parent object is present) | | | conf.modelConfig.spaceKey | string | yes (only if parent object is present) | Confluence space key | | catalogs | object | yes (only if parent object is present) | Catalogs configuration (there may be many) | | catalogs.<catalogName> | object | yes | Catalog configuration object. Only latin letters. | | catalogs.<catalogName>.collection | string | yes | path to array of catalog items (from the model root) | | catalogs.<catalogName>.title | string | yes | catalog title | | catalogs.<catalogName>.slug | string | yes | catalog slug (url-friendly string) | | catalogs.<catalogName>.sectionBy | object | | sectioning configuration (at least first level should be described, only two levels are supported) | | catalogs.<catalogName>.sectionBy.first | object | yes (only if parent object is present) | first level of grouping | | catalogs.<catalogName>.sectionBy.first.properties[] | array | yes (only if parent object is present) | properties to group by | | catalogs.<catalogName>.sectionBy.first.properties[].name | string | yes | property name (for internal use only) | | catalogs.<catalogName>.sectionBy.first.properties[].path | string | yes | property path (relative to catalog item) | | catalogs.<catalogName>.sectionBy.first.properties[].title | string | yes | property title | | catalogs.<catalogName>.sectionBy.first.properties[].show | boolean | | show property | | catalogs.<catalogName>.sectionBy.first.properties[].showInLinkTable | boolean | | show property on the parent page if "inParentAs": "linkTable" | | catalogs.<catalogName>.sectionBy.first.inParentAs | enum ["linkTable", "linkList", "section"] | yes (only if parent object is present) | sets how to show sections on the parent page (catalog root page for the first level of grouping) | | catalogs.<catalogName>.sectionBy.first.tableLinkProperty | string | | sets which property should be used for linking to the section details page | | catalogs.<catalogName>.sectionBy.first.titleTemplate | string | yes (only if parent object is present) | section title template (variable expansion is supported) | | catalogs.<catalogName>.sectionBy.first.slugTemplate | string | yes (only if parent object is present) | section slug template (variable expansion is supported) | | catalogs.<catalogName>.sectionBy.second | object | | see catalogs.&lt;catalogName&gt;.sectionBy.first | | catalogs.<catalogName>.details | object | yes | see catalogs.&lt;catalogName&gt;.sectionBy.first | | catalogs.<catalogName>.detailsCollections | object | | describes inner collections for the catalog's item (e.g.: if database table is a catalog item, then table fields is the inner collection) | | catalogs.<catalogName>.detailsCollections.<name> | object | yes (only if parent object is present) | Collection configuration object. Only latin letters. | | catalogs.<catalogName>.detailsCollections.<name>.collection | string | yes (only if parent object is present) | path to array of collection items (relative to item) | | catalogs.<catalogName>.detailsCollections.<name>.properties[] | array | yes (only if parent object is present) | collection properties | | catalogs.<catalogName>.detailsCollections.<name>.properties[].name | string | yes (only if parent object is present) | property name (for internal use only) | | catalogs.<catalogName>.detailsCollections.<name>.properties[].path | string | yes (only if parent object is present) | property path (relative to collection item) | | catalogs.<catalogName>.detailsCollections.<name>.properties[].title | string | yes (only if parent object is present) | property title | | catalogs.<catalogName>.detailsCollections.<name>.heading | string | yes (only if parent object is present) | section's title | | relationshipsCollection | string | yes | path to array of relationships (relative to collections object within the latona model) | | relationshipTypesCollection | string | yes | path to array of relationship types (relative to collections object within the latona model) | | dropDefaultCatalogs | boolean | | false by default, removes default catalogs configuration if true |

Upload pages to Confluence Cloud

The latona-datacatalog package also includes dc2confcloud utility which enables automated upload of pages to your Confluence Cloud space.

  1. Install the package globally to use this tool:
npm i -g latona-datacatalog
  1. Create the configuration json:
{
  "confluence": {
    "baseUrl": "<your_account>.atlassian.net",
    "spaceKey": "<your_space_key>"
  },
  "contentFolder": "./path/to/generated/conf/output",
  "notesSuffix": " - Notes", // see addon options
  "pageTree": "___page_tree___.json", // see addon options
  // specify parent pages for each "root" catalog page
  "parents": [
    {
      "slug": ".datacatalog",
      "confPageId": 123456789 // you need to create this page manually
    },
    {
      "slug": ".datacatalog-notes",
      "confPageId": 123456789 // you need to create this page manually
    },
    {
      "slug": ".bpcatalog",
      "confPageId": 123456789 // you need to create this page manually
    },
    {
      "slug": ".bpcatalog-notes",
      "confPageId": 123456789 // you need to create this page manually
    },
    {
      "slug": ".appcatalog",
      "confPageId": 123456789 // you need to create this page manually
    },
    {
      "slug": ".appcatalog-notes",
      "confPageId": 123456789 // you need to create this page manually
    }
  ]
}
  1. Run the tool:
dc2confcloud -u <your_user_name> -t <your_access_token> -c <./path/to/dc2confcloud.json>

Usage details:

Usage: dc2confcloud [options]

Options:
  -u, --user <user>      Confluence user name (email)
  -t, --token <token>    Confluence access token
  -c, --config <config>  path to dc2confcloud's configuration json (default: "./dc2confcloud.json")
  -h, --help             display help for command

Contributing

Please read our Latona's contribution guidelines for details on our development approach, and the process for submitting pull requests to us. All contributors should comply with our Latona's Code of Conduct

License

Latona is copyright (c) 2019-present DataArt (www.dataart.com) and all contributors and licensed under the Apache License, Version 2.0. See the LICENSE file for more details.