Data Sherlock
HomeDashboardStatus Page
  • Introduction
    • Introduction
    • Concepts
    • Architecture
    • Installation
    • Authentication
    • Getting Started
    • Configrutions
    • Databases
  • Deployment
    • Serverless
    • Kubernetes
    • Cloud(AWS/GCP/Azure)
  • Clients
    • JavaScript SDK
    • Python SDK
    • CLI
  • Open Source
    • XRay
Powered by GitBook
On this page
  • Run Employees Database (Optional)
  • Create Agent
  • Export Environments variables
  • Register Database Metadata in the Cloud
  • Run an Agent Locally
  1. Introduction

Getting Started

PreviousAuthenticationNextConfigrutions

Last updated 11 months ago

Run Employees Database (Optional)

docker run -d \                                                                                                         
  --name mysql-employees \
  -p 3306:3306 \
  -e MYSQL_ROOT_PASSWORD=root \
  -v $PWD/data:/var/lib/mysql \
  genschsa/mysql-employees
docker run -d --name postgres \
  -p 5432:5432 \
  -e POSTGRES_USER=root \
  -e POSTGRES_PASSWORD=root \
  -e POSTGRES_DB=employees \
  -v "$(pwd)/data:/var/lib/postgresql/data" \
  postgres:13.2-alpine
docker run -p 14330:1433 -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=root' -d chriseaton/adventureworks:latest

Create Agent

NOTE: On Catalog page will will see API Keys, Each API keys are tightly coupled with agent.

Export Environments variables

export DS_API_KEY=****
export DB_PASSWORD=root

Register Database Metadata in the Cloud

You can register your database's metadata with Datasherlock. Below is an example configuration for MySQL:

type: "mysql"
database:
  host: "127.0.0.1"
  username: "root"
  port: 3306
  database: "employees"
  ssl: false
type: "postgres"
database:
  host: "127.0.0.1"
  username: "root"
  port: 5432
  database: "employees"
  ssl: disable
type: "mssql"
database:
  host: "127.0.0.1"
  username: "root"
  port: 14330
  database: "master"

To connect your agent to the Datasherlock cloud, use the following command. It will register your database schema with cloud

sherlock register --config config.yaml -n <AGENT_NAME>

Run an Agent Locally

To run an API server locally on port 8080, use the following command. You can then use this URL to interact with the platform:

sherlock serve --config config.yaml