ingestr 0.6.4__tar.gz → 0.6.6__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 (90) hide show
  1. {ingestr-0.6.4 → ingestr-0.6.6}/PKG-INFO +7 -1
  2. {ingestr-0.6.4 → ingestr-0.6.6}/README.md +5 -0
  3. {ingestr-0.6.4 → ingestr-0.6.6}/docs/supported-sources/overview.md +5 -0
  4. {ingestr-0.6.4 → ingestr-0.6.6}/ingestr/main.py +1 -1
  5. {ingestr-0.6.4 → ingestr-0.6.6}/ingestr/src/factory.py +1 -0
  6. {ingestr-0.6.4 → ingestr-0.6.6}/ingestr/src/gorgias/__init__.py +1 -1
  7. {ingestr-0.6.4 → ingestr-0.6.6}/ingestr/src/sources.py +10 -18
  8. {ingestr-0.6.4 → ingestr-0.6.6}/ingestr/src/sources_test.py +0 -8
  9. ingestr-0.6.6/ingestr/src/table_definition.py +15 -0
  10. ingestr-0.6.6/ingestr/src/version.py +1 -0
  11. {ingestr-0.6.4 → ingestr-0.6.6}/requirements.txt +1 -0
  12. ingestr-0.6.4/ingestr/src/version.py +0 -1
  13. {ingestr-0.6.4 → ingestr-0.6.6}/.dockerignore +0 -0
  14. {ingestr-0.6.4 → ingestr-0.6.6}/.github/workflows/deploy-docs.yml +0 -0
  15. {ingestr-0.6.4 → ingestr-0.6.6}/.github/workflows/docker.yml +0 -0
  16. {ingestr-0.6.4 → ingestr-0.6.6}/.gitignore +0 -0
  17. {ingestr-0.6.4 → ingestr-0.6.6}/.python-version +0 -0
  18. {ingestr-0.6.4 → ingestr-0.6.6}/Dockerfile +0 -0
  19. {ingestr-0.6.4 → ingestr-0.6.6}/LICENSE.md +0 -0
  20. {ingestr-0.6.4 → ingestr-0.6.6}/Makefile +0 -0
  21. {ingestr-0.6.4 → ingestr-0.6.6}/docs/.vitepress/config.mjs +0 -0
  22. {ingestr-0.6.4 → ingestr-0.6.6}/docs/.vitepress/theme/custom.css +0 -0
  23. {ingestr-0.6.4 → ingestr-0.6.6}/docs/.vitepress/theme/index.js +0 -0
  24. {ingestr-0.6.4 → ingestr-0.6.6}/docs/commands/example-uris.md +0 -0
  25. {ingestr-0.6.4 → ingestr-0.6.6}/docs/commands/ingest.md +0 -0
  26. {ingestr-0.6.4 → ingestr-0.6.6}/docs/getting-started/core-concepts.md +0 -0
  27. {ingestr-0.6.4 → ingestr-0.6.6}/docs/getting-started/incremental-loading.md +0 -0
  28. {ingestr-0.6.4 → ingestr-0.6.6}/docs/getting-started/quickstart.md +0 -0
  29. {ingestr-0.6.4 → ingestr-0.6.6}/docs/getting-started/telemetry.md +0 -0
  30. {ingestr-0.6.4 → ingestr-0.6.6}/docs/index.md +0 -0
  31. {ingestr-0.6.4 → ingestr-0.6.6}/docs/supported-sources/bigquery.md +0 -0
  32. {ingestr-0.6.4 → ingestr-0.6.6}/docs/supported-sources/csv.md +0 -0
  33. {ingestr-0.6.4 → ingestr-0.6.6}/docs/supported-sources/databricks.md +0 -0
  34. {ingestr-0.6.4 → ingestr-0.6.6}/docs/supported-sources/duckdb.md +0 -0
  35. {ingestr-0.6.4 → ingestr-0.6.6}/docs/supported-sources/gorgias.md +0 -0
  36. {ingestr-0.6.4 → ingestr-0.6.6}/docs/supported-sources/gsheets.md +0 -0
  37. {ingestr-0.6.4 → ingestr-0.6.6}/docs/supported-sources/mongodb.md +0 -0
  38. {ingestr-0.6.4 → ingestr-0.6.6}/docs/supported-sources/mssql.md +0 -0
  39. {ingestr-0.6.4 → ingestr-0.6.6}/docs/supported-sources/mysql.md +0 -0
  40. {ingestr-0.6.4 → ingestr-0.6.6}/docs/supported-sources/notion.md +0 -0
  41. {ingestr-0.6.4 → ingestr-0.6.6}/docs/supported-sources/oracle.md +0 -0
  42. {ingestr-0.6.4 → ingestr-0.6.6}/docs/supported-sources/postgres.md +0 -0
  43. {ingestr-0.6.4 → ingestr-0.6.6}/docs/supported-sources/redshift.md +0 -0
  44. {ingestr-0.6.4 → ingestr-0.6.6}/docs/supported-sources/sap-hana.md +0 -0
  45. {ingestr-0.6.4 → ingestr-0.6.6}/docs/supported-sources/shopify.md +0 -0
  46. {ingestr-0.6.4 → ingestr-0.6.6}/docs/supported-sources/snowflake.md +0 -0
  47. {ingestr-0.6.4 → ingestr-0.6.6}/docs/supported-sources/sqlite.md +0 -0
  48. {ingestr-0.6.4 → ingestr-0.6.6}/ingestr/main_test.py +0 -0
  49. {ingestr-0.6.4 → ingestr-0.6.6}/ingestr/src/destinations.py +0 -0
  50. {ingestr-0.6.4 → ingestr-0.6.6}/ingestr/src/destinations_test.py +0 -0
  51. {ingestr-0.6.4 → ingestr-0.6.6}/ingestr/src/factory_test.py +0 -0
  52. {ingestr-0.6.4 → ingestr-0.6.6}/ingestr/src/google_sheets/README.md +0 -0
  53. {ingestr-0.6.4 → ingestr-0.6.6}/ingestr/src/google_sheets/__init__.py +0 -0
  54. {ingestr-0.6.4 → ingestr-0.6.6}/ingestr/src/google_sheets/helpers/__init__.py +0 -0
  55. {ingestr-0.6.4 → ingestr-0.6.6}/ingestr/src/google_sheets/helpers/api_calls.py +0 -0
  56. {ingestr-0.6.4 → ingestr-0.6.6}/ingestr/src/google_sheets/helpers/data_processing.py +0 -0
  57. {ingestr-0.6.4 → ingestr-0.6.6}/ingestr/src/gorgias/helpers.py +0 -0
  58. {ingestr-0.6.4 → ingestr-0.6.6}/ingestr/src/gorgias/helpers_test.py +0 -0
  59. {ingestr-0.6.4 → ingestr-0.6.6}/ingestr/src/mongodb/__init__.py +0 -0
  60. {ingestr-0.6.4 → ingestr-0.6.6}/ingestr/src/mongodb/helpers.py +0 -0
  61. {ingestr-0.6.4 → ingestr-0.6.6}/ingestr/src/notion/__init__.py +0 -0
  62. {ingestr-0.6.4 → ingestr-0.6.6}/ingestr/src/notion/helpers/__init__.py +0 -0
  63. {ingestr-0.6.4 → ingestr-0.6.6}/ingestr/src/notion/helpers/client.py +0 -0
  64. {ingestr-0.6.4 → ingestr-0.6.6}/ingestr/src/notion/helpers/database.py +0 -0
  65. {ingestr-0.6.4 → ingestr-0.6.6}/ingestr/src/notion/settings.py +0 -0
  66. {ingestr-0.6.4 → ingestr-0.6.6}/ingestr/src/shopify/__init__.py +0 -0
  67. {ingestr-0.6.4 → ingestr-0.6.6}/ingestr/src/shopify/exceptions.py +0 -0
  68. {ingestr-0.6.4 → ingestr-0.6.6}/ingestr/src/shopify/helpers.py +0 -0
  69. {ingestr-0.6.4 → ingestr-0.6.6}/ingestr/src/shopify/settings.py +0 -0
  70. {ingestr-0.6.4 → ingestr-0.6.6}/ingestr/src/sql_database/__init__.py +0 -0
  71. {ingestr-0.6.4 → ingestr-0.6.6}/ingestr/src/sql_database/helpers.py +0 -0
  72. {ingestr-0.6.4 → ingestr-0.6.6}/ingestr/src/sql_database/override.py +0 -0
  73. {ingestr-0.6.4 → ingestr-0.6.6}/ingestr/src/sql_database/schema_types.py +0 -0
  74. {ingestr-0.6.4 → ingestr-0.6.6}/ingestr/src/telemetry/event.py +0 -0
  75. {ingestr-0.6.4 → ingestr-0.6.6}/ingestr/src/testdata/fakebqcredentials.json +0 -0
  76. {ingestr-0.6.4 → ingestr-0.6.6}/ingestr/testdata/.gitignore +0 -0
  77. {ingestr-0.6.4 → ingestr-0.6.6}/ingestr/testdata/create_replace.csv +0 -0
  78. {ingestr-0.6.4 → ingestr-0.6.6}/ingestr/testdata/delete_insert_expected.csv +0 -0
  79. {ingestr-0.6.4 → ingestr-0.6.6}/ingestr/testdata/delete_insert_part1.csv +0 -0
  80. {ingestr-0.6.4 → ingestr-0.6.6}/ingestr/testdata/delete_insert_part2.csv +0 -0
  81. {ingestr-0.6.4 → ingestr-0.6.6}/ingestr/testdata/merge_expected.csv +0 -0
  82. {ingestr-0.6.4 → ingestr-0.6.6}/ingestr/testdata/merge_part1.csv +0 -0
  83. {ingestr-0.6.4 → ingestr-0.6.6}/ingestr/testdata/merge_part2.csv +0 -0
  84. {ingestr-0.6.4 → ingestr-0.6.6}/package-lock.json +0 -0
  85. {ingestr-0.6.4 → ingestr-0.6.6}/package.json +0 -0
  86. {ingestr-0.6.4 → ingestr-0.6.6}/pyproject.toml +0 -0
  87. {ingestr-0.6.4 → ingestr-0.6.6}/requirements-dev.txt +0 -0
  88. {ingestr-0.6.4 → ingestr-0.6.6}/resources/demo.gif +0 -0
  89. {ingestr-0.6.4 → ingestr-0.6.6}/resources/demo.tape +0 -0
  90. {ingestr-0.6.4 → ingestr-0.6.6}/resources/ingestr.svg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: ingestr
