ingestr 0.10.0rc0__tar.gz → 0.10.0rc2__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.10.0rc0 → ingestr-0.10.0rc2}/Makefile +1 -1
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/PKG-INFO +1 -1
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/main.py +28 -4
- ingestr-0.10.0rc2/ingestr/src/filters.py +7 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/sources.py +18 -0
- ingestr-0.10.0rc2/ingestr/src/version.py +1 -0
- ingestr-0.10.0rc0/ingestr/src/version.py +0 -1
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/.dockerignore +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/.github/workflows/deploy-docs.yml +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/.github/workflows/tests.yml +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/.gitignore +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/.python-version +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/.vale.ini +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/Dockerfile +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/LICENSE.md +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/README.md +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/docs/.vitepress/config.mjs +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/docs/.vitepress/theme/custom.css +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/docs/.vitepress/theme/index.js +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/docs/commands/example-uris.md +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/docs/commands/ingest.md +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/docs/getting-started/core-concepts.md +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/docs/getting-started/incremental-loading.md +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/docs/getting-started/quickstart.md +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/docs/getting-started/telemetry.md +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/docs/index.md +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/docs/supported-sources/adjust.md +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/docs/supported-sources/airtable.md +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/docs/supported-sources/appsflyer.md +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/docs/supported-sources/bigquery.md +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/docs/supported-sources/chess.md +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/docs/supported-sources/csv.md +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/docs/supported-sources/databricks.md +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/docs/supported-sources/duckdb.md +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/docs/supported-sources/facebook-ads.md +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/docs/supported-sources/gorgias.md +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/docs/supported-sources/gsheets.md +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/docs/supported-sources/hubspot.md +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/docs/supported-sources/kafka.md +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/docs/supported-sources/klaviyo.md +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/docs/supported-sources/mongodb.md +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/docs/supported-sources/mssql.md +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/docs/supported-sources/mysql.md +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/docs/supported-sources/notion.md +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/docs/supported-sources/oracle.md +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/docs/supported-sources/postgres.md +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/docs/supported-sources/redshift.md +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/docs/supported-sources/s3.md +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/docs/supported-sources/sap-hana.md +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/docs/supported-sources/shopify.md +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/docs/supported-sources/slack.md +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/docs/supported-sources/snowflake.md +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/docs/supported-sources/sqlite.md +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/docs/supported-sources/stripe.md +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/docs/supported-sources/zendesk.md +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/.gitignore +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/adjust/__init__.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/adjust/adjust_helpers.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/airtable/__init__.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/appsflyer/_init_.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/appsflyer/client.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/arrow/__init__.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/chess/__init__.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/chess/helpers.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/chess/settings.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/destinations.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/facebook_ads/__init__.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/facebook_ads/exceptions.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/facebook_ads/helpers.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/facebook_ads/settings.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/factory.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/filesystem/__init__.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/filesystem/helpers.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/filesystem/readers.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/google_sheets/README.md +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/google_sheets/__init__.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/google_sheets/helpers/__init__.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/google_sheets/helpers/api_calls.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/google_sheets/helpers/data_processing.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/gorgias/__init__.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/gorgias/helpers.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/hubspot/__init__.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/hubspot/helpers.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/hubspot/settings.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/kafka/__init__.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/kafka/helpers.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/klaviyo/_init_.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/klaviyo/client.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/klaviyo/helpers.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/mongodb/__init__.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/mongodb/helpers.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/notion/__init__.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/notion/helpers/__init__.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/notion/helpers/client.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/notion/helpers/database.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/notion/settings.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/shopify/__init__.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/shopify/exceptions.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/shopify/helpers.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/shopify/settings.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/slack/__init__.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/slack/helpers.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/slack/settings.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/stripe_analytics/__init__.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/stripe_analytics/helpers.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/stripe_analytics/settings.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/table_definition.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/telemetry/event.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/testdata/fakebqcredentials.json +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/zendesk/__init__.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/zendesk/helpers/__init__.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/zendesk/helpers/api_helpers.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/zendesk/helpers/credentials.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/zendesk/helpers/talk_api.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/zendesk/settings.py +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/testdata/.gitignore +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/testdata/create_replace.csv +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/testdata/delete_insert_expected.csv +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/testdata/delete_insert_part1.csv +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/testdata/delete_insert_part2.csv +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/testdata/merge_expected.csv +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/testdata/merge_part1.csv +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/testdata/merge_part2.csv +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/package-lock.json +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/package.json +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/pyproject.toml +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/requirements-dev.txt +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/requirements.txt +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/resources/demo.gif +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/resources/demo.tape +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/resources/ingestr.svg +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/styles/Google/AMPM.yml +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/styles/Google/Acronyms.yml +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/styles/Google/Colons.yml +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/styles/Google/Contractions.yml +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/styles/Google/DateFormat.yml +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/styles/Google/Ellipses.yml +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/styles/Google/EmDash.yml +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/styles/Google/Exclamation.yml +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/styles/Google/FirstPerson.yml +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/styles/Google/Gender.yml +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/styles/Google/GenderBias.yml +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/styles/Google/HeadingPunctuation.yml +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/styles/Google/Headings.yml +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/styles/Google/Latin.yml +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/styles/Google/LyHyphens.yml +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/styles/Google/OptionalPlurals.yml +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/styles/Google/Ordinal.yml +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/styles/Google/OxfordComma.yml +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/styles/Google/Parens.yml +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/styles/Google/Passive.yml +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/styles/Google/Periods.yml +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/styles/Google/Quotes.yml +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/styles/Google/Ranges.yml +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/styles/Google/Semicolons.yml +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/styles/Google/Slang.yml +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/styles/Google/Spacing.yml +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/styles/Google/Spelling.yml +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/styles/Google/Units.yml +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/styles/Google/We.yml +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/styles/Google/Will.yml +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/styles/Google/WordList.yml +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/styles/Google/meta.json +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/styles/Google/vocab.txt +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/styles/bruin/Ingestr.yml +0 -0
- {ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/styles/config/vocabularies/bruin/accept.txt +0 -0
|
@@ -15,7 +15,7 @@ deps-ci:
|
|
|
15
15
|
uv pip install --system -r requirements-dev.txt
|
|
16
16
|
|
|
17
17
|
test-ci:
|
|
18
|
-
pytest -n
|
|
18
|
+
TESTCONTAINERS_RYUK_DISABLED=true pytest -n auto -x -rP -vv --tb=short --durations=10 --cov=ingestr --no-cov-on-fail
|
|
19
19
|
|
|
20
20
|
test: venv
|
|
21
21
|
. venv/bin/activate; $(MAKE) test-ci
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: ingestr
|
|
3
|
-
Version: 0.10.
|
|
3
|
+
Version: 0.10.0rc2
|
|
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
|
|
@@ -8,6 +8,7 @@ from rich.console import Console
|
|
|
8
8
|
from rich.status import Status
|
|
9
9
|
from typing_extensions import Annotated
|
|
10
10
|
|
|
11
|
+
from ingestr.src.filters import cast_set_to_list
|
|
11
12
|
from ingestr.src.telemetry.event import track
|
|
12
13
|
|
|
13
14
|
app = typer.Typer(
|
|
@@ -112,6 +113,12 @@ class SchemaNaming(str, Enum):
|
|
|
112
113
|
direct = "direct"
|
|
113
114
|
|
|
114
115
|
|
|
116
|
+
class SqlReflectionLevel(str, Enum):
|
|
117
|
+
minimal = "minimal"
|
|
118
|
+
full = "full"
|
|
119
|
+
full_with_precision = "full_with_precision"
|
|
120
|
+
|
|
121
|
+
|
|
115
122
|
@app.command()
|
|
116
123
|
def ingest(
|
|
117
124
|
source_uri: Annotated[
|
|
@@ -259,6 +266,20 @@ def ingest(
|
|
|
259
266
|
envvar="EXTRACT_PARALLELISM",
|
|
260
267
|
),
|
|
261
268
|
] = 5, # type: ignore
|
|
269
|
+
sql_reflection_level: Annotated[
|
|
270
|
+
SqlReflectionLevel,
|
|
271
|
+
typer.Option(
|
|
272
|
+
help="The reflection level to use when reflecting the table schema from the source",
|
|
273
|
+
envvar="SQL_REFLECTION_LEVEL",
|
|
274
|
+
),
|
|
275
|
+
] = SqlReflectionLevel.full, # type: ignore
|
|
276
|
+
sql_limit: Annotated[
|
|
277
|
+
Optional[int],
|
|
278
|
+
typer.Option(
|
|
279
|
+
help="The limit to use when fetching data from the source",
|
|
280
|
+
envvar="SQL_LIMIT",
|
|
281
|
+
),
|
|
282
|
+
] = None, # type: ignore
|
|
262
283
|
):
|
|
263
284
|
import hashlib
|
|
264
285
|
import tempfile
|
|
@@ -447,8 +468,12 @@ def ingest(
|
|
|
447
468
|
interval_end=interval_end,
|
|
448
469
|
sql_backend=sql_backend.value,
|
|
449
470
|
page_size=page_size,
|
|
471
|
+
sql_reflection_level=sql_reflection_level.value,
|
|
472
|
+
sql_limit=sql_limit,
|
|
450
473
|
)
|
|
451
474
|
|
|
475
|
+
dlt_source.add_map(cast_set_to_list)
|
|
476
|
+
|
|
452
477
|
if original_incremental_strategy == IncrementalStrategy.delete_insert:
|
|
453
478
|
dlt_source.incremental.primary_key = ()
|
|
454
479
|
|
|
@@ -479,9 +504,9 @@ def ingest(
|
|
|
479
504
|
),
|
|
480
505
|
write_disposition=write_disposition, # type: ignore
|
|
481
506
|
primary_key=(primary_key if primary_key and len(primary_key) > 0 else None), # type: ignore
|
|
482
|
-
loader_file_format=
|
|
483
|
-
|
|
484
|
-
|
|
507
|
+
loader_file_format=(
|
|
508
|
+
loader_file_format.value if loader_file_format is not None else None # type: ignore
|
|
509
|
+
), # type: ignore
|
|
485
510
|
columns=column_hints,
|
|
486
511
|
)
|
|
487
512
|
|
|
@@ -494,7 +519,6 @@ def ingest(
|
|
|
494
519
|
elapsed = end_time - start_time
|
|
495
520
|
elapsedHuman = f"in {humanize.precisedelta(elapsed)}"
|
|
496
521
|
|
|
497
|
-
# remove the pipelines_dir folder if it was created by ingestr
|
|
498
522
|
if is_pipelines_dir_temp:
|
|
499
523
|
import shutil
|
|
500
524
|
|
|
@@ -12,6 +12,8 @@ from dlt.common.time import ensure_pendulum_datetime
|
|
|
12
12
|
from dlt.common.typing import TSecretStrValue
|
|
13
13
|
from dlt.sources.credentials import ConnectionStringCredentials
|
|
14
14
|
from dlt.sources.sql_database import sql_table
|
|
15
|
+
from sqlalchemy import types as sa
|
|
16
|
+
from sqlalchemy.dialects import mysql
|
|
15
17
|
|
|
16
18
|
from ingestr.src.adjust import REQUIRED_CUSTOM_DIMENSIONS, adjust_source
|
|
17
19
|
from ingestr.src.adjust.adjust_helpers import parse_filters
|
|
@@ -67,6 +69,19 @@ class SqlSource:
|
|
|
67
69
|
if uri.startswith("mysql://"):
|
|
68
70
|
uri = uri.replace("mysql://", "mysql+pymysql://")
|
|
69
71
|
|
|
72
|
+
reflection_level = kwargs.get("sql_reflection_level")
|
|
73
|
+
|
|
74
|
+
query_adapter_callback = None
|
|
75
|
+
if kwargs.get("sql_limit"):
|
|
76
|
+
|
|
77
|
+
def query_adapter_callback(query, table):
|
|
78
|
+
return query.limit(kwargs.get("sql_limit"))
|
|
79
|
+
|
|
80
|
+
def type_adapter_callback(sql_type):
|
|
81
|
+
if isinstance(sql_type, mysql.SET):
|
|
82
|
+
return sa.JSON
|
|
83
|
+
return sql_type
|
|
84
|
+
|
|
70
85
|
table_instance = self.table_builder(
|
|
71
86
|
credentials=ConnectionStringCredentials(uri),
|
|
72
87
|
schema=table_fields.dataset,
|
|
@@ -74,6 +89,9 @@ class SqlSource:
|
|
|
74
89
|
incremental=incremental,
|
|
75
90
|
backend=kwargs.get("sql_backend", "sqlalchemy"),
|
|
76
91
|
chunk_size=kwargs.get("page_size", None),
|
|
92
|
+
reflection_level=reflection_level,
|
|
93
|
+
query_adapter_callback=query_adapter_callback,
|
|
94
|
+
type_adapter_callback=type_adapter_callback,
|
|
77
95
|
)
|
|
78
96
|
|
|
79
97
|
return table_instance
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.10.0rc2"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.10.0rc0"
|
|
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
|
|
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
|
{ingestr-0.10.0rc0 → ingestr-0.10.0rc2}/ingestr/src/google_sheets/helpers/data_processing.py
RENAMED
|
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
|
|
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
|