Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(docs): refactor source and sink docs #3031

Merged
merged 40 commits into from
Aug 8, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
0b2f343
Begin reorg
kevinhu Jul 27, 2021
0916b75
Add links
kevinhu Jul 27, 2021
2bb1d79
Fix link
kevinhu Jul 27, 2021
487a2b6
Fix glue link
kevinhu Jul 27, 2021
a24dc59
Add module installs to each page
kevinhu Jul 27, 2021
5c6a19a
Consistency
kevinhu Jul 27, 2021
2382c30
Standardize sqlalchemy pattern
kevinhu Jul 27, 2021
34fbccf
Add missing sql options
kevinhu Jul 27, 2021
9808735
More consistent recipes
kevinhu Jul 27, 2021
9af3cab
Finish consistency checks for recipes
kevinhu Jul 27, 2021
9dc365f
As above
kevinhu Jul 28, 2021
9afa393
Typo fixes
kevinhu Jul 28, 2021
c6388cb
More typo fixes
kevinhu Jul 28, 2021
8588cb9
More consistency fixes
kevinhu Jul 28, 2021
63691dd
Fix broken links
kevinhu Jul 28, 2021
f186b49
Merge branch 'master' of github.com:kevinhu/datahub into reorganize-docs
kevinhu Jul 28, 2021
410b9b8
Merge
kevinhu Aug 2, 2021
59623e4
Merge
kevinhu Aug 2, 2021
eef2a62
Note on allow/deny
kevinhu Aug 2, 2021
bee872f
Add questions section
kevinhu Aug 2, 2021
124c0a3
Merge branch 'master' of github.com:kevinhu/datahub into reorganize-docs
kevinhu Aug 2, 2021
6ffd8a1
Fix inconsistencies
kevinhu Aug 3, 2021
ba3cb36
Merge branch 'master' of github.com:kevinhu/datahub into reorganize-docs
kevinhu Aug 3, 2021
8a4de6d
Begin separation of quickstart and config details
kevinhu Aug 3, 2021
8bf27a5
Write generic sqlalchemy options
kevinhu Aug 3, 2021
3dbb736
Up to looker
kevinhu Aug 3, 2021
186235f
Add all config vars
kevinhu Aug 4, 2021
35ecc45
Add source config docs
kevinhu Aug 4, 2021
73a42fd
Clean up quickstart configs
kevinhu Aug 4, 2021
b1bf7e7
Update usage docs
kevinhu Aug 4, 2021
5933f1f
Formatting
kevinhu Aug 4, 2021
bbbe612
Revise capabilities
kevinhu Aug 4, 2021
30f9e6f
Merge branch 'master' of github.com:kevinhu/datahub into reorganize-docs
kevinhu Aug 4, 2021
9cf1acb
Merge
kevinhu Aug 6, 2021
aa608b6
PR fixes
kevinhu Aug 6, 2021
f429324
Add link back to main readme
kevinhu Aug 6, 2021
5fbac7b
Add link back to recipe section
kevinhu Aug 6, 2021
387137f
Add sink config placeholder
kevinhu Aug 6, 2021
34d6c57
Categories
kevinhu Aug 6, 2021
625baa0
Remove sink compatibility
kevinhu Aug 6, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add links
  • Loading branch information
