ingestr 0.9.1__tar.gz → 0.9.2__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.

Files changed (134) hide show
  1. {ingestr-0.9.1 → ingestr-0.9.2}/PKG-INFO +3 -2
  2. {ingestr-0.9.1 → ingestr-0.9.2}/docs/supported-sources/mssql.md +8 -0
  3. ingestr-0.9.2/ingestr/src/arrow/__init__.py +77 -0
  4. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/factory.py +3 -0
  5. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/mongodb/__init__.py +1 -1
  6. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/mongodb/helpers.py +1 -1
  7. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/sources.py +52 -6
  8. ingestr-0.9.2/ingestr/src/version.py +1 -0
  9. {ingestr-0.9.1 → ingestr-0.9.2}/pyproject.toml +3 -0
  10. {ingestr-0.9.1 → ingestr-0.9.2}/requirements.txt +0 -1
  11. ingestr-0.9.1/ingestr/src/version.py +0 -1
  12. {ingestr-0.9.1 → ingestr-0.9.2}/.dockerignore +0 -0
  13. {ingestr-0.9.1 → ingestr-0.9.2}/.github/workflows/deploy-docs.yml +0 -0
  14. {ingestr-0.9.1 → ingestr-0.9.2}/.github/workflows/tests.yml +0 -0
  15. {ingestr-0.9.1 → ingestr-0.9.2}/.gitignore +0 -0
  16. {ingestr-0.9.1 → ingestr-0.9.2}/.python-version +0 -0
  17. {ingestr-0.9.1 → ingestr-0.9.2}/Dockerfile +0 -0
  18. {ingestr-0.9.1 → ingestr-0.9.2}/LICENSE.md +0 -0
  19. {ingestr-0.9.1 → ingestr-0.9.2}/Makefile +0 -0
  20. {ingestr-0.9.1 → ingestr-0.9.2}/README.md +0 -0
  21. {ingestr-0.9.1 → ingestr-0.9.2}/docs/.vitepress/config.mjs +0 -0
  22. {ingestr-0.9.1 → ingestr-0.9.2}/docs/.vitepress/theme/custom.css +0 -0
  23. {ingestr-0.9.1 → ingestr-0.9.2}/docs/.vitepress/theme/index.js +0 -0
  24. {ingestr-0.9.1 → ingestr-0.9.2}/docs/commands/example-uris.md +0 -0
  25. {ingestr-0.9.1 → ingestr-0.9.2}/docs/commands/ingest.md +0 -0
  26. {ingestr-0.9.1 → ingestr-0.9.2}/docs/getting-started/core-concepts.md +0 -0
  27. {ingestr-0.9.1 → ingestr-0.9.2}/docs/getting-started/incremental-loading.md +0 -0
  28. {ingestr-0.9.1 → ingestr-0.9.2}/docs/getting-started/quickstart.md +0 -0
  29. {ingestr-0.9.1 → ingestr-0.9.2}/docs/getting-started/telemetry.md +0 -0
  30. {ingestr-0.9.1 → ingestr-0.9.2}/docs/index.md +0 -0
  31. {ingestr-0.9.1 → ingestr-0.9.2}/docs/supported-sources/adjust.md +0 -0
  32. {ingestr-0.9.1 → ingestr-0.9.2}/docs/supported-sources/airtable.md +0 -0
  33. {ingestr-0.9.1 → ingestr-0.9.2}/docs/supported-sources/appsflyer.md +0 -0
  34. {ingestr-0.9.1 → ingestr-0.9.2}/docs/supported-sources/bigquery.md +0 -0
  35. {ingestr-0.9.1 → ingestr-0.9.2}/docs/supported-sources/chess.md +0 -0
  36. {ingestr-0.9.1 → ingestr-0.9.2}/docs/supported-sources/csv.md +0 -0
  37. {ingestr-0.9.1 → ingestr-0.9.2}/docs/supported-sources/databricks.md +0 -0
  38. {ingestr-0.9.1 → ingestr-0.9.2}/docs/supported-sources/duckdb.md +0 -0
  39. {ingestr-0.9.1 → ingestr-0.9.2}/docs/supported-sources/facebook-ads.md +0 -0
  40. {ingestr-0.9.1 → ingestr-0.9.2}/docs/supported-sources/gorgias.md +0 -0
  41. {ingestr-0.9.1 → ingestr-0.9.2}/docs/supported-sources/gsheets.md +0 -0
  42. {ingestr-0.9.1 → ingestr-0.9.2}/docs/supported-sources/hubspot.md +0 -0
  43. {ingestr-0.9.1 → ingestr-0.9.2}/docs/supported-sources/kafka.md +0 -0
  44. {ingestr-0.9.1 → ingestr-0.9.2}/docs/supported-sources/klaviyo.md +0 -0
  45. {ingestr-0.9.1 → ingestr-0.9.2}/docs/supported-sources/mongodb.md +0 -0
  46. {ingestr-0.9.1 → ingestr-0.9.2}/docs/supported-sources/mysql.md +0 -0
  47. {ingestr-0.9.1 → ingestr-0.9.2}/docs/supported-sources/notion.md +0 -0
  48. {ingestr-0.9.1 → ingestr-0.9.2}/docs/supported-sources/oracle.md +0 -0
  49. {ingestr-0.9.1 → ingestr-0.9.2}/docs/supported-sources/postgres.md +0 -0
  50. {ingestr-0.9.1 → ingestr-0.9.2}/docs/supported-sources/redshift.md +0 -0
  51. {ingestr-0.9.1 → ingestr-0.9.2}/docs/supported-sources/s3.md +0 -0
  52. {ingestr-0.9.1 → ingestr-0.9.2}/docs/supported-sources/sap-hana.md +0 -0
  53. {ingestr-0.9.1 → ingestr-0.9.2}/docs/supported-sources/shopify.md +0 -0
  54. {ingestr-0.9.1 → ingestr-0.9.2}/docs/supported-sources/slack.md +0 -0
  55. {ingestr-0.9.1 → ingestr-0.9.2}/docs/supported-sources/snowflake.md +0 -0
  56. {ingestr-0.9.1 → ingestr-0.9.2}/docs/supported-sources/sqlite.md +0 -0
  57. {ingestr-0.9.1 → ingestr-0.9.2}/docs/supported-sources/stripe.md +0 -0
  58. {ingestr-0.9.1 → ingestr-0.9.2}/docs/supported-sources/zendesk.md +0 -0
  59. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/main.py +0 -0
  60. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/.gitignore +0 -0
  61. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/adjust/_init_.py +0 -0
  62. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/adjust/helpers.py +0 -0
  63. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/airtable/__init__.py +0 -0
  64. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/appsflyer/_init_.py +0 -0
  65. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/appsflyer/client.py +0 -0
  66. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/chess/__init__.py +0 -0
  67. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/chess/helpers.py +0 -0
  68. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/chess/settings.py +0 -0
  69. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/destinations.py +0 -0
  70. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/facebook_ads/__init__.py +0 -0
  71. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/facebook_ads/exceptions.py +0 -0
  72. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/facebook_ads/helpers.py +0 -0
  73. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/facebook_ads/settings.py +0 -0
  74. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/filesystem/__init__.py +0 -0
  75. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/filesystem/helpers.py +0 -0
  76. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/filesystem/readers.py +0 -0
  77. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/google_sheets/README.md +0 -0
  78. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/google_sheets/__init__.py +0 -0
  79. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/google_sheets/helpers/__init__.py +0 -0
  80. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/google_sheets/helpers/api_calls.py +0 -0
  81. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/google_sheets/helpers/data_processing.py +0 -0
  82. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/gorgias/__init__.py +0 -0
  83. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/gorgias/helpers.py +0 -0
  84. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/hubspot/__init__.py +0 -0
  85. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/hubspot/helpers.py +0 -0
  86. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/hubspot/settings.py +0 -0
  87. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/kafka/__init__.py +0 -0
  88. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/kafka/helpers.py +0 -0
  89. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/klaviyo/_init_.py +0 -0
  90. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/klaviyo/client.py +0 -0
  91. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/klaviyo/helpers.py +0 -0
  92. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/notion/__init__.py +0 -0
  93. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/notion/helpers/__init__.py +0 -0
  94. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/notion/helpers/client.py +0 -0
  95. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/notion/helpers/database.py +0 -0
  96. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/notion/settings.py +0 -0
  97. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/shopify/__init__.py +0 -0
  98. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/shopify/exceptions.py +0 -0
  99. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/shopify/helpers.py +0 -0
  100. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/shopify/settings.py +0 -0
  101. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/slack/__init__.py +0 -0
  102. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/slack/helpers.py +0 -0
  103. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/slack/settings.py +0 -0
  104. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/sql_database/__init__.py +0 -0
  105. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/sql_database/arrow_helpers.py +0 -0
  106. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/sql_database/helpers.py +0 -0
  107. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/sql_database/override.py +0 -0
  108. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/sql_database/schema_types.py +0 -0
  109. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/stripe_analytics/__init__.py +0 -0
  110. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/stripe_analytics/helpers.py +0 -0
  111. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/stripe_analytics/settings.py +0 -0
  112. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/table_definition.py +0 -0
  113. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/telemetry/event.py +0 -0
  114. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/testdata/fakebqcredentials.json +0 -0
  115. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/zendesk/__init__.py +0 -0
  116. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/zendesk/helpers/__init__.py +0 -0
  117. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/zendesk/helpers/api_helpers.py +0 -0
  118. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/zendesk/helpers/credentials.py +0 -0
  119. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/zendesk/helpers/talk_api.py +0 -0
  120. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/src/zendesk/settings.py +0 -0
  121. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/testdata/.gitignore +0 -0
  122. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/testdata/create_replace.csv +0 -0
  123. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/testdata/delete_insert_expected.csv +0 -0
  124. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/testdata/delete_insert_part1.csv +0 -0
  125. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/testdata/delete_insert_part2.csv +0 -0
  126. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/testdata/merge_expected.csv +0 -0
  127. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/testdata/merge_part1.csv +0 -0
  128. {ingestr-0.9.1 → ingestr-0.9.2}/ingestr/testdata/merge_part2.csv +0 -0
  129. {ingestr-0.9.1 → ingestr-0.9.2}/package-lock.json +0 -0
  130. {ingestr-0.9.1 → ingestr-0.9.2}/package.json +0 -0
  131. {ingestr-0.9.1 → ingestr-0.9.2}/requirements-dev.txt +0 -0
  132. {ingestr-0.9.1 → ingestr-0.9.2}/resources/demo.gif +0 -0
  133. {ingestr-0.9.1 → ingestr-0.9.2}/resources/demo.tape +0 -0
  134. {ingestr-0.9.1 → ingestr-0.9.2}/resources/ingestr.svg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: ingestr