3
- Version: 0.6.4
3
+ Version: 0.6.6
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
@@ -21,6 +21,7 @@ Requires-Dist: duckdb-engine==0.11.5
21
21
  Requires-Dist: duckdb==0.10.2
22
22
  Requires-Dist: google-api-python-client==2.130.0
23
23
  Requires-Dist: google-cloud-bigquery-storage==2.24.0
24
+ Requires-Dist: mysql-connector-python==9.0.0
24
25
  Requires-Dist: pendulum==3.0.0
25
26
  Requires-Dist: psycopg2-binary==2.9.9
26
27
  Requires-Dist: py-machineid==0.5.1
@@ -171,6 +172,11 @@ Join our Slack community [here](https://join.slack.com/t/bruindatacommunity/shar
171
172
  <tr>
172
173
  <td colspan="3" style='text-align:center;'><strong>Platforms</strong></td>
173
174
  </tr>
175
+ <tr>
176
+ <td>Gorgias</td>
177
+ <td>✅</td>
178
+ <td>❌</td>
179
+ </tr>
174
180
  <tr>
175
181
  <td>Google Sheets</td>
176
182
  <td>✅</td>
@@ -128,6 +128,11 @@ Join our Slack community [here](https://join.slack.com/t/bruindatacommunity/shar
128
128
  <tr>
129
129
  <td colspan="3" style='text-align:center;'><strong>Platforms</strong></td>
130
130
  </tr>
131
+ <tr>
132
+ <td>Gorgias</td>
133
+ <td>✅</td>
134
+ <td>❌</td>
135
+ </tr>
131
136
  <tr>
132
137
  <td>Google Sheets</td>
133
138
  <td>✅</td>
@@ -79,6 +79,11 @@ ingestr supports the following sources and destinations:
79
79
  <tr>
80
80
  <td colspan="3" style='text-align:center;'><strong>Platforms</strong></td>
81
81
  </tr>
82
+ <tr>
83
+ <td>Gorgias</td>
84
+ <td>✅</td>
85
+ <td>❌</td>
86
+ </tr>
82
87
  <tr>
83
88
  <td>Google Sheets</td>
84
89
  <td>✅</td>
@@ -347,7 +347,7 @@ def ingest(
347
347
  print(f"[bold red] {job.job_file_info.job_id()}[/bold red]")
348
348
  print(f" [bold yellow]Error:[/bold yellow] {job.failed_message}")
349
349
 
350
- raise typer.Exit()
350
+ raise typer.Exit(1)
351
351
 
352
352
  destination.post_load()
353
353
 
@@ -30,6 +30,7 @@ SQL_SOURCE_SCHEMES = [
30
30
  "mssql",
31
31
  "mysql",
32
32
  "mysql+pymysql",
33
+ "mysql+mysqlconnector",
33
34
  "postgres",
34
35
  "postgresql",
35
36
  "redshift",
@@ -181,7 +181,7 @@ def gorgias_source(
181
181
  },
182
182
  "from_agent": {
183
183
  "data_type": "bool",
184
- "nullable": False,
184
+ "nullable": True,
185
185
  "description": "Indicates if the ticket was created by an agent",
186
186
  },
187
187
  "customer": {
@@ -12,6 +12,7 @@ from ingestr.src.mongodb import mongodb_collection
12
12
  from ingestr.src.notion import notion_databases
13
13
  from ingestr.src.shopify import shopify_source
14
14
  from ingestr.src.sql_database import sql_table
15
+ from ingestr.src.table_definition import table_string_to_dataclass
15
16
 
16
17
 
17
18
  class SqlSource:
@@ -24,9 +25,7 @@ class SqlSource:
24
25
  return False
25
26
 
26
27
  def dlt_source(self, uri: str, table: str, **kwargs):
27
- table_fields = table.split(".")
28
- if len(table_fields) != 2:
29
- raise ValueError("Table name must be in the format schema.table")
28
+ table_fields = table_string_to_dataclass(table)
30
29
 
31
30
  incremental = None
32
31
  if kwargs.get("incremental_key"):
@@ -45,8 +44,8 @@ class SqlSource:
45
44
 
46
45
  table_instance = self.table_builder(
47
46
  credentials=uri,
48
- schema=table_fields[-2],
49
- table=table_fields[-1],
47
+ schema=table_fields.dataset,
48
+ table=table_fields.table,
50
49
  incremental=incremental,
51
50
  merge_key=kwargs.get("merge_key"),
52
51
  backend=kwargs.get("sql_backend", "sqlalchemy"),
@@ -65,9 +64,7 @@ class MongoDbSource:
65
64
  return False
66
65
 
67
66
  def dlt_source(self, uri: str, table: str, **kwargs):
68
- table_fields = table.split(".")
69
- if len(table_fields) != 2:
70
- raise ValueError("Table name must be in the format schema.table")
67
+ table_fields = table_string_to_dataclass(table)
71
68
 
72
69
  incremental = None
73
70
  if kwargs.get("incremental_key"):
@@ -82,8 +79,8 @@ class MongoDbSource:
82
79
 
83
80
  table_instance = self.table_builder(
84
81
  connection_url=uri,
85
- database=table_fields[-2],
86
- collection=table_fields[-1],
82
+ database=table_fields.dataset,
83
+ collection=table_fields.table,
87
84
  parallel=True,
88
85
  incremental=incremental,
89
86
  )
@@ -293,15 +290,10 @@ class GoogleSheetsSource:
293
290
  base64.b64decode(credentials_base64[0]).decode("utf-8")
294
291
  )
295
292
 
296
- table_fields = table.split(".")
297
- if len(table_fields) != 2:
298
- raise ValueError(
299
- "Table name must be in the format <spreadsheet_id>.<sheet_name>"
300
- )
301
-
293
+ table_fields = table_string_to_dataclass(table)
302
294
  return self.table_builder(
303
295
  credentials=credentials,
304
- spreadsheet_url_or_id=table_fields[0],
305
- range_names=[table_fields[1]],
296
+ spreadsheet_url_or_id=table_fields.table,
297
+ range_names=[table_fields.dataset],
306
298
  get_named_ranges=False,
307
299
  )
@@ -13,10 +13,6 @@ class SqlSourceTest(unittest.TestCase):
13
13
  uri = "bigquery://my-project"
14
14
  source.dlt_source(uri, "onetable")
15
15
 
16
- with pytest.raises(ValueError):
17
- uri = "bigquery://my-project"
18
- source.dlt_source(uri, "onetable.with.too.many.fields")
19
-
20
16
  def test_table_instance_is_created(self):
21
17
  uri = "bigquery://my-project"
22
18
  table = "schema.table"
@@ -63,10 +59,6 @@ class MongoDbSourceTest(unittest.TestCase):
63
59
  uri = "mongodb://my-project"
64
60
  source.dlt_source(uri, "onetable")
65
61
 
66
- with pytest.raises(ValueError):
67
- uri = "mongodb://my-project"
68
- source.dlt_source(uri, "onetable.with.too.many.fields")
69
-
70
62
  def test_table_instance_is_created(self):
71
63
  uri = "mongodb://my-project"
72
64
  table = "schema.table"
@@ -0,0 +1,15 @@
1
+ from dataclasses import dataclass
2
+
3
+
4
+ @dataclass
5
+ class TableDefinition:
6
+ dataset: str
7
+ table: str
8
+
9
+
10
+ def table_string_to_dataclass(table: str) -> TableDefinition:
11
+ table_fields = table.split(".", 1)
12
+ if len(table_fields) != 2:
13
+ raise ValueError("Table name must be in the format <schema>.<table>")
14
+
15
+ return TableDefinition(dataset=table_fields[0], table=table_fields[1])
@@ -0,0 +1 @@
1
+ __version__ = "0.6.6"
@@ -23,3 +23,4 @@ sqlalchemy2-stubs==0.0.2a38
23
23
  tqdm==4.66.2
24
24
  typer==0.12.3
25
25
  sqlalchemy-hana==2.0.0
26
+ mysql-connector-python==9.0.0
@@ -1 +0,0 @@
1
- __version__ = "0.6.4"
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