mkpipe-extractor-postgres 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mkpipe_extractor_postgres-0.1.0/MANIFEST.in +1 -0
- mkpipe_extractor_postgres-0.1.0/PKG-INFO +10 -0
- mkpipe_extractor_postgres-0.1.0/README.md +66 -0
- mkpipe_extractor_postgres-0.1.0/mkpipe_extractor_postgres/__init__.py +0 -0
- mkpipe_extractor_postgres-0.1.0/mkpipe_extractor_postgres/extractor.py +4 -0
- mkpipe_extractor_postgres-0.1.0/mkpipe_extractor_postgres/jar_paths.py +18 -0
- mkpipe_extractor_postgres-0.1.0/mkpipe_extractor_postgres.egg-info/PKG-INFO +10 -0
- mkpipe_extractor_postgres-0.1.0/mkpipe_extractor_postgres.egg-info/SOURCES.txt +11 -0
- mkpipe_extractor_postgres-0.1.0/mkpipe_extractor_postgres.egg-info/dependency_links.txt +1 -0
- mkpipe_extractor_postgres-0.1.0/mkpipe_extractor_postgres.egg-info/entry_points.txt +2 -0
- mkpipe_extractor_postgres-0.1.0/mkpipe_extractor_postgres.egg-info/top_level.txt +1 -0
- mkpipe_extractor_postgres-0.1.0/setup.cfg +4 -0
- mkpipe_extractor_postgres-0.1.0/setup.py +24 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
include mkpipe_extractor_postgres/jars/*
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: mkpipe-extractor-postgres
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: PostgreSQL extractor for mkpipe.
|
|
5
|
+
Author: Metin Karakus
|
|
6
|
+
Author-email: metin_karakus@yahoo.com
|
|
7
|
+
License: Apache License 2.0
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
10
|
+
Requires-Python: >=3.8
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# MkPipe
|
|
2
|
+
|
|
3
|
+
**MkPipe** is a modular, open-source ETL (Extract, Transform, Load) tool that allows you to integrate various data sources and sinks easily. It is designed to be extensible with a plugin-based architecture that supports extractors, transformers, and loaders.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- Extract data from multiple sources (e.g., PostgreSQL, MongoDB).
|
|
8
|
+
- Transform data using custom Python logic and Apache Spark.
|
|
9
|
+
- Load data into various sinks (e.g., ClickHouse, PostgreSQL, Parquet).
|
|
10
|
+
- Plugin-based architecture that supports future extensions.
|
|
11
|
+
- Cloud-native architecture, can be deployed on Kubernetes and other environments.
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
You can install the core package and extractors using pip:
|
|
16
|
+
|
|
17
|
+
### Install the core package:
|
|
18
|
+
```bash
|
|
19
|
+
pip install mkpipe-core
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### Install the Postgres extractor:
|
|
23
|
+
```bash
|
|
24
|
+
pip install mkpipe-extractor-postgres
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Install additional extractors or loaders as needed:
|
|
28
|
+
You can find or contribute new extractors and loaders in the future.
|
|
29
|
+
|
|
30
|
+
## Usage
|
|
31
|
+
|
|
32
|
+
To run the ETL process, use the following command:
|
|
33
|
+
|
|
34
|
+
```py
|
|
35
|
+
from mkpipe_core.plugins.registry import EXTRACTORS
|
|
36
|
+
|
|
37
|
+
def test_postgres_extractor():
|
|
38
|
+
postgres_extractor = EXTRACTORS.get("postgres")
|
|
39
|
+
if not postgres_extractor:
|
|
40
|
+
print("Postgres extractor not found!")
|
|
41
|
+
return
|
|
42
|
+
instance = postgres_extractor()
|
|
43
|
+
instance.extract()
|
|
44
|
+
|
|
45
|
+
if __name__ == "__main__":
|
|
46
|
+
test_postgres_extractor()
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Where `elt.yaml` is your configuration file that specifies the extractors, transformers, and loaders.
|
|
51
|
+
|
|
52
|
+
## Documentation
|
|
53
|
+
|
|
54
|
+
For more detailed documentation, please visit the [GitHub repository](https://github.com/m-karakus/mkpipe).
|
|
55
|
+
|
|
56
|
+
## License
|
|
57
|
+
|
|
58
|
+
This project is licensed under the Apache 2.0 License - see the [LICENSE](LICENSE) file for details.
|
|
59
|
+
|
|
60
|
+
## Support Me
|
|
61
|
+
|
|
62
|
+
If you enjoy this project, consider supporting me:
|
|
63
|
+
|
|
64
|
+
<iframe src="https://github.com/sponsors/m-karakus/button" title="Sponsor m-karakus" height="32" width="114" style="border: 0; border-radius: 6px;"></iframe>
|
|
65
|
+
|
|
66
|
+
[Support on GitHub](https://github.com/sponsors/m-karakus?frequency=one-time&sponsor=m-karakus)
|
|
File without changes
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import pkg_resources
|
|
2
|
+
import os
|
|
3
|
+
|
|
4
|
+
def get_jar_path(filename):
|
|
5
|
+
package_name = "mkpipe-core" # Adjust according to where the jars are located
|
|
6
|
+
try:
|
|
7
|
+
jar_path = pkg_resources.resource_filename(package_name, f'jars/{filename}')
|
|
8
|
+
if os.path.exists(jar_path):
|
|
9
|
+
return jar_path
|
|
10
|
+
else:
|
|
11
|
+
print(f"JAR file {filename} not found in package")
|
|
12
|
+
except Exception as e:
|
|
13
|
+
print(f"Error accessing JAR files: {e}")
|
|
14
|
+
return None
|
|
15
|
+
|
|
16
|
+
jar_path = get_jar_path("com.postgresql_driver.jar")
|
|
17
|
+
if jar_path:
|
|
18
|
+
print(f"Found JAR at {jar_path}")
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: mkpipe-extractor-postgres
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: PostgreSQL extractor for mkpipe.
|
|
5
|
+
Author: Metin Karakus
|
|
6
|
+
Author-email: metin_karakus@yahoo.com
|
|
7
|
+
License: Apache License 2.0
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
10
|
+
Requires-Python: >=3.8
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
MANIFEST.in
|
|
2
|
+
README.md
|
|
3
|
+
setup.py
|
|
4
|
+
mkpipe_extractor_postgres/__init__.py
|
|
5
|
+
mkpipe_extractor_postgres/extractor.py
|
|
6
|
+
mkpipe_extractor_postgres/jar_paths.py
|
|
7
|
+
mkpipe_extractor_postgres.egg-info/PKG-INFO
|
|
8
|
+
mkpipe_extractor_postgres.egg-info/SOURCES.txt
|
|
9
|
+
mkpipe_extractor_postgres.egg-info/dependency_links.txt
|
|
10
|
+
mkpipe_extractor_postgres.egg-info/entry_points.txt
|
|
11
|
+
mkpipe_extractor_postgres.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
mkpipe_extractor_postgres
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from setuptools import setup, find_packages
|
|
2
|
+
|
|
3
|
+
setup(
|
|
4
|
+
name="mkpipe-extractor-postgres",
|
|
5
|
+
version="0.1.0",
|
|
6
|
+
license="Apache License 2.0",
|
|
7
|
+
packages=find_packages(),
|
|
8
|
+
install_requires=[],
|
|
9
|
+
include_package_data=True,
|
|
10
|
+
entry_points={
|
|
11
|
+
"mkpipe.extractors": [
|
|
12
|
+
"postgres = mkpipe_extractor_postgres.extractor:PostgresExtractor",
|
|
13
|
+
],
|
|
14
|
+
},
|
|
15
|
+
description="PostgreSQL extractor for mkpipe.",
|
|
16
|
+
author="Metin Karakus",
|
|
17
|
+
author_email="metin_karakus@yahoo.com",
|
|
18
|
+
classifiers=[
|
|
19
|
+
"Programming Language :: Python :: 3",
|
|
20
|
+
"License :: OSI Approved :: Apache Software License",
|
|
21
|
+
],
|
|
22
|
+
python_requires=">=3.8",
|
|
23
|
+
)
|
|
24
|
+
|