Data Discovery
x
x
x
Download SchemaCrawler:
Install SDKMan:
sudo curl -s "https://get.sdkman.io" | bash
source "/home/pdc/.sdkman/bin/sdkman-init.sh"
To test the installation, run:
sdk help
Install SchemaCrawler:
sdk install schemacrawler
Run SchemaCrawler & connect to AW database to generate a detailed schema diagram:
schemacrawler.sh \
--server=sqlserver \
--host=pdc.pentaho.lab \
--port=1433 \
--database=AdventureWorks2022 \
--user=sa \
--password=StrongPassword123 \
--info-level=maximum \
--command=schema \
--schemas=".*\.(HumanResources|Person|Production|Purchasing|Sales)" \
--output-format=png \
--output-file=adventureworks2022_all_schemas.png
You may want to split this up into individual schemas..!
For HR schema:
schemacrawler.sh \
--server=sqlserver \
--host=pdc.pentaho.lab \
--port=1433 \
--database=AdventureWorks2022 \
--user=sa \
--password=StrongPassword123 \
--info-level=maximum \
--command=schema \
--schemas=".*\.HumanResources" \
--output-format=png \
--output-file=adventureworks2022_hr_schema.png
Other Useful Commands
x
# Person schema only
--schemas=".*\.Person"
--output-file=adventureworks2022_person_schema.png
# Production schema only
--schemas=".*\.Production"
--output-file=adventureworks2022_production_schema.png
# Sales schema only
--schemas=".*\.Sales"
--output-file=adventureworks2022_sales_schema.png
# Purchasing schema only
--schemas=".*\.Purchasing"
--output-file=adventureworks2022_purchasing_schema.png
Last updated
Was this helpful?