Skip to content

Commit

Permalink
Merge pull request #15 from opendatadiscovery/bump_packages
Browse files Browse the repository at this point in the history
Bump packages
  • Loading branch information
ValeriyWorld authored Jun 21, 2024
2 parents 6d3927a + 52f0552 commit 9a69c4b
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 79 deletions.
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ export DBT_DATA_SOURCE_ODDRN=//dbt/host/localhost
```

### Commands
`create-datasource` - helps to register dbt as data source at OpenDataDiscovery platform. User later for ingesting metadata.
`create-datasource` - helps to register dbt as data source at OpenDataDiscovery platform. Used later for ingesting metadata.
Despite in the logs you can see something like: `export DBT_DATA_SOURCE_ODDRN=//dbt/host/http://localhost:8080` it doesn't
mean that script have exported it for you in terminal, so don't forget to do this command manually.
```commandline
odd_dbt_test create-datasource --name=my_local_dbt --dbt-host=localhost
```
Expand All @@ -56,6 +58,17 @@ odd_dbt_test create-datasource --name=my_local_dbt --dbt-host=localhost
```commandline
odd_dbt_test ingest-test --profile=my_profile
```
If you are not in the directory that is a targeted dbt_project you should specify absolute paths for parameters:
`--project-dir` and `--profiles-dir`, like this:
```commandline
odd_dbt_test ingest-test --project-dir=absolute_path_for_dbt_project --profiles-dir=absolute_path_for_dbt_profiles --profile=my_profile
```

`ingest-lineage` - Builds and ingest a lineage for tests into platform.
Executing style is simular to `ingest-test` command:
```commandline
odd_dbt_test ingest-lineage- --project-dir=absolute_path_for_dbt_project --profiles-dir=absolute_path_for_dbt_profiles --profile=my_profile
```

`test` - Proxy command to `dbt test`, then reads results_run file under the target folder to parse and ingest metadata.
```commandline
Expand Down
2 changes: 1 addition & 1 deletion odd_dbt/config.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from odd_models.api_client.v2.odd_api_client import Client
from pydantic import BaseSettings
from pydantic_settings import BaseSettings


class Config(BaseSettings):
Expand Down
20 changes: 10 additions & 10 deletions odd_dbt/domain/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@

class Project(BaseModel):
name: str
profile: Optional[str]
models_paths: Optional[List[str]] = Field(alias="models-paths")
seed_paths: Optional[List[str]] = Field(alias="seed-paths")
test_paths: Optional[List[str]] = Field(alias="test-paths")
analysis_paths: Optional[List[str]] = Field(alias="analysis-paths")
macro_paths: Optional[List[str]] = Field(alias="macro-paths")
snapshot_paths: Optional[List[str]] = Field(alias="snapshot-paths")
docs_paths: Optional[List[str]] = Field(alias="docs-paths")
asset_paths: Optional[List[str]] = Field(alias="asset-paths")
target_path: Optional[Path] = Field(alias="target-path")
profile: Optional[str] = None
models_paths: Optional[List[str]] = Field(None, alias="models-paths")
seed_paths: Optional[List[str]] = Field(None, alias="seed-paths")
test_paths: Optional[List[str]] = Field(None, alias="test-paths")
analysis_paths: Optional[List[str]] = Field(None, alias="analysis-paths")
macro_paths: Optional[List[str]] = Field(None, alias="macro-paths")
snapshot_paths: Optional[List[str]] = Field(None, alias="snapshot-paths")
docs_paths: Optional[List[str]] = Field(None, alias="docs-paths")
asset_paths: Optional[List[str]] = Field(None, alias="asset-paths")
target_path: Optional[Path] = Field(None, alias="target-path")
Loading

0 comments on commit 9a69c4b

Please sign in to comment.