3
- Version: 0.9.1
3
+ Version: 0.9.2
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
@@ -28,7 +28,6 @@ Requires-Dist: py-machineid==0.5.1
28
28
  Requires-Dist: pyairtable==2.3.3
29
29
  Requires-Dist: pymongo==4.6.3
30
30
  Requires-Dist: pymysql==1.1.0
31
- Requires-Dist: pyodbc==5.1.0
32
31
  Requires-Dist: pyrate-limiter==3.6.1
33
32
  Requires-Dist: redshift-connector==2.1.0
34
33
  Requires-Dist: rich==13.7.1
@@ -44,6 +43,8 @@ Requires-Dist: stripe==10.7.0
44
43
  Requires-Dist: tqdm==4.66.2
45
44
  Requires-Dist: typer==0.12.3
46
45
  Requires-Dist: types-requests==2.32.0.20240907
46
+ Provides-Extra: odbc
47
+ Requires-Dist: pyodbc==5.1.0; extra == 'odbc'
47
48
  Provides-Extra: oracle
48
49
  Requires-Dist: cx-oracle==8.3.0; extra == 'oracle'
49
50
  Description-Content-Type: text/markdown
@@ -3,6 +3,14 @@ Microsoft SQL Server is a relational database management system developed by Mic
3
3
 
