Skip to content

Commit 7b1633e

Browse files
author
Amit Kumar
committed
Rename Db2 provider to IBM Db2 provider
Move provider from `providers/db2/` to `providers/ibm/db2/` and update package name from `apache-airflow-providers-db2` to `apache-airflow-providers-ibm-db2`. Updates all import paths, documentation, tests, and workspace configuration.
1 parent 3b7c390 commit 7b1633e

37 files changed

Lines changed: 469 additions & 118 deletions

.github/boring-cyborg.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,8 @@ labelPRBasedOnFilePath:
122122

123123
provider:datadog:
124124
- providers/datadog/**
125-
provider:db2:
126-
- providers/db2/**
127-
125+
provider:ibm-db2:
126+
- providers/ibm/db2/**
128127

129128
provider:dbt-cloud:
130129
- providers/dbt/cloud/**
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
specific language governing permissions and limitations
1616
under the License.
1717
18-
``apache-airflow-providers-db2``
19-
=================================
18+
``apache-airflow-providers-ibm-db2``
19+
=====================================
2020

2121
Provider package for IBM Db2 database support in Apache Airflow.
2222

@@ -27,7 +27,7 @@ You can install this package via pip:
2727

2828
.. code-block:: bash
2929
30-
pip install apache-airflow-providers-db2
30+
pip install apache-airflow-providers-ibm-db2
3131
3232
Requirements
3333
------------
@@ -69,7 +69,7 @@ Using the Db2Hook
6969

7070
.. code-block:: python
7171
72-
from airflow.providers.db2.hooks.db2 import Db2Hook
72+
from airflow.providers.ibm.db2.hooks.db2 import Db2Hook
7373
7474
hook = Db2Hook(db2_conn_id="db2_default")
7575
records = hook.get_records("SELECT * FROM employees WHERE dept = %s", parameters=("IT",))
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
.. Licensed to the Apache Software Foundation (ASF) under one
2+
or more contributor license agreements. See the NOTICE file
3+
distributed with this work for additional information
4+
regarding copyright ownership. The ASF licenses this file
5+
to you under the Apache License, Version 2.0 (the
6+
"License"); you may not use this file except in compliance
7+
with the License. You may obtain a copy of the License at
8+
9+
.. http://www.apache.org/licenses/LICENSE-2.0
10+
11+
.. Unless required by applicable law or agreed to in writing,
12+
software distributed under the License is distributed on an
13+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
KIND, either express or implied. See the License for the
15+
specific language governing permissions and limitations
16+
under the License.
17+
18+
.. NOTE TO CONTRIBUTORS:
19+
Please, only add notes to the Changelog just below the "Changelog" header when there are some breaking changes
20+
and you want to add an explanation to the users on how they are supposed to deal with them.
21+
The changelog is updated and maintained semi-automatically by release manager.
22+
23+
``apache-airflow-providers-ibm-db2``
24+
25+
26+
Changelog
27+
---------
28+
29+
1.0.0
30+
.....
31+
32+
Initial version of the provider.
File renamed without changes.
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
.. Licensed to the Apache Software Foundation (ASF) under one
2+
or more contributor license agreements. See the NOTICE file
3+
distributed with this work for additional information
4+
regarding copyright ownership. The ASF licenses this file
5+
to you under the Apache License, Version 2.0 (the
6+
"License"); you may not use this file except in compliance
7+
with the License. You may obtain a copy of the License at
8+
9+
.. http://www.apache.org/licenses/LICENSE-2.0
10+
11+
.. Unless required by applicable law or agreed to in writing,
12+
software distributed under the License is distributed on an
13+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
KIND, either express or implied. See the License for the
15+
specific language governing permissions and limitations
16+
under the License.
17+
18+
.. _howto/connection:Db2:
19+
20+
IBM Db2 Connection
21+
==================
22+
23+
The IBM Db2 connection type enables connection to IBM Db2 databases.
24+
25+
Configuring the Connection
26+
---------------------------
27+
28+
Host (required)
29+
The host to connect to.
30+
31+
Schema (optional)
32+
Specify the schema name to be used in the database.
33+
34+
Login (required)
35+
Specify the user name to connect.
36+
37+
Password (required)
38+
Specify the password to connect.
39+
40+
Port (optional)
41+
Port of the Db2 database. Default is 50000.
42+
43+
Extra (optional)
44+
Specify the extra parameters (as json dictionary) that can be used in the
45+
Db2 connection. The following parameters are supported:
46+
47+
* ``database`` - The database name to connect to.
48+
* ``protocol`` - The protocol to use (default: TCPIP).
49+
* ``security`` - Security protocol (e.g., SSL).
50+
* Any other parameter supported by the IBM Db2 driver.
51+
52+
Example "extras" field:
53+
54+
.. code-block:: json
55+
56+
{
57+
"database": "sample",
58+
"protocol": "TCPIP",
59+
"security": "SSL"
60+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
.. Licensed to the Apache Software Foundation (ASF) under one
2+
or more contributor license agreements. See the NOTICE file
3+
distributed with this work for additional information
4+
regarding copyright ownership. The ASF licenses this file
5+
to you under the Apache License, Version 2.0 (the
6+
"License"); you may not use this file except in compliance
7+
with the License. You may obtain a copy of the License at
8+
9+
.. http://www.apache.org/licenses/LICENSE-2.0
10+
11+
.. Unless required by applicable law or agreed to in writing,
12+
software distributed under the License is distributed on an
13+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
KIND, either express or implied. See the License for the
15+
specific language governing permissions and limitations
16+
under the License.
17+
18+
Example DAGs
19+
============
20+
21+
.. toctree::
22+
:maxdepth: 1
23+
:glob:
24+
25+
*

providers/ibm/db2/docs/index.rst

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
.. Licensed to the Apache Software Foundation (ASF) under one
2+
or more contributor license agreements. See the NOTICE file
3+
distributed with this work for additional information
4+
regarding copyright ownership. The ASF licenses this file
5+
to you under the Apache License, Version 2.0 (the
6+
"License"); you may not use this file except in compliance
7+
with the License. You may obtain a copy of the License at
8+
9+
.. http://www.apache.org/licenses/LICENSE-2.0
10+
11+
.. Unless required by applicable law or agreed to in writing,
12+
software distributed under the License is distributed on an
13+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
KIND, either express or implied. See the License for the
15+
specific language governing permissions and limitations
16+
under the License.
17+
18+
``apache-airflow-providers-ibm-db2``
19+
=====================================
20+
21+
.. toctree::
22+
:hidden:
23+
:maxdepth: 1
24+
:caption: Basics
25+
26+
Home <self>
27+
Changelog <changelog>
28+
Security <security>
29+
30+
.. toctree::
31+
:hidden:
32+
:maxdepth: 1
33+
:caption: Guides
34+
35+
Connection types <connections>
36+
Operators <operators>
37+
38+
.. toctree::
39+
:hidden:
40+
:maxdepth: 1
41+
:caption: Resources
42+
43+
Example DAGs <example-dags>
44+
PyPI Repository <https://pypi.org/project/apache-airflow-providers-ibm-db2/>
45+
Installing from sources <installing-providers-from-sources>
46+
47+
.. toctree::
48+
:hidden:
49+
:maxdepth: 1
50+
:caption: System tests
51+
52+
System Tests <_api/tests/system/providers/ibm/db2/index>
53+
54+
.. toctree::
55+
:hidden:
56+
:maxdepth: 1
57+
:caption: Commits
58+
59+
Detailed list of commits <commits>
60+
61+
62+
Package apache-airflow-providers-ibm-db2
63+
-----------------------------------------
64+
65+
`IBM Db2 <https://www.ibm.com/products/db2>`__
66+
67+
68+
Release: 1.0.0
69+
70+
Provider package
71+
----------------
72+
73+
This package is for the ``ibm.db2`` provider.
74+
All classes for this package are in the ``airflow.providers.ibm.db2`` python package.
75+
76+
Installation
77+
------------
78+
79+
You can install this package on top of an existing Airflow 3.0+ installation via
80+
``pip install apache-airflow-providers-ibm-db2``
81+
82+
Requirements
83+
------------
84+
85+
The minimum Apache Airflow version supported by this provider package is ``3.0.0``.
86+
87+
======================================= ==================
88+
PIP package Version required
89+
======================================= ==================
90+
``apache-airflow`` ``>=3.0.0``
91+
``apache-airflow-providers-common-sql`` ``>=1.18.0``
92+
``ibm-db`` ``>=3.0.0``
93+
``ibm-db-sa`` ``>=0.4.0``
94+
======================================= ==================

0 commit comments

Comments
 (0)