Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
pmuir committed Mar 12, 2024
1 parent 04e4f39 commit 1136cce
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 33 deletions.
32 changes: 8 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@

Built with the [Meltano Tap SDK](https://sdk.meltano.com) for Singer Taps.

<!--
Developer TODO: Update the below as needed to correctly describe the install procedure. For instance, if you do not have a PyPi repo, or if you want users to directly install from your git repo, you can modify this step as appropriate.
## Installation

Install from PyPi:
Expand All @@ -19,24 +15,20 @@ pipx install tap-datadog
Install from GitHub:

```bash
pipx install git+https://github.com/ORG_NAME/tap-datadog.git@main
pipx install git+https://github.com/immuta/tap-datadog.git@main
```

-->

## Configuration

### Accepted Config Options

<!--
Developer TODO: Provide a list of config options accepted by the tap.
## Settings

This section can be created by copy-pasting the CLI output from:
```
tap-datadog --about --format=markdown
```
-->
| Setting | Required | Default | Description |
|:--------|:--------:|:-------:|:------------|
| api_key | True | None | The API Key, generated in Datadog UI and stored in 1Password |
| application_key | True | None | The Application Key, generated in Datadog UI and stored in 1Password |
| slos | True | None | SLOs to replicate |

A full list of supported settings and capabilities for this
tap is available by running:
Expand All @@ -53,9 +45,7 @@ environment variable is set either in the terminal context or in the `.env` file

### Source Authentication and Authorization

<!--
Developer TODO: If your tap requires special access on the source system, or any special authentication requirements, provide those here.
-->
An API Key and Application Key from Datadog must be provided in the `config.json`.

## Usage

Expand Down Expand Up @@ -100,12 +90,6 @@ poetry run tap-datadog --help
_**Note:** This tap will work in any Singer environment and does not require Meltano.
Examples here are for convenience and to streamline end-to-end orchestration scenarios._

<!--
Developer TODO:
Your project comes with a custom `meltano.yml` project file already created. Open the `meltano.yml` and follow any "TODO" items listed in
the file.
-->

Next, install Meltano (if you haven't already) and any needed plugins:

```bash
Expand Down
30 changes: 30 additions & 0 deletions meltano.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
version: 1
send_anonymous_usage_stats: true
project_id: "tap-datadog"
default_environment: test
environments:
- name: test
plugins:
extractors:
- name: "tap-datadog"
namespace: "tap_datadog"
pip_url: -e .
capabilities:
- state
- catalog
- discover
- about
- stream-maps
config:
start_date: '2010-01-01T00:00:00Z'
settings:
# TODO: To configure using Meltano, declare settings and their types here:
- name: username
- name: password
kind: password
- name: start_date
value: '2010-01-01T00:00:00Z'
loaders:
- name: target-jsonl
variant: andyh1203
pip_url: target-jsonl
13 changes: 4 additions & 9 deletions tap_datadog/tap.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,29 +22,24 @@ class Tapdatadog(Tap):
th.StringType,
required=True,
secret=True, # Flag config as protected.
description="The API Key",
description="The API Key, generated in Datadog UI and stored in 1Password",
),
th.Property(
"application_key",
th.StringType,
required=True,
secret=True, # Flag config as protected.
description="The Application Key",
description="The Application Key, generated in Datadog UI and stored in 1Password",
),
th.Property(
"slos",
th.ArrayType(th.ObjectType(
th.Property("name", th.StringType, description="The name of the SLO"),
th.Property("id", th.StringType, description="The id of the SLO")
th.Property("id", th.StringType, description="The id of the SLO"),
)),
required=True,
description="SLO IDs to replicate",
description="SLOs to replicate",
),
th.Property(
"start_date",
th.DateTimeType,
description="The earliest record date to sync",
)
).to_dict()

def discover_streams(self) -> list[streams.datadogStream]:
Expand Down

0 comments on commit 1136cce

Please sign in to comment.