4
4
  ingestr supports Microsoft SQL Server as both a source and destination.
5
5
 
6
+ ## Installation
7
+
8
+ To use Microsoft SQL Server with ingestr, you need to install the `pyodbc` add-on as well. You can do this by running:
9
+
10
+ ```bash
11
+ pip install ingestr[odbc]
12
+ ```
13
+
6
14
  ## URI Format
7
15
  The URI format for Microsoft SQL Server is as follows:
8
16
 
@@ -0,0 +1,77 @@
1
+ """Source that loads tables form Airtable.
2
+ Supports whitelisting of tables or loading of all tables from a specified base.
3
+ """
4
+
5
+ from typing import Any, Optional
6
+
7
+ import dlt
8
+ from dlt.common.schema.typing import TColumnNames, TTableSchemaColumns
9
+ from dlt.extract.items import TTableHintTemplate
10
+
11
+
12
+ def memory_mapped_arrow(
13
+ path: str,
14
+ columns: Optional[TTableSchemaColumns] = None,
15
+ primary_key: Optional[TTableHintTemplate[TColumnNames]] = None,
16
+ merge_key: Optional[TTableHintTemplate[TColumnNames]] = None,
17
+ incremental: Optional[dlt.sources.incremental[Any]] = None,
18
+ ):
19
+ @dlt.resource(
20
+ name="arrow_mmap",
21
+ columns=columns, # type: ignore
22
+ primary_key=primary_key, # type: ignore
23
+ merge_key=merge_key, # type: ignore
24
+ )
25
+ def arrow_mmap(
26
+ incremental: Optional[dlt.sources.incremental[Any]] = incremental,
27
+ ):
28
+ import pyarrow as pa # type: ignore
29
+ import pyarrow.ipc as ipc # type: ignore
30
+
31
+ with pa.memory_map(path, "rb") as mmap:
32
+ reader: ipc.RecordBatchFileReader = ipc.open_file(mmap)
33
+ table = reader.read_all()
34
+
35
+ last_value = None
36
+ end_value = None
37
+ if incremental:
38
+ if incremental.cursor_path not in table.column_names:
39
+ raise KeyError(
40
+ f"Cursor column '{incremental.cursor_path}' does not exist in table"
41
+ )
42
+
43
+ last_value = incremental.last_value
44
+ end_value = incremental.end_value
45
+
46
+ if last_value is not None:
47
+ # Check if the column is a date type
48
+ if pa.types.is_temporal(table.schema.field(incremental.cursor_path).type): # type: ignore
49
+ if not isinstance(last_value, pa.TimestampScalar):
50
+ last_value = pa.scalar(last_value, type=pa.timestamp("ns"))
51
+
52
+ table = table.filter(
53
+ pa.compute.field(incremental.cursor_path) > last_value # type: ignore
54
+ )
55
+ else:
56
+ # For non-date types, use direct comparison
57
+ table = table.filter(
58
+ pa.compute.field(incremental.cursor_path) > last_value # type: ignore
59
+ )
60
+
61
+ if end_value is not None:
62
+ if pa.types.is_timestamp(table.schema.field(incremental.cursor_path).type): # type: ignore
63
+ # Convert end_value to timestamp if it's not already
64
+ if not isinstance(end_value, pa.TimestampScalar):
65
+ end_value = pa.scalar(end_value, type=pa.timestamp("ns"))
66
+ table = table.filter(
67
+ pa.compute.field(incremental.cursor_path) < end_value # type: ignore
68
+ )
69
+ else:
70
+ # For non-date types, use direct comparison
71
+ table = table.filter(
72
+ pa.compute.field(incremental.cursor_path) < end_value # type: ignore
73
+ )
74
+
75
+ yield table
76
+
77
+ return arrow_mmap
@@ -18,6 +18,7 @@ from ingestr.src.sources import (
18
18
  AdjustSource,
19
19
  AirtableSource,
20
20
  AppsflyerSource,
21
+ ArrowMemoryMappedSource,
21
22
  ChessSource,
22
23
  FacebookAdsSource,
23
24
  GoogleSheetsSource,
@@ -136,6 +137,8 @@ class SourceDestinationFactory:
136
137
  return AdjustSource()
137
138
  elif self.source_scheme == "zendesk":
138
139
  return ZendeskSource()
140
+ elif self.source_scheme == "mmap":
141
+ return ArrowMemoryMappedSource()
139
142
  elif self.source_scheme == "s3":
140
143
  return S3Source()
141
144
  else:
@@ -65,7 +65,7 @@ def mongodb(
65
65
  sections=("sources", "mongodb"), spec=MongoDbCollectionResourceConfiguration
66
66
  )
67
67
  def mongodb_collection(
68
- connection_url: str = dlt.secrets.value,
68
+ connection_url: str = dlt.config.value,
69
69
  database: Optional[str] = dlt.config.value,
70
70
  collection: str = dlt.config.value,
71
71
  incremental: Optional[dlt.sources.incremental] = None, # type: ignore[type-arg]
@@ -155,7 +155,7 @@ class MongoDbCollectionConfiguration(BaseConfiguration):
155
155
 
156
156
  @configspec
157
157
  class MongoDbCollectionResourceConfiguration(BaseConfiguration):
158
- connection_url: str = dlt.secrets.value
158
+ connection_url: str = dlt.config.value
159
159
  database: Optional[str] = dlt.config.value
160
160
  collection: str = dlt.config.value
161
161
  incremental: Optional[dlt.sources.incremental] = None # type: ignore[type-arg]
@@ -12,6 +12,7 @@ from dlt.common.typing import TSecretStrValue
12
12
  from ingestr.src.adjust._init_ import adjust_source
13
13
  from ingestr.src.airtable import airtable_source
14
14
  from ingestr.src.appsflyer._init_ import appsflyer_source
15
+ from ingestr.src.arrow import memory_mapped_arrow
15
16
  from ingestr.src.chess import source
16
17
  from ingestr.src.facebook_ads import facebook_ads_source, facebook_insights_source
17
18
  from ingestr.src.filesystem import readers
@@ -75,6 +76,51 @@ class SqlSource:
75
76
  return table_instance
76
77
 
77
78
 
79
+ class ArrowMemoryMappedSource:
80
+ table_builder: Callable
81
+
82
+ def __init__(self, table_builder=memory_mapped_arrow) -> None:
83
+ self.table_builder = table_builder
84
+
85
+ def handles_incrementality(self) -> bool:
86
+ return False
87
+
88
+ def dlt_source(self, uri: str, table: str, **kwargs):
89
+ import os
90
+
91
+ incremental = None
92
+ if kwargs.get("incremental_key"):
93
+ start_value = kwargs.get("interval_start")
94
+ end_value = kwargs.get("interval_end")
95
+
96
+ incremental = dlt.sources.incremental(
97
+ kwargs.get("incremental_key", ""),
98
+ initial_value=start_value,
99
+ end_value=end_value,
100
+ )
101
+
102
+ file_path = uri.split("://")[1]
103
+ if not os.path.exists(file_path):
104
+ raise ValueError(f"File at path {file_path} does not exist")
105
+
106
+ if os.path.isdir(file_path):
107
+ raise ValueError(
108
+ f"Path {file_path} is a directory, it should be an Arrow memory mapped file"
109
+ )
110
+
111
+ primary_key = kwargs.get("primary_key")
112
+ merge_key = kwargs.get("merge_key")
113
+
114
+ table_instance = self.table_builder(
115
+ path=file_path,
116
+ incremental=incremental,
117
+ merge_key=merge_key,
118
+ primary_key=primary_key,
119
+ )
120
+
121
+ return table_instance
122
+
123
+
78
124
  class MongoDbSource:
79
125
  table_builder: Callable
80
126
 
@@ -656,12 +702,12 @@ class KafkaSource:
656
702
  credentials=KafkaCredentials(
657
703
  bootstrap_servers=bootstrap_servers[0],
658
704
  group_id=group_id[0],
659
- security_protocol=security_protocol[0]
660
- if len(security_protocol) > 0
661
- else None, # type: ignore
662
- sasl_mechanisms=sasl_mechanisms[0]
663
- if len(sasl_mechanisms) > 0
664
- else None, # type: ignore
705
+ security_protocol=(
706
+ security_protocol[0] if len(security_protocol) > 0 else None
707
+ ), # type: ignore
708
+ sasl_mechanisms=(
709
+ sasl_mechanisms[0] if len(sasl_mechanisms) > 0 else None
710
+ ), # type: ignore
665
711
  sasl_username=sasl_username[0] if len(sasl_username) > 0 else None, # type: ignore
666
712
  sasl_password=sasl_password[0] if len(sasl_password) > 0 else None, # type: ignore
667
713
  ),
@@ -0,0 +1 @@
1
+ __version__ = "0.9.2"
@@ -132,6 +132,9 @@ classifiers = [
132
132
  oracle = [
133
133
  "cx_Oracle==8.3.0",
134
134
  ]
135
+ odbc = [
136
+ "pyodbc==5.1.0",
137
+ ]
135
138
 
136
139
  [project.urls]
137
140
  Homepage = "https://github.com/bruin-data/ingestr"
@@ -11,7 +11,6 @@ psycopg2-binary==2.9.9
11
11
  py-machineid==0.5.1
12
12
  pymongo==4.6.3
13
13
  pymysql==1.1.0
14
- pyodbc==5.1.0
15
14
  pyrate-limiter==3.6.1
16
15
  redshift-connector==2.1.0
17
16
  rich==13.7.1
@@ -1 +0,0 @@
1
- __version__ = "0.9.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