Skip to content

Commit

Permalink
refresh poetry and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
pnadolny13 committed Oct 23, 2024
1 parent bf09ea7 commit a372fa7
Show file tree
Hide file tree
Showing 4 changed files with 1,465 additions and 57 deletions.
121 changes: 65 additions & 56 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,65 +1,78 @@
# tap-linkedin-ads
# `tap-linkedin-ads`

LinkedInAds tap class.

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

## Capabilities

* `catalog`
* `state`
* `discover`
* `about`
* `stream-maps`
* `schema-flattening`
* `batch`

## Settings

| Setting | Required | Default | Description |
|:--------|:--------:|:-------:|:------------|
| access_token | False | None | The token to authenticate against the API service |
| oauth_credentials | False | None | LinkedIn Ads OAuth Credentials |
| oauth_credentials.refresh_token | False | None | LinkedIn Ads Refresh Token |
| oauth_credentials.client_id | False | None | LinkedIn Ads Client ID |
| oauth_credentials.client_secret | False | None | LinkedIn Ads Client Secret |
| start_date | True | None | The earliest record date to sync |
| end_date | False | 2024-10-23T22:57:56.958248+00:00 | The latest record date to sync |
| user_agent | False | tap-linkedin-ads <api_user_email@your_company.com> | API ID |
| stream_maps | False | None | Config object for stream maps capability. For more information check out [Stream Maps](https://sdk.meltano.com/en/latest/stream_maps.html). |
| stream_map_config | False | None | User-defined config values to be used within map expressions. |
| faker_config | False | None | Config for the [`Faker`](https://faker.readthedocs.io/en/master/) instance variable `fake` used within map expressions. Only applicable if the plugin specifies `faker` as an addtional dependency (through the `singer-sdk` `faker` extra or directly). |
| faker_config.seed | False | None | Value to seed the Faker generator for deterministic output: https://faker.readthedocs.io/en/master/#seeding-the-generator |
| faker_config.locale | False | None | One or more LCID locale strings to produce localized output for: https://faker.readthedocs.io/en/master/#localization |
| flattening_enabled | False | None | 'True' to enable schema flattening and automatically expand nested properties. |
| flattening_max_depth | False | None | The max depth to flatten schemas. |
| batch_config | False | None | |
| batch_config.encoding | False | None | Specifies the format and compression of the batch files. |
| batch_config.encoding.format | False | None | Format to use for batch files. |
| batch_config.encoding.compression | False | None | Compression format to use for batch files. |
| batch_config.storage | False | None | Defines the storage layer to use when writing batch files |
| batch_config.storage.root | False | None | Root path to use when writing batch files. |
| batch_config.storage.prefix | False | None | Prefix to use when writing batch files. |

A full list of supported settings and capabilities is available by running: `tap-linkedin-ads --about`

`tap-linkedin-ads` is a Singer tap for LinkedInAds.

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:
```bash
pipx install tap-linkedin-ads
```
Install from GitHub:
```bash
pipx install git+https://github.com/ORG_NAME/tap-linkedin-ads.git@main
```
-->

## Configuration
### Configure using environment variables

### Accepted Config Options
This Singer tap will automatically import any environment variables within the working directory's
`.env` if the `--config=ENV` is provided, such that config values will be considered if a matching
environment variable is set either in the terminal context or in the `.env` file.

<!--
Developer TODO: Provide a list of config options accepted by the tap.
### Source Authentication and Authorization

This section can be created by copy-pasting the CLI output from:

```
tap-linkedin-ads --about --format=markdown
```
-->
The tap requires a LinkedInAds OAuth 2.0 access token to make API requests

A full list of supported settings and capabilities for this
tap is available by running:
The access token requires the following permissions:

```bash
tap-linkedin-ads --about
```
`r_ads`: read ads
`rw_ads`: read-write ads
`r_ads_reporting`: read ads reporting

### Configure using environment variables
Access tokens expire after 60 days and require a user to manually authenticate
again. See the [LinkedInAds API docs](https://learn.microsoft.com/en-us/linkedin/shared/authentication/postman-getting-started) for more info.

This Singer tap will automatically import any environment variables within the working directory's
`.env` if the `--config=ENV` is provided, such that config values will be considered if a matching
environment variable is set either in the terminal context or in the `.env` file.
## Usage

### Source Authentication and Authorization
### AdAnalytics API Column Limitation

<!--
Developer TODO: If your tap requires special access on the source system, or any special authentication requirements, provide those here.
-->
The AdAnalytics endpoint in the LinkedInAds API can call up to 20 columns at a time, we can create child classes which have 20 columns in them, we can merge their output with get records function.

## Usage
### Elastic License 2.0

You can easily run `tap-linkedin-ads` by itself or in a pipeline using [Meltano](https://meltano.com/).
The licensor grants you a non-exclusive, royalty-free, worldwide, non-sublicensable, non-transferable license to use, copy, distribute, make available, and prepare derivative works of the software.

### Executing the Tap Directly

Expand All @@ -73,6 +86,8 @@ tap-linkedin-ads --config CONFIG --discover > ./catalog.json

Follow these instructions to contribute to this project.

This project uses parent-child streams. Learn more about them [here](https://gitlab.com/meltano/sdk/-/blob/main/docs/parent_streams.md).

### Initialize your Development Environment

```bash
Expand Down Expand Up @@ -100,20 +115,14 @@ poetry run tap-linkedin-ads --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
# Install meltano
pipx install meltano
# Initialize meltano within this directory
cd tap-linkedin-ads
meltano install
meltano install tap-linkedin-ads
```

Now you can test and orchestrate using Meltano:
Expand All @@ -122,7 +131,7 @@ Now you can test and orchestrate using Meltano:
# Test invocation:
meltano invoke tap-linkedin-ads --version
# OR run a test `elt` pipeline:
meltano run tap-linkedin-ads target-jsonl
meltano elt tap-linkedin-ads target-jsonl
```

### SDK Dev Guide
Expand Down
Loading

0 comments on commit a372fa7

Please sign in to comment.