datasource
Read ../idmp-shared/SKILL.md first.
What this skill covers
- Inspect datasource connections, redacted connection details, connectivity probes, database and table discovery, and column metadata.
- Keep read-first metadata diagnosis separate from mutating import workflows.
Recommended reference
references/datasource-read-flows.md
Missing context to resolve first
- Credential source.
- Verification rereads.
- Which datasource connection or environment is in scope.
- Which database, table, or stable must be traced.
- Whether the operator wants metadata only or a full model-to-source mapping explanation.
Constrained live behaviors
datasource connections getcan return redacted secrets.datasource check listis the safe health probe.datasource columninfo createis a write-like metadata probe.- Connection reads can be redacted and still be usable for diagnosis.
- Connectivity probes validate reachability, not schema correctness.
- Metadata walks should stay ordered: connection -> connectivity -> databases -> tables -> columns.
- Source-to-model explanations must use the real mapped fields, not guessed TDengine column names.
Execution flow
- Start with
idmp-cli datasource connections list, then lock the exact connection throughconnections get. - Run
idmp-cli datasource check listbefore deeper diagnosis so connection-health boundaries are explicit. - Use
idmp-cli datasource connectivity create --ack-risk --dataonly after the target connection is fixed; treat it as live reachability proof, not schema proof. - Walk
dbnames -> tablenames -> columninfoin order so every metadata claim stays grounded in the same database and table scope. - Finish by comparing the discovered source fields against the real model mapping rather than guessed TDengine column names.
Evidence of completion
- A connection diagnosis is only complete when the connection reread and the health probe refer to the same connection ID.
- A metadata claim is only complete when the same database and table survive the
dbnames -> tablenames -> columninfochain. - Redacted connection reads are still valid evidence; never treat masked secrets as missing data.
Key commands
idmp-cli datasource connections listto find the target connection.idmp-cli datasource connections get --paramsto inspect the selected connection object.idmp-cli datasource check listto read built-in datasource health summaries.idmp-cli datasource connectivity create --ack-risk --datato probe live reachability.idmp-cli datasource dbnames list --paramsto enumerate databases.idmp-cli datasource tablenames list --paramsto enumerate tables or stables.idmp-cli datasource columninfo create --ack-risk --paramsto lock the final metadata shape.
Exception paths
- If connectivity fails, stop before interpreting missing tables as modeling problems.
- If column metadata is missing, show the exact database and table boundary that failed.
- Never unredact or log credentials from a connection read.
Validation scenarios
1. Connection discovery
Start with idmp-cli datasource connections list, then pick one connection for deeper reads. The next step should always be a targeted get.
2. Redaction-aware connection read
Use idmp-cli datasource connections get --params and accept masked secrets. Diagnosis can continue without exposing credentials.
3. Built-in health check
Run idmp-cli datasource check list and idmp-cli datasource connectivity create --ack-risk --data together. Separate summary checks from a live reachability probe.
4. Database and table discovery
Walk idmp-cli datasource dbnames list --params and idmp-cli datasource tablenames list --params in order. Do not jump straight to columns without a verified table target.
5. Metadata closure
Finish with idmp-cli datasource columninfo create --ack-risk --params. Treat successful dbnames -> tablenames -> columninfo as a real metadata closure.