mkpipe-extractor-postgres 0.2.4__tar.gz → 0.3.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.2.4/mkpipe_extractor_postgres.egg-info → mkpipe_extractor_postgres-0.3.0}/PKG-INFO +1 -1
- mkpipe_extractor_postgres-0.3.0/mkpipe_extractor_postgres/__init__.py +15 -0
- {mkpipe_extractor_postgres-0.2.4 → mkpipe_extractor_postgres-0.3.0/mkpipe_extractor_postgres.egg-info}/PKG-INFO +1 -1
- {mkpipe_extractor_postgres-0.2.4 → mkpipe_extractor_postgres-0.3.0}/setup.py +1 -1
- mkpipe_extractor_postgres-0.2.4/mkpipe_extractor_postgres/__init__.py +0 -14
- {mkpipe_extractor_postgres-0.2.4 → mkpipe_extractor_postgres-0.3.0}/LICENSE +0 -0
- {mkpipe_extractor_postgres-0.2.4 → mkpipe_extractor_postgres-0.3.0}/MANIFEST.in +0 -0
- {mkpipe_extractor_postgres-0.2.4 → mkpipe_extractor_postgres-0.3.0}/README.md +0 -0
- {mkpipe_extractor_postgres-0.2.4 → mkpipe_extractor_postgres-0.3.0}/mkpipe_extractor_postgres/jars/mysql-connector-j-9.1.0.jar +0 -0
- {mkpipe_extractor_postgres-0.2.4 → mkpipe_extractor_postgres-0.3.0}/mkpipe_extractor_postgres/jars/oci-java-sdk-common-3.41.2.jar +0 -0
- {mkpipe_extractor_postgres-0.2.4 → mkpipe_extractor_postgres-0.3.0}/mkpipe_extractor_postgres/jars/org.postgresql_postgresql-42.7.4.jar +0 -0
- {mkpipe_extractor_postgres-0.2.4 → mkpipe_extractor_postgres-0.3.0}/mkpipe_extractor_postgres/jars/protobuf-java-4.26.1.jar +0 -0
- {mkpipe_extractor_postgres-0.2.4 → mkpipe_extractor_postgres-0.3.0}/mkpipe_extractor_postgres/registry_jar.py +0 -0
- {mkpipe_extractor_postgres-0.2.4 → mkpipe_extractor_postgres-0.3.0}/mkpipe_extractor_postgres.egg-info/SOURCES.txt +0 -0
- {mkpipe_extractor_postgres-0.2.4 → mkpipe_extractor_postgres-0.3.0}/mkpipe_extractor_postgres.egg-info/dependency_links.txt +0 -0
- {mkpipe_extractor_postgres-0.2.4 → mkpipe_extractor_postgres-0.3.0}/mkpipe_extractor_postgres.egg-info/entry_points.txt +0 -0
- {mkpipe_extractor_postgres-0.2.4 → mkpipe_extractor_postgres-0.3.0}/mkpipe_extractor_postgres.egg-info/requires.txt +0 -0
- {mkpipe_extractor_postgres-0.2.4 → mkpipe_extractor_postgres-0.3.0}/mkpipe_extractor_postgres.egg-info/top_level.txt +0 -0
- {mkpipe_extractor_postgres-0.2.4 → mkpipe_extractor_postgres-0.3.0}/setup.cfg +0 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
from mkpipe.spark import JdbcExtractor
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class PostgresExtractor(JdbcExtractor, variant='postgresql'):
|
|
5
|
+
driver_name = 'postgresql'
|
|
6
|
+
driver_jdbc = 'org.postgresql.Driver'
|
|
7
|
+
|
|
8
|
+
def build_jdbc_url(self):
|
|
9
|
+
url = (
|
|
10
|
+
f'jdbc:{self.driver_name}://{self.host}:{self.port}/{self.database}'
|
|
11
|
+
f'?user={self.username}&password={self.password}'
|
|
12
|
+
)
|
|
13
|
+
if self.schema:
|
|
14
|
+
url += f'¤tSchema={self.schema}'
|
|
15
|
+
return url
|
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
|
|
3
3
|
setup(
|
|
4
4
|
name='mkpipe-extractor-postgres',
|
|
5
|
-
version='0.
|
|
5
|
+
version='0.3.0',
|
|
6
6
|
license='Apache License 2.0',
|
|
7
7
|
packages=find_packages(exclude=['tests', 'scripts', 'deploy', 'install_jars.py']),
|
|
8
8
|
install_requires=['mkpipe'],
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
from mkpipe.functions_spark import BaseExtractor
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
class PostgresExtractor(BaseExtractor):
|
|
5
|
-
def __init__(self, config, settings):
|
|
6
|
-
super().__init__(
|
|
7
|
-
config,
|
|
8
|
-
settings,
|
|
9
|
-
driver_name='postgresql',
|
|
10
|
-
driver_jdbc='org.postgresql.Driver',
|
|
11
|
-
)
|
|
12
|
-
|
|
13
|
-
def build_jdbc_url(self):
|
|
14
|
-
return f'jdbc:{self.driver_name}://{self.host}:{self.port}/{self.database}?user={self.username}&password={self.password}¤tSchema={self.schema}'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|