-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
1,712 additions
and
1,607 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
from typing import Any | ||
|
||
from oddrn_generator import OracleGenerator | ||
|
||
from odd_collector_profiler.datasource.database.profiler import RDBProfiler | ||
from odd_collector_profiler.datasource.database.repository import OracleRepository | ||
from odd_collector_profiler.domain.config import OracleConfig | ||
from odd_collector_profiler.domain.profiler import Profiler | ||
from odd_collector_profiler.profilers import DATA_PROFILER | ||
|
||
|
||
SYS_SCHEMAS = {"xdb", "xs$null", "anonymous", "apex_040000", "apex_public_user", "ctxsys", "flows_files", "hr", "mdsys", | ||
"outln", "sys", "system"} | ||
|
||
|
||
class OracleProfiler(RDBProfiler): | ||
config_model = OracleConfig | ||
"""Profiler for Oracle datasource""" | ||
|
||
|
||
def register_profiler(config: dict[str, Any]) -> Profiler: | ||
config = OracleConfig.parse_obj(config) | ||
repository = OracleRepository(config=config, skip_schemas=SYS_SCHEMAS) | ||
generator = OracleGenerator( | ||
host_settings=config.host, databases=config.database, schemas=config.user | ||
) | ||
return OracleProfiler( | ||
config=config, | ||
generator=generator, | ||
repository=repository, | ||
profiler=DATA_PROFILER, | ||
) |
Oops, something went wrong.