ingestr 0.2.1__tar.gz → 0.2.3__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.
Potentially problematic release.
This version of ingestr might be problematic. Click here for more details.
- {ingestr-0.2.1 → ingestr-0.2.3}/Makefile +1 -1
- {ingestr-0.2.1 → ingestr-0.2.3}/PKG-INFO +1 -1
- {ingestr-0.2.1 → ingestr-0.2.3}/ingestr/src/destinations.py +22 -5
- {ingestr-0.2.1 → ingestr-0.2.3}/ingestr/src/factory.py +2 -0
- ingestr-0.2.3/ingestr/src/version.py +1 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/ingestr/testdata/test_create_replace.db +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/ingestr/testdata/test_delete_insert_with_timerange.db +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/ingestr/testdata/test_delete_insert_without_primary_key.db +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/ingestr/testdata/test_merge_with_primary_key.db +0 -0
- ingestr-0.2.1/ingestr/src/version.py +0 -1
- {ingestr-0.2.1 → ingestr-0.2.3}/.dockerignore +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/.github/workflows/deploy-docs.yml +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/.github/workflows/docker.yml +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/.gitignore +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/Dockerfile +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/LICENSE.md +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/README.md +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/docs/.vitepress/config.mjs +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/docs/.vitepress/theme/custom.css +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/docs/.vitepress/theme/index.js +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/docs/commands/example-uris.md +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/docs/commands/ingest.md +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/docs/getting-started/core-concepts.md +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/docs/getting-started/incremental-loading.md +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/docs/getting-started/quickstart.md +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/docs/getting-started/telemetry.md +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/docs/index.md +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/docs/supported-sources/bigquery.md +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/docs/supported-sources/csv.md +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/docs/supported-sources/databricks.md +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/docs/supported-sources/duckdb.md +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/docs/supported-sources/mongodb.md +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/docs/supported-sources/mssql.md +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/docs/supported-sources/mysql.md +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/docs/supported-sources/oracle.md +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/docs/supported-sources/overview.md +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/docs/supported-sources/postgres.md +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/docs/supported-sources/redshift.md +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/docs/supported-sources/snowflake.md +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/docs/supported-sources/sqlite.md +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/ingestr/main.py +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/ingestr/main_test.py +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/ingestr/src/destinations_test.py +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/ingestr/src/factory_test.py +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/ingestr/src/mongodb/__init__.py +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/ingestr/src/mongodb/helpers.py +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/ingestr/src/sources.py +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/ingestr/src/sources_test.py +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/ingestr/src/sql_database/__init__.py +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/ingestr/src/sql_database/helpers.py +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/ingestr/src/sql_database/schema_types.py +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/ingestr/src/sql_database/settings.py +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/ingestr/src/telemetry/event.py +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/ingestr/src/testdata/fakebqcredentials.json +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/ingestr/testdata/.gitignore +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/package-lock.json +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/package.json +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/pyproject.toml +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/requirements-dev.txt +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/requirements.txt +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/resources/demo.gif +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/resources/demo.tape +0 -0
- {ingestr-0.2.1 → ingestr-0.2.3}/resources/ingestr.svg +0 -0
|
@@ -18,7 +18,7 @@ test: venv
|
|
|
18
18
|
. venv/bin/activate; $(MAKE) test-ci
|
|
19
19
|
|
|
20
20
|
test-specific: venv
|
|
21
|
-
. venv/bin/activate; pytest -rP -vv --tb=short --
|
|
21
|
+
. venv/bin/activate; pytest -rP -vv --tb=short --capture=no -k $(test)
|
|
22
22
|
|
|
23
23
|
lint-ci:
|
|
24
24
|
ruff ingestr --fix && ruff format ingestr
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ingestr
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.3
|
|
4
4
|
Summary: ingestr is a command-line application that ingests data from various sources and stores them in any database.
|
|
5
5
|
Project-URL: Homepage, https://github.com/bruin-data/ingestr
|
|
6
6
|
Project-URL: Issues, https://github.com/bruin-data/ingestr/issues
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import base64
|
|
1
2
|
import csv
|
|
2
3
|
import gzip
|
|
3
4
|
import json
|
|
@@ -32,8 +33,11 @@ class BigQueryDestination:
|
|
|
32
33
|
source_params = parse_qs(source_fields.query)
|
|
33
34
|
|
|
34
35
|
cred_path = source_params.get("credentials_path")
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
credentials_base64 = source_params.get("credentials_base64")
|
|
37
|
+
if not cred_path and not credentials_base64:
|
|
38
|
+
raise ValueError(
|
|
39
|
+
"credentials_path or credentials_base64 is required to connect BigQuery"
|
|
40
|
+
)
|
|
37
41
|
|
|
38
42
|
location = None
|
|
39
43
|
if source_params.get("location"):
|
|
@@ -42,11 +46,19 @@ class BigQueryDestination:
|
|
|
42
46
|
raise ValueError("Only one location is allowed")
|
|
43
47
|
location = loc_params[0]
|
|
44
48
|
|
|
45
|
-
|
|
46
|
-
|
|
49
|
+
credentials = {}
|
|
50
|
+
if cred_path:
|
|
51
|
+
with open(cred_path[0], "r") as f:
|
|
52
|
+
credentials = json.load(f)
|
|
53
|
+
elif credentials_base64:
|
|
54
|
+
credentials = json.loads(
|
|
55
|
+
base64.b64decode(credentials_base64[0]).decode("utf-8")
|
|
56
|
+
)
|
|
47
57
|
|
|
48
58
|
return dlt.destinations.bigquery(
|
|
49
|
-
credentials=credentials,
|
|
59
|
+
credentials=credentials, # type: ignore
|
|
60
|
+
location=location,
|
|
61
|
+
**kwargs,
|
|
50
62
|
)
|
|
51
63
|
|
|
52
64
|
def dlt_run_params(self, uri: str, table: str, **kwargs) -> dict:
|
|
@@ -99,6 +111,11 @@ class DatabricksDestination(GenericSqlDestination):
|
|
|
99
111
|
return dlt.destinations.databricks(credentials=uri, **kwargs)
|
|
100
112
|
|
|
101
113
|
|
|
114
|
+
class SynapseDestination(GenericSqlDestination):
|
|
115
|
+
def dlt_dest(self, uri: str, **kwargs):
|
|
116
|
+
return dlt.destinations.synapse(credentials=uri, **kwargs)
|
|
117
|
+
|
|
118
|
+
|
|
102
119
|
class CustomCsvDestination(dlt.destinations.filesystem):
|
|
103
120
|
pass
|
|
104
121
|
|
|
@@ -12,6 +12,7 @@ from ingestr.src.destinations import (
|
|
|
12
12
|
PostgresDestination,
|
|
13
13
|
RedshiftDestination,
|
|
14
14
|
SnowflakeDestination,
|
|
15
|
+
SynapseDestination,
|
|
15
16
|
)
|
|
16
17
|
from ingestr.src.sources import LocalCsvSource, MongoDbSource, SqlSource
|
|
17
18
|
|
|
@@ -94,6 +95,7 @@ class SourceDestinationFactory:
|
|
|
94
95
|
"redshift+psycopg2": RedshiftDestination(),
|
|
95
96
|
"redshift+redshift_connector": RedshiftDestination(),
|
|
96
97
|
"snowflake": SnowflakeDestination(),
|
|
98
|
+
"synapse": SynapseDestination(),
|
|
97
99
|
"csv": CsvDestination(),
|
|
98
100
|
}
|
|
99
101
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.2.3"
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.2.1"
|
|
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
|
|
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
|
|
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
|
|
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
|