aidp-db2
/aidp-db2
Odczytuje lub zapisuje IBM Db2 z notatnika AIDP przez format Spark aidataplatform, z logowaniem hostem, portem, nazwą bazy oraz użytkownikiem i hasłem.
- Autor
- oracle-samples ↗
- Repozytorium
- oracle-aidp-samples ↗
- Licencja
- UPL-1.0
- Ostatnia zmiana repozytorium
- 26.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 1
Brak sygnałów. Repozytorium zmienione 26.10.2026, bez odwołań do wycofanych modeli i API.
UPL-1.0, otwarta.
Co robi i kiedy
Odczytuje lub zapisuje IBM Db2 z notatnika AIDP przez format Spark aidataplatform, z logowaniem hostem, portem, nazwą bazy oraz użytkownikiem i hasłem.
Oryginalny opis (EN)
Read or write IBM Db2 from an AIDP notebook through the AIDP `aidataplatform` Spark format handler. Use when the user mentions DB2, IBM Db2, LUW, or `type=DB2`. Auth is host/port + database name + user/password.
Jak działa
- When to use
- When NOT to use
- Ingestion read
- Ingestion write
- Pushdown SQL
- Gotchas
- References
Podgląd SKILL.md
---
name: aidp-db2
description: Read or write IBM Db2 from an AIDP notebook through the AIDP `aidataplatform` Spark format handler. Use when the user mentions DB2, IBM Db2, LUW, or `type=DB2`. Auth is host/port + database name + user/password.
allowed-tools: Read, Write, Edit, Bash
---
# `aidp-db2` — IBM Db2 via AIDP `aidataplatform`
Use the built-in AIDP Db2 connector (`type=DB2`) for ingestion reads, writes, and SQL pushdown. External-catalog support is not included in the 4.1 release.
## When to use
- Read from or write to an IBM Db2 database from an AIDP notebook.
- Mentioned: "DB2", "Db2", "IBM Db2", or `type=DB2`.
## When NOT to use
- For a database without a dedicated AIDP connector → [`aidp-jdbc-custom`](../aidp-jdbc-custom/SKILL.md).
- For a Db2 external-catalog request; that capability is not available in 4.1.
## Ingestion read
```python
import os
from oracle_ai_data_platform_connectors.aidataplatform import (
AIDP_FORMAT, aidataplatform_options,
)
opts = aidataplatform_options(
type="DB2",
host=os.environ["DB2_HOST"],
port=int(os.environ.get("DB2_PORT", "50000")),
database_name=os.environ["DB2_DATABASE"],
user=os.environ["DB2_USER"],
password=os.environ["DB2_PASSWORD"],
schema=os.environ["DB2_SCHEMA"],
table=os.environ["DB2_TABLE"],
)
df = spark.read.format(AIDP_FORMAT).options(**opts).load()
df.show(5)
```
## Ingestion write
`CREATE`, `APPEND`, `OVERWRITE`, and `MERGE` are supported. `write.merge.keys` is required for `MERGE`.
```python
write_opts = aidataplatform_options(
type="DB2",
host=os.environ["DB2_HOST"],
port=int(os.environ.get("DB2_PORT", "50000")),
database_name=os.environ["DB2_DATABASE"],
user=os.environ["DB2_USER"],
password=os.environ["DB2_PASSWORD"],
schema=os.environ["DB2_SCHEMA"],
table=os.environ["DB2_TARGET_TABLE"],
extra={"write.mode": "CREATE"},
)
df.write.format(AIDP_FORMAT).options(**write_opts).save()
```
## Pushdown SQL
```python
pushdown_df = (spark.read.format(AIDP_FORMAT)
.options(**opts)
.option("pushdown.sql", "SELECT * FROM <SCHEMA>.<TABLE_NAME> FETCH FIRST 10 ROWS ONLY")
.load())
pushdown_df.show(5)
```
## Gotchas
- Use `DB2`, not the generic JDBC connector type.
- `database.name` is required for Db2.
- Db2 external-catalog access is not included in the 4.1 release.
## References
- Official sample: [Db2 notebook](https://github.com/oracle-samples/oracle-aidp-samples/blob/main/data-engineering/ingestion/Read_Write_External_Ecosystem_Connectors/DB2.ipynb)
Wersje
W bazie nie ma innych skilli o nazwie aidp-db2.
Identyczna treść występuje jeszcze w 2 innych folderach na GitHubie. Tu pokazujemy jedną, najlepiej ocenioną kopię.
Migawka bazy z 28.10.2026 · wersja paczki d90d428ea94f (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100aidp-sqlserver
Odczytuje lub zapisuje Microsoft SQL Server z notatnika AIDP przez format Spark aidataplatform, z hostem, portem, bazą, użytkownikiem i hasłem. - 100aidp-azuresql
Odczytuje lub zapisuje Azure SQL Database z notatnika AIDP przez format Spark aidataplatform, z logowaniem nazwą użytkownika i hasłem.