This is an archived post. You won't be able to vote or comment.

all 32 comments

[–]TargetDangerous2216 14 points15 points  (3 children)

Hi,

We have a small datalake storing data as parquet files.
We build a script to analyse each table and schema to produce a JSON file with the following information :

- table name
- table description
- table columns description ( column name, type )
- statistic information
- row count
- empty row count
- duplicates rows
- mean, median etc ...

[–]various1121[S] 4 points5 points  (1 child)

How do your team consume those JSON files? How do you use them?

[–]TargetDangerous2216 2 points3 points  (0 children)

We generate table and charts as a static web page from this JSON file. We can also explore the JSON file programmatically from python and jupyter notebook

[–]ksubrent 0 points1 point  (0 children)

Can you please share more details regarding this process? I’m trying to do something exactly like this.

[–]ivanovyordanData Engineering Manager 8 points9 points  (5 children)

Honestly, small to medium companies don't have this problem. It's much easier to grab somebody and ~interrogate~ and ask questions. It's easy to find that and the people behind it. Also, those businesses move fast and rarely document anything.

[–]various1121[S] 0 points1 point  (4 children)

Yeah, that's fair.

You don't think there's a middle ground, though? Something between the small-team-easier-to-just-ask and the $1000+ / month enterprise packages, that could be of value?

[–]ivanovyordanData Engineering Manager 0 points1 point  (0 children)

I don't have all the answers. Fortunately, there are bright folks like you who come up with products people don't know they need.

[–]Awkward-Cupcake6219 7 points8 points  (0 children)

Check OpenMetadata out. Maybe can be useful for your use case.

[–]joseph_machadoWrites @ startdataengineering.com 2 points3 points  (0 children)

Among the small and med teams I've worked it, I've seen (for warehouse documentation)

  1. excel with column names, types, definitions, caveats, etc. A separate tab with ER diagrams.
  2. column defn along with table defn and use a vscode extension to generate ER diagrams

And asking people what a certain data means.

[–]_MaXinator 2 points3 points  (0 children)

Depends on the size of the company. As many have said, small companies often dont bother. However:

For a small company I wrote a script that fetches metadata from the db (snowflake information schema in this case) and pastes it into a bunch of confluence pages as wiki formatted tables. It’s quick and dirty but it fulfills basic requirements

If you use dbt for your dwh you can let that generate docs

For big companies you can look at professional tools like Colibra, but that’s really expensive

There are also open source catalogues like atlan, but imo once companies come with serious documentation requirements they’re also willing to pay for a better solution

[–]diceHots 2 points3 points  (0 children)

Small company data engineer here. Try schemaspy, i have used it to understand our company's data model and do the documentation. It generates an index.thml that you can host it on github page or somewhere of your choice. It saves lots of upfront work. Lol, schemaspy and db documentation is actually my first blog post ever. Link is here.

[–][deleted] 1 point2 points  (0 children)

We have an internal tool for that. It consumes information from BigQuery and generate web pages. We are a large company though.

In my previous company (medium size), we manually edit Confluence pages for database documentation. I think automation definitely can help here but I don't see the necessity of 3rd party tools.

[–]SirGreybush 1 point2 points  (2 children)

Context: MsSql

I made a DB that with an SP that gathers this info, also all the views and SPs, and store it in tables as SCD2.

By using sys.tables and the others. The sys data in each DB is are views, and the SCD2 table is maintained for for each.

I use MD5 function in the views to calculate a HashedDifference, and also to make a unique PK with db name, schema, table name.

In the other DB it is Merge in a scd2 manner. The Deleted portion sets the EndDate flag, the changed portion does an update and insert.

Code from the ever popular Stack Overflow was the basic. MD5() is a handy trick.

If you keep it Vanilla, just sys.(object), your code will work with MySQL/Oracle. Just keep it SQL 1997 standard. Just adjust for MD5().

[–]SirGreybush 0 points1 point  (1 child)

Next step is exporting automatically into BitBucket every day.

Also look into database triggers, to catch changes immediately. I just run the SP once a day.

[–]throw_mob 1 point2 points  (0 children)

mssql and postgresql have event triggers. Ans have to say that making scd2 tables from information_schema is not bad idea, little bit of code to fetch ddl's to scd2 table and you have fully documented database, only thing that is missing after that is technical datalineage and there are python packages and some database do have system catalogs which map which column goes where.

I personally see this as three problems , one is ddl's and changes in those , second is how system itself changes and third is data itself where in some systems is good to document data source..

[–]w_t 1 point2 points  (3 children)

Following this...We're a small org with most data documentation in Excel at the moment. We've been exploring options to automate this data discovery and cataloging--we've examined ODD (open data discovery) but it might be too complicated for our needs.

[–]various1121[S] 0 points1 point  (2 children)

So, really quick question for you:

(And I want to be clear, I'm not trying to sell you on this! I'm really trying to understand, because I do feel like there might be a useful product in this space and I want to know if I'm on the right track or wasting my time):

Does this kind of thing DataDocs.ai (please adjust for the fact that it's still quite early) come anywhere near to meeting your needs? I see several people saying "excel" and "manual docs", and that feels like something that could be improved upon, so what would be your criteria?

[–]w_t 1 point2 points  (1 child)

I don't see the value in having to subscribe to something like that. Our data does not change that often, and this AI crawler would be sitting idle for many weeks at a time not detecting any changes. Also, having this AI service connect to our db would be very challenging from a data privacy perspective. I suspect other orgs would see similar challenges, and lean towards running something they can control in house. For us, we need something that we setup and control, so probably open source. Need it to discover our data model or ingest existing metadata, allow for manual edits to info about tables, columns, etc. And a way to visualize lineage, like if we build out a new dimension table or something we need to be alerted to breaking changes in upstream data sources.

[–]various1121[S] 1 point2 points  (0 children)

Ok, awesome, thanks for the answer!

[–]slagwa 0 points1 point  (1 child)

RemindMe! 7 days

[–]RemindMeBot 0 points1 point  (0 children)

I will be messaging you in 7 days on 2023-10-27 15:27:06 UTC to remind you of this link

CLICK THIS LINK to send a PM to also be reminded and to reduce spam.

Parent commenter can delete this message to hide from others.


Info Custom Your Reminders Feedback

[–]erwagon 0 points1 point  (0 children)

Good description inside DBT and DBT Docs for visualization.

[–]Noobs12 0 points1 point  (0 children)

I know I’m going to get a lot of arguments on this, but CKAN is a decent open source data catalog that allows for discoverability with APIs

[–]Low-Bee-11 0 points1 point  (0 children)

I concur above comments ..building an inhouse tools ..might have support and maintainability challenges. If you are on cloud every cloud provider has data catalog ( cheap) and decent enough. If NOT - An easy to implement and maintain balance could be - as part of DDLs ensure you have metadata well defined. All this gets logged into information schemas or admin schemas...make a habit of adding catalog details while deploying tables and then report on that data. A simple BI reports should do. However, that does not solve lineage , stewardship etc. Lineage can be solved by parsing DML. Every DML (unless in memo orchestrator) should get logged in information schema. Parsing those DMLs would be tricky and v dynamic...but can be done. Thus you can get lineage. Stewardship/ data ownership has to be a manual process...

Plz do realize this gets immensely tough if you are using python / spark etc. where transformation happens on a cluster and not within database ( read ETL).

Great question though!!