Skip to content
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.

Commit

Permalink
Merge pull request #5 from mgorsk1/chore/docs
Browse files Browse the repository at this point in the history
chore: extend docs
  • Loading branch information
mgorsk1 committed Mar 23, 2024
2 parents 9aa03a6 + 03f2b8c commit 9022fa7
Showing 1 changed file with 44 additions and 1 deletion.
45 changes: 44 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,16 @@ An experimental [OpenLineage](https://github.com/OpenLineage/OpenLineage) integr
- Java 21
- Maven
- Trino 422
- [Marquez](https://github.com/MarquezProject/marquez)


## Mapping of properties

| OpenLineage | Trino |
|--------------------|-----------------------------------------------------|
| JobFacet Name | QueryID |
| JobFacet Namespace | Query Environment (or configured in event listener) |
| RunFacet ID | QueryID |


## Installation

Expand All @@ -25,4 +34,38 @@ Add the following line to `$TRINO_HOME/etc/event-listener.properties`:
```properties
event-listener.name=openlineage
openlineage.url=http://localhost:5000
#openlineage.facets.trinoMetadata.enabled=false
#openlineage.facets.trinoQueryContext.enabled=true
#openlineage.facets.trinoQueryStatistics.enabled=false
#openlineage.namespace=default
#openlineage.apikey=xxxx
```

## Local testing

1. Build plugin:

```shell
mvn clean install -DskipTests
```

2. Run docker compose:

```shell
docker compose up -d
```

- Freshly built plugin will be automatically mounted to your trino pod.
- Configuration of the plugin will be taken from `event-listener.properties` file - adjust it to your will and restart trino pod for changes to take effect.

3. Run query creating new table:

```shell
docker exec -it oltrino trino --execute 'create table memory.default.test_table as select * from tpch.sf1.nation limit 1;'
```

4. Check logs of mock api:

```shell
docker logs olapi
```

0 comments on commit 9022fa7

Please sign in to comment.