kevinhu committed Jul 27, 2021
commit 0916b7532fc5de9fb0d544fc176ea8acff26b4c1
8 changes: 8 additions & 0 deletions docs-website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ module.exports = {
//"docs/what/gms",
"datahub-web-react/README",
],
"Metadata Ingestion": [
// {
// Sources: list_ids_in_directory("metadata-ingestion/source_docs"),
// },
{
Sinks: list_ids_in_directory("metadata-ingestion/sink_docs"),
},
],
"Metadata Modeling": [
"docs/modeling/metadata-model",
"docs/modeling/extending-the-metadata-model",
Expand Down
127 changes: 39 additions & 88 deletions metadata-ingestion/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,37 +28,45 @@ If you run into an error, try checking the [_common setup issues_](./developing.

#### Installing Plugins

We use a plugin architecture so that you can install only the dependencies you actually need.

| Plugin Name | Install Command | Provides |
| --------------- | ---------------------------------------------------------- | ----------------------------------- |
| file | _included by default_ | File source and sink |
| console | _included by default_ | Console sink |
| athena | `pip install 'acryl-datahub[athena]'` | AWS Athena source |
| bigquery | `pip install 'acryl-datahub[bigquery]'` | BigQuery source |
| bigquery-usage | `pip install 'acryl-datahub[bigquery-usage]'` | BigQuery usage statistics source |
| feast | `pip install 'acryl-datahub[feast]'` | Feast source |
| glue | `pip install 'acryl-datahub[glue]'` | AWS Glue source |
| hive | `pip install 'acryl-datahub[hive]'` | Hive source |
| mssql | `pip install 'acryl-datahub[mssql]'` | SQL Server source |
| mysql | `pip install 'acryl-datahub[mysql]'` | MySQL source |
| oracle | `pip install 'acryl-datahub[oracle]'` | Oracle source |
| postgres | `pip install 'acryl-datahub[postgres]'` | Postgres source |
| redshift | `pip install 'acryl-datahub[redshift]'` | Redshift source |
| sagemaker | `pip install 'acryl-datahub[sagemaker]'` | AWS SageMaker source |
| sqlalchemy | `pip install 'acryl-datahub[sqlalchemy]'` | Generic SQLAlchemy source |
| snowflake | `pip install 'acryl-datahub[snowflake]'` | Snowflake source |
| snowflake-usage | `pip install 'acryl-datahub[snowflake-usage]'` | Snowflake usage statistics source |
| superset | `pip install 'acryl-datahub[superset]'` | Superset source |
| mongodb | `pip install 'acryl-datahub[mongodb]'` | MongoDB source |
| ldap | `pip install 'acryl-datahub[ldap]'` ([extra requirements]) | LDAP source |
| looker | `pip install 'acryl-datahub[looker]'` | Looker source |
| lookml | `pip install 'acryl-datahub[lookml]'` | LookML source, requires Python 3.7+ |
| kafka | `pip install 'acryl-datahub[kafka]'` | Kafka source |
| druid | `pip install 'acryl-datahub[druid]'` | Druid Source |
| dbt | _no additional dependencies_ | dbt source |
| datahub-rest | `pip install 'acryl-datahub[datahub-rest]'` | DataHub sink over REST API |
| datahub-kafka | `pip install 'acryl-datahub[datahub-kafka]'` | DataHub sink over Kafka |
We use a plugin architecture so that you can install only the dependencies you actually need. Click the plugin name to learn more about the specific source recipe and any FAQs!

Sources:

| Plugin Name | Install Command | Provides |
| --------------------------------------------- | ---------------------------------------------------------- | ----------------------------------- | --- |
| [file](./source_docs/file.md) | _included by default_ | File source and sink |
| [athena](./source_docs/athena.md) | `pip install 'acryl-datahub[athena]'` | AWS Athena source |
| [bigquery](./source_docs/bigquery.md) | `pip install 'acryl-datahub[bigquery]'` | BigQuery source |
| [bigquery-usage](./source_docs/bigquery.md) | `pip install 'acryl-datahub[bigquery-usage]'` | BigQuery usage statistics source |
| [dbt](./source_docs/dbt.md) | _no additional dependencies_ | dbt source |
| [druid](./source_docs/druid.md) | `pip install 'acryl-datahub[druid]'` | Druid Source |
| [feast](./source_docs/feast.md) | `pip install 'acryl-datahub[feast]'` | Feast source |
| [glue](./source_docs/glue.md) | `pip install 'acryl-datahub[glue]'` | AWS Glue source |
| [hive](./source_docs/hive.md) | `pip install 'acryl-datahub[hive]'` | Hive source |
| [kafka](./source_docs/kafka.md) | `pip install 'acryl-datahub[kafka]'` | Kafka source | |
| [ldap](./source_docs/ldap.md) | `pip install 'acryl-datahub[ldap]'` ([extra requirements]) | LDAP source |
| [looker](./source_docs/looker.md) | `pip install 'acryl-datahub[looker]'` | Looker source |
| [lookml](./source_docs/lookml.md) | `pip install 'acryl-datahub[lookml]'` | LookML source, requires Python 3.7+ |
| [mongodb](./source_docs/mongodb.md) | `pip install 'acryl-datahub[mongodb]'` | MongoDB source |
| [mssql](./source_docs/mssql.md) | `pip install 'acryl-datahub[mssql]'` | SQL Server source |
| [mysql](./source_docs/mysql.md) | `pip install 'acryl-datahub[mysql]'` | MySQL source |
| [oracle](./source_docs/oracle.md) | `pip install 'acryl-datahub[oracle]'` | Oracle source |
| [postgres](./source_docs/postgres.md) | `pip install 'acryl-datahub[postgres]'` | Postgres source |
| [redshift](./source_docs/redshift.md) | `pip install 'acryl-datahub[redshift]'` | Redshift source |
| [sagemaker](./source_docs/sagemaker.md) | `pip install 'acryl-datahub[sagemaker]'` | AWS SageMaker source |
| [sqlalchemy](./source_docs/sqlalchemy.md) | `pip install 'acryl-datahub[sqlalchemy]'` | Generic SQLAlchemy source |
| [snowflake](./source_docs/snowflake.md) | `pip install 'acryl-datahub[snowflake]'` | Snowflake source |
| [snowflake-usage](./source_docs/snowflake.md) | `pip install 'acryl-datahub[snowflake-usage]'` | Snowflake usage statistics source |
| [superset](./source_docs/superset.md) | `pip install 'acryl-datahub[superset]'` | Superset source |

Sinks

| Plugin Name | Install Command | Provides |
| --------------------------------------- | -------------------------------------------- | -------------------------- |
| [file](./sink_docs/file.md) | _included by default_ | File source and sink |
| [console](./sink_docs/console.md) | _included by default_ | Console sink |
| [datahub-rest](./sink_docs/datahub.md) | `pip install 'acryl-datahub[datahub-rest]'` | DataHub sink over REST API |
| [datahub-kafka](./sink_docs/datahub.md) | `pip install 'acryl-datahub[datahub-kafka]'` | DataHub sink over Kafka |

These plugins can be mixed and matched as desired. For example:

Expand Down Expand Up @@ -138,63 +146,6 @@ datahub ingest -c ./examples/recipes/mssql_to_datahub.yml

A number of recipes are included in the examples/recipes directory.

## Sinks

### DataHub Rest `datahub-rest`

Pushes metadata to DataHub using the GMA rest API. The advantage of the rest-based interface
is that any errors can immediately be reported.

```yml
sink:
type: "datahub-rest"
config:
server: "http:https://localhost:8080"
```

### DataHub Kafka `datahub-kafka`

Pushes metadata to DataHub by publishing messages to Kafka. The advantage of the Kafka-based
interface is that it's asynchronous and can handle higher throughput. This requires the
Datahub mce-consumer container to be running.

```yml
sink:
type: "datahub-kafka"
config:
connection:
bootstrap: "localhost:9092"
producer_config: {} # passed to https://docs.confluent.io/platform/current/clients/confluent-kafka-python/html/index.html#confluent_kafka.SerializingProducer
schema_registry_url: "http:https://localhost:8081"
schema_registry_config: {} # passed to https://docs.confluent.io/platform/current/clients/confluent-kafka-python/html/index.html#confluent_kafka.schema_registry.SchemaRegistryClient
```

The options in the producer config and schema registry config are passed to the Kafka SerializingProducer and SchemaRegistryClient respectively.

For a full example with a number of security options, see this [example recipe](./examples/recipes/secured_kafka.yml).

### Console `console`

Simply prints each metadata event to stdout. Useful for experimentation and debugging purposes.

```yml
sink:
type: "console"
```

### File `file`

Outputs metadata to a file. This can be used to decouple metadata sourcing from the
process of pushing it into DataHub, and is particularly useful for debugging purposes.
Note that the file source can read files generated by this sink.

```yml
sink:
type: file
config:
filename: ./path/to/mce/file.json
```

## Transformations

Beyond basic ingestion, sometimes there might exist a need to modify the source data before passing it on to the sink.
Expand Down
8 changes: 8 additions & 0 deletions metadata-ingestion/sink_docs/console.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Console `console`

Simply prints each metadata event to stdout. Useful for experimentation and debugging purposes.

```yml
sink:
type: "console"
```
32 changes: 32 additions & 0 deletions metadata-ingestion/sink_docs/datahub.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# DataHub Rest `datahub-rest`

Pushes metadata to DataHub using the GMA rest API. The advantage of the rest-based interface
is that any errors can immediately be reported.

```yml
sink:
type: "datahub-rest"
config:
server: "http:https://localhost:8080"
```

# DataHub Kafka `datahub-kafka`

Pushes metadata to DataHub by publishing messages to Kafka. The advantage of the Kafka-based
interface is that it's asynchronous and can handle higher throughput. This requires the
Datahub mce-consumer container to be running.

```yml
sink:
kevinhu marked this conversation as resolved.
Show resolved Hide resolved
type: "datahub-kafka"
config:
connection:
bootstrap: "localhost:9092"
producer_config: {} # passed to https://docs.confluent.io/platform/current/clients/confluent-kafka-python/html/index.html#confluent_kafka.SerializingProducer
schema_registry_url: "http:https://localhost:8081"
schema_registry_config: {} # passed to https://docs.confluent.io/platform/current/clients/confluent-kafka-python/html/index.html#confluent_kafka.schema_registry.SchemaRegistryClient
```

The options in the producer config and schema registry config are passed to the Kafka SerializingProducer and SchemaRegistryClient respectively.

For a full example with a number of security options, see this [example recipe](./examples/recipes/secured_kafka.yml).
12 changes: 12 additions & 0 deletions metadata-ingestion/sink_docs/file.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# File `file`

Outputs metadata to a file. This can be used to decouple metadata sourcing from the
process of pushing it into DataHub, and is particularly useful for debugging purposes.
Note that the file source can read files generated by this sink.

```yml
sink:
type: file
config:
filename: ./path/to/mce/file.json
```
Empty file.
2 changes: 1 addition & 1 deletion metadata-ingestion/source_docs/file.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ source:
type: file
config:
filename: ./path/to/mce/file.json
```
```