Oracle miner app
The Oracle miner app mines query history (from Oracle's AWR) to generate lineage and
usage metrics. Build it with the OracleMiner builder.
A miner does not create a connection or take a credential—it runs with an
existing Oracle connection and reuses that connection's own credential, so you
only supply the connection's qualifiedName.
Source extraction
- Python
Mine query history from Oracle
import time
from pyatlan.client.atlan import AtlanClient
from pyatlan.model.apps import OracleMiner
client = AtlanClient()
response = (
OracleMiner(client)
.connection( # (1)
qualified_name="default/oracle/1700000000",
)
.start_date(int(time.time()) - 30 * 86400) # (2)
.run(name="oracle-prod-miner") # (3)
)
print(response.slug, response.run_id)
- Required. The exact
qualifiedNameof the existing Oracle connection to mine. Its credential is reused—no credential step is needed. - Optional. How far back to mine, as an epoch timestamp in seconds (the miner's AWR cutoff). The example mines the last 30 days; omit to use the miner's default window.
- Always pass an explicit
namefor miners—a bare.run()defaults to the app id (oracle-miner) and a second run collides.