ingestr 0.13.66__py3-none-any.whl → 0.13.68__py3-none-any.whl
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.
- ingestr/main.py +1 -1
- ingestr/src/applovin_max/__init__.py +1 -0
- ingestr/src/buildinfo.py +1 -1
- ingestr/src/destinations.py +2 -2
- ingestr/src/linear/__init__.py +5 -3
- ingestr/src/linear/helpers.py +16 -4
- ingestr/src/sources.py +21 -1
- ingestr/src/stripe_analytics/helpers.py +0 -1
- ingestr/src/zoom/__init__.py +2 -2
- ingestr/src/zoom/helpers.py +1 -1
- {ingestr-0.13.66.dist-info → ingestr-0.13.68.dist-info}/METADATA +4 -4
- {ingestr-0.13.66.dist-info → ingestr-0.13.68.dist-info}/RECORD +15 -15
- {ingestr-0.13.66.dist-info → ingestr-0.13.68.dist-info}/WHEEL +0 -0
- {ingestr-0.13.66.dist-info → ingestr-0.13.68.dist-info}/entry_points.txt +0 -0
- {ingestr-0.13.66.dist-info → ingestr-0.13.68.dist-info}/licenses/LICENSE.md +0 -0
ingestr/main.py
CHANGED
ingestr/src/buildinfo.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
version = "v0.13.
|
1
|
+
version = "v0.13.68"
|
ingestr/src/destinations.py
CHANGED
@@ -90,7 +90,7 @@ class BigQueryDestination:
|
|
90
90
|
|
91
91
|
return dlt.destinations.bigquery(
|
92
92
|
credentials=credentials, # type: ignore
|
93
|
-
location=location,
|
93
|
+
location=location, # type: ignore
|
94
94
|
project_id=project_id,
|
95
95
|
**kwargs,
|
96
96
|
)
|
@@ -398,7 +398,7 @@ class AthenaDestination:
|
|
398
398
|
|
399
399
|
return dlt.destinations.athena(
|
400
400
|
query_result_bucket=query_result_path,
|
401
|
-
athena_work_group=source_params.get("workgroup", [None])[0],
|
401
|
+
athena_work_group=source_params.get("workgroup", [None])[0], # type: ignore
|
402
402
|
credentials=AwsCredentials(
|
403
403
|
aws_access_key_id=access_key_id, # type: ignore
|
404
404
|
aws_secret_access_key=secret_access_key, # type: ignore
|
ingestr/src/linear/__init__.py
CHANGED
@@ -3,7 +3,7 @@ from typing import Any, Dict, Iterable, Iterator
|
|
3
3
|
import dlt
|
4
4
|
import pendulum
|
5
5
|
|
6
|
-
from .helpers import
|
6
|
+
from .helpers import _normalize_issue, _normalize_team, _paginate
|
7
7
|
|
8
8
|
ISSUES_QUERY = """
|
9
9
|
query Issues($cursor: String) {
|
@@ -143,13 +143,15 @@ def linear_source(
|
|
143
143
|
yield item
|
144
144
|
|
145
145
|
@dlt.resource(name="teams", primary_key="id", write_disposition="merge")
|
146
|
-
def teams(
|
146
|
+
def teams(
|
147
|
+
updated_at: dlt.sources.incremental[str] = dlt.sources.incremental(
|
147
148
|
"updatedAt",
|
148
149
|
initial_value=start_date.isoformat(),
|
149
150
|
end_value=end_date.isoformat() if end_date else None,
|
150
151
|
range_start="closed",
|
151
152
|
range_end="closed",
|
152
|
-
),
|
153
|
+
),
|
154
|
+
) -> Iterator[Dict[str, Any]]:
|
153
155
|
print(start_date)
|
154
156
|
if updated_at.last_value:
|
155
157
|
current_start_date = pendulum.parse(updated_at.last_value)
|
ingestr/src/linear/helpers.py
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
import json
|
2
1
|
from typing import Any, Dict, Iterator, Optional
|
3
2
|
|
4
3
|
import requests
|
5
4
|
|
6
5
|
LINEAR_GRAPHQL_ENDPOINT = "https://api.linear.app/graphql"
|
7
6
|
|
7
|
+
|
8
8
|
def _graphql(
|
9
9
|
api_key: str, query: str, variables: Optional[Dict[str, Any]] = None
|
10
10
|
) -> Dict[str, Any]:
|
@@ -20,6 +20,7 @@ def _graphql(
|
|
20
20
|
raise ValueError(str(payload["errors"]))
|
21
21
|
return payload["data"]
|
22
22
|
|
23
|
+
|
23
24
|
def _paginate(api_key: str, query: str, root: str) -> Iterator[Dict[str, Any]]:
|
24
25
|
cursor: Optional[str] = None
|
25
26
|
while True:
|
@@ -30,6 +31,7 @@ def _paginate(api_key: str, query: str, root: str) -> Iterator[Dict[str, Any]]:
|
|
30
31
|
break
|
31
32
|
cursor = data["pageInfo"]["endCursor"]
|
32
33
|
|
34
|
+
|
33
35
|
def _normalize_issue(item: Dict[str, Any]) -> Dict[str, Any]:
|
34
36
|
field_mapping = {
|
35
37
|
"assignee": "assignee_id",
|
@@ -45,16 +47,26 @@ def _normalize_issue(item: Dict[str, Any]) -> Dict[str, Any]:
|
|
45
47
|
else:
|
46
48
|
item[value] = None
|
47
49
|
del item[key]
|
48
|
-
json_fields = [
|
50
|
+
json_fields = [
|
51
|
+
"comments",
|
52
|
+
"subscribers",
|
53
|
+
"attachments",
|
54
|
+
"labels",
|
55
|
+
"subtasks",
|
56
|
+
"projects",
|
57
|
+
"memberships",
|
58
|
+
"members",
|
59
|
+
]
|
49
60
|
for field in json_fields:
|
50
61
|
if item.get(field):
|
51
62
|
item[f"{field}"] = item[field].get("nodes", [])
|
52
|
-
|
63
|
+
|
53
64
|
return item
|
54
65
|
|
66
|
+
|
55
67
|
def _normalize_team(item: Dict[str, Any]) -> Dict[str, Any]:
|
56
68
|
json_fields = ["memberships", "members", "projects"]
|
57
69
|
for field in json_fields:
|
58
70
|
if item.get(field):
|
59
71
|
item[f"{field}"] = item[field].get("nodes", [])
|
60
|
-
return item
|
72
|
+
return item
|
ingestr/src/sources.py
CHANGED
@@ -76,6 +76,27 @@ class SqlSource:
|
|
76
76
|
if uri.startswith("mysql://"):
|
77
77
|
uri = uri.replace("mysql://", "mysql+pymysql://")
|
78
78
|
|
79
|
+
# Process Snowflake private key authentication
|
80
|
+
if uri.startswith("snowflake://"):
|
81
|
+
parsed_uri = urlparse(uri)
|
82
|
+
query_params = parse_qs(parsed_uri.query)
|
83
|
+
|
84
|
+
if "private_key" in query_params:
|
85
|
+
from dlt.common.libs.cryptography import decode_private_key
|
86
|
+
|
87
|
+
private_key = query_params["private_key"][0]
|
88
|
+
passphrase = query_params.get("private_key_passphrase", [None])[0]
|
89
|
+
decoded_key = decode_private_key(private_key, passphrase)
|
90
|
+
|
91
|
+
query_params["private_key"] = [base64.b64encode(decoded_key).decode()]
|
92
|
+
if "private_key_passphrase" in query_params:
|
93
|
+
del query_params["private_key_passphrase"]
|
94
|
+
|
95
|
+
# Rebuild URI
|
96
|
+
uri = parsed_uri._replace(
|
97
|
+
query=urlencode(query_params, doseq=True)
|
98
|
+
).geturl()
|
99
|
+
|
79
100
|
# clickhouse://<username>:<password>@<host>:<port>?secure=<secure>
|
80
101
|
if uri.startswith("clickhouse://"):
|
81
102
|
parsed_uri = urlparse(uri)
|
@@ -139,7 +160,6 @@ class SqlSource:
|
|
139
160
|
return engine.execution_options(read_only=True)
|
140
161
|
|
141
162
|
engine_adapter_callback = eng_callback
|
142
|
-
|
143
163
|
from dlt.common.libs.sql_alchemy import (
|
144
164
|
Engine,
|
145
165
|
MetaData,
|
ingestr/src/zoom/__init__.py
CHANGED
@@ -42,14 +42,14 @@ def zoom_source(
|
|
42
42
|
end_dt = pendulum.now("UTC")
|
43
43
|
else:
|
44
44
|
end_dt = pendulum.parse(datetime.end_value)
|
45
|
-
|
45
|
+
|
46
46
|
base_params: Dict[str, Any] = {
|
47
47
|
"type": "scheduled",
|
48
48
|
"page_size": 300,
|
49
49
|
"from": start_dt.to_date_string(),
|
50
50
|
"to": end_dt.to_date_string(),
|
51
51
|
}
|
52
|
-
|
52
|
+
|
53
53
|
for user in client.get_users():
|
54
54
|
user_id = user["id"]
|
55
55
|
yield from client.get_meetings(user_id, base_params)
|
ingestr/src/zoom/helpers.py
CHANGED
@@ -62,7 +62,7 @@ class ZoomClient:
|
|
62
62
|
break
|
63
63
|
params["next_page_token"] = token
|
64
64
|
|
65
|
-
#https://developers.zoom.us/docs/api/rest/reference/zoom-api/methods/#operation/meetings
|
65
|
+
# https://developers.zoom.us/docs/api/rest/reference/zoom-api/methods/#operation/meetings
|
66
66
|
def get_meetings(
|
67
67
|
self, user_id: str, params: Dict[str, Any]
|
68
68
|
) -> Iterator[Dict[str, Any]]:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ingestr
|
3
|
-
Version: 0.13.
|
3
|
+
Version: 0.13.68
|
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
|
@@ -48,7 +48,7 @@ Requires-Dist: dataclasses-json==0.6.7
|
|
48
48
|
Requires-Dist: decorator==5.2.1
|
49
49
|
Requires-Dist: deprecation==2.1.0
|
50
50
|
Requires-Dist: dlt-cratedb==0.0.1
|
51
|
-
Requires-Dist: dlt==1.
|
51
|
+
Requires-Dist: dlt==1.11.0
|
52
52
|
Requires-Dist: dnspython==2.7.0
|
53
53
|
Requires-Dist: duckdb-engine==0.17.0
|
54
54
|
Requires-Dist: duckdb==1.2.1
|
@@ -179,7 +179,7 @@ Requires-Dist: snowflake-connector-python==3.14.0
|
|
179
179
|
Requires-Dist: snowflake-sqlalchemy==1.6.1
|
180
180
|
Requires-Dist: sortedcontainers==2.4.0
|
181
181
|
Requires-Dist: sqlalchemy-bigquery==1.12.1
|
182
|
-
Requires-Dist: sqlalchemy-cratedb==0.
|
182
|
+
Requires-Dist: sqlalchemy-cratedb==0.41.0
|
183
183
|
Requires-Dist: sqlalchemy-hana==2.0.0
|
184
184
|
Requires-Dist: sqlalchemy-redshift==0.8.14
|
185
185
|
Requires-Dist: sqlalchemy-spanner==1.11.0
|
@@ -202,7 +202,7 @@ Requires-Dist: tzdata==2025.1
|
|
202
202
|
Requires-Dist: tzlocal==5.3
|
203
203
|
Requires-Dist: uritemplate==4.1.1
|
204
204
|
Requires-Dist: urllib3==2.3.0
|
205
|
-
Requires-Dist: verlib2==0.
|
205
|
+
Requires-Dist: verlib2==0.2.0
|
206
206
|
Requires-Dist: wrapt==1.17.2
|
207
207
|
Requires-Dist: yarl==1.18.3
|
208
208
|
Requires-Dist: zeep==4.3.1
|
@@ -1,9 +1,9 @@
|
|
1
1
|
ingestr/conftest.py,sha256=Q03FIJIZpLBbpj55cfCHIKEjc1FCvWJhMF2cidUJKQU,1748
|
2
|
-
ingestr/main.py,sha256=
|
2
|
+
ingestr/main.py,sha256=8EduMJdPnj6Z8p5xMzCJ8KZPq-STaPhIzhVTzoSz_sw,26380
|
3
3
|
ingestr/src/.gitignore,sha256=8cX1AZTSI0TcdZFGTmS_oyBjpfCzhOEt0DdAo2dFIY8,203
|
4
4
|
ingestr/src/blob.py,sha256=UUWMjHUuoR9xP1XZQ6UANQmnMVyDx3d0X4-2FQC271I,2138
|
5
|
-
ingestr/src/buildinfo.py,sha256=
|
6
|
-
ingestr/src/destinations.py,sha256=
|
5
|
+
ingestr/src/buildinfo.py,sha256=AmQ_QOtiF5_x4B8nPBudbz-zX_sJrDJElSgNVFmAdKM,21
|
6
|
+
ingestr/src/destinations.py,sha256=ivTPio0zzqLRx22i597pxZHMNClz-XvYSyCaCPuGd8g,22248
|
7
7
|
ingestr/src/errors.py,sha256=Ufs4_DfE77_E3vnA1fOQdi6cmuLVNm7_SbFLkL1XPGk,686
|
8
8
|
ingestr/src/factory.py,sha256=AJCvlK4M1sIpAAks1K-xsR_uxziIxru74mj572zixhg,6546
|
9
9
|
ingestr/src/filters.py,sha256=LLecXe9QkLFkFLUZ92OXNdcANr1a8edDxrflc2ko_KA,1452
|
@@ -11,7 +11,7 @@ ingestr/src/http_client.py,sha256=bxqsk6nJNXCo-79gW04B53DQO-yr25vaSsqP0AKtjx4,73
|
|
11
11
|
ingestr/src/loader.py,sha256=9NaWAyfkXdqAZSS-N72Iwo36Lbx4PyqIfaaH1dNdkFs,1712
|
12
12
|
ingestr/src/partition.py,sha256=BrIP6wFJvyR7Nus_3ElnfxknUXeCipK_E_bB8kZowfc,969
|
13
13
|
ingestr/src/resource.py,sha256=ZqmZxFQVGlF8rFPhBiUB08HES0yoTj8sZ--jKfaaVps,1164
|
14
|
-
ingestr/src/sources.py,sha256=
|
14
|
+
ingestr/src/sources.py,sha256=IGFRqH1f9x2W7GUnAHoVYtrBYvvJbuDcHAhULCXn5i8,104352
|
15
15
|
ingestr/src/table_definition.py,sha256=REbAbqdlmUMUuRh8nEQRreWjPVOQ5ZcfqGkScKdCrmk,390
|
16
16
|
ingestr/src/time.py,sha256=H_Fk2J4ShXyUM-EMY7MqCLZQhlnZMZvO952bmZPc4yE,254
|
17
17
|
ingestr/src/version.py,sha256=J_2xgZ0mKlvuHcjdKCx2nlioneLH0I47JiU_Slr_Nwc,189
|
@@ -19,7 +19,7 @@ ingestr/src/adjust/__init__.py,sha256=ULjtJqrNS6XDvUyGl0tjl12-tLyXlCgeFe2icTbtu3
|
|
19
19
|
ingestr/src/adjust/adjust_helpers.py,sha256=IHSS94A7enOWkZ8cP5iW3RdYt0Xl3qZGAmDc1Xy4qkI,3802
|
20
20
|
ingestr/src/airtable/__init__.py,sha256=XzRsS39xszUlh_s7P1_zq5v8vLfjz3m-NtTPaa8TTZU,2818
|
21
21
|
ingestr/src/applovin/__init__.py,sha256=X_YCLppPrnL8KXfYWICE_uDfMzHHH3JZ-DBGZ1RlaOI,6984
|
22
|
-
ingestr/src/applovin_max/__init__.py,sha256=
|
22
|
+
ingestr/src/applovin_max/__init__.py,sha256=fxXqsIibJarp5NOGe08G964HftwLDymTtYS_LqPJht4,3315
|
23
23
|
ingestr/src/appsflyer/__init__.py,sha256=QoK-B3cYYMD3bqzQaLWNH6FkJyjRbzRkBF2n6urxubs,8071
|
24
24
|
ingestr/src/appsflyer/client.py,sha256=E6xPW4KlbBnQZ0K4eq2Xgb3AmGrtrzIX9bX8EnQr-D4,3615
|
25
25
|
ingestr/src/appstore/__init__.py,sha256=3P4VZH2WJF477QjW19jMTwu6L8DXcLkYSdutnvp3AmM,4742
|
@@ -81,8 +81,8 @@ ingestr/src/kinesis/helpers.py,sha256=SO2cFmWNGcykUYmjHdfxWsOQSkLQXyhFtfWnkcUOM0
|
|
81
81
|
ingestr/src/klaviyo/__init__.py,sha256=o_noUgbxLk36s4f9W56_ibPorF0n7kVapPUlV0p-jfA,7875
|
82
82
|
ingestr/src/klaviyo/client.py,sha256=tPj79ia7AW0ZOJhzlKNPCliGbdojRNwUFp8HvB2ym5s,7434
|
83
83
|
ingestr/src/klaviyo/helpers.py,sha256=_i-SHffhv25feLDcjy6Blj1UxYLISCwVCMgGtrlnYHk,496
|
84
|
-
ingestr/src/linear/__init__.py,sha256=
|
85
|
-
ingestr/src/linear/helpers.py,sha256=
|
84
|
+
ingestr/src/linear/__init__.py,sha256=Qbf8EPHVh-8pVNe_fqLVinds7qQ3O4ymDuPPPD560Ng,5953
|
85
|
+
ingestr/src/linear/helpers.py,sha256=Mb7oKpUTRnHl-CvO1fubjJlJFDkhTuA7PUldWglvagI,2044
|
86
86
|
ingestr/src/linkedin_ads/__init__.py,sha256=CAPWFyV24loziiphbLmODxZUXZJwm4JxlFkr56q0jfo,1855
|
87
87
|
ingestr/src/linkedin_ads/dimension_time_enum.py,sha256=EmHRdkFyTAfo4chGjThrwqffWJxmAadZMbpTvf0xkQc,198
|
88
88
|
ingestr/src/linkedin_ads/helpers.py,sha256=eUWudRVlXl4kqIhfXQ1eVsUpZwJn7UFqKSpnbLfxzds,4498
|
@@ -122,7 +122,7 @@ ingestr/src/solidgate/helpers.py,sha256=oePEc9nnvmN3IaKrfJCvyKL79xdGM0-gRTN3-8tY
|
|
122
122
|
ingestr/src/sql_database/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
123
123
|
ingestr/src/sql_database/callbacks.py,sha256=sEFFmXxAURY3yeBjnawigDtq9LBCvi8HFqG4kLd7tMU,2002
|
124
124
|
ingestr/src/stripe_analytics/__init__.py,sha256=mK8dGKAlMPVqGE9gG30XfbvOvgVD0yWhNpt-D3iavDY,6385
|
125
|
-
ingestr/src/stripe_analytics/helpers.py,sha256=
|
125
|
+
ingestr/src/stripe_analytics/helpers.py,sha256=KGtRcSrhKEqzJ3AWpgDV2o4cuBFaIwu2Gc1KgvVWTtg,11764
|
126
126
|
ingestr/src/stripe_analytics/settings.py,sha256=xt1-ljwP4nLTNUa8l3KwFbtK8FtQHgHpzGF5uPKfRsw,2246
|
127
127
|
ingestr/src/telemetry/event.py,sha256=W7bs4uVfPakQ5otmiqgqu1l5SqjYx1p87wudnWXckBc,949
|
128
128
|
ingestr/src/testdata/fakebqcredentials.json,sha256=scc6TUc963KAbKTLZCfcmqVzbtzDCW1_8JNRnyAXyy8,628
|
@@ -136,8 +136,8 @@ ingestr/src/zendesk/helpers/__init__.py,sha256=YTJejCiUjfIcsj9FrkY0l-JGYDI7RRte1
|
|
136
136
|
ingestr/src/zendesk/helpers/api_helpers.py,sha256=dMkNn4ZQXgJTDOXAAXdmRt41phNFoRhYyPaLJih0pZY,4184
|
137
137
|
ingestr/src/zendesk/helpers/credentials.py,sha256=EWyi0ZlxWFgd1huD86KNF4dApLHgmabqWksFpEg1cf0,1332
|
138
138
|
ingestr/src/zendesk/helpers/talk_api.py,sha256=TSVSOErsBZvxcX91LMhAgvy6yLSYvpuVfOyKViOHtvA,4718
|
139
|
-
ingestr/src/zoom/__init__.py,sha256=
|
140
|
-
ingestr/src/zoom/helpers.py,sha256=
|
139
|
+
ingestr/src/zoom/__init__.py,sha256=hgx_27kQTE9p26cXdp6yE6x5tjw0g8gY5pTB1qeg4L0,3264
|
140
|
+
ingestr/src/zoom/helpers.py,sha256=jJuBkiK8OEUVYnulbemIFOO5rfg_iKI-7wql8hGNbZ0,3715
|
141
141
|
ingestr/testdata/.gitignore,sha256=DFzYYOpqdTiT7S1HjCT-jffZSmEvFZge295_upAB0FY,13
|
142
142
|
ingestr/testdata/create_replace.csv,sha256=TQDbOSkRKq9ZZv1d68Qjwh94aIyUQ-oEwxpJIrd3YK8,1060
|
143
143
|
ingestr/testdata/delete_insert_expected.csv,sha256=wbj7uboVWwm3sNMh1n7f4-OKFEQJv1s96snjEHp9nkg,336
|
@@ -147,8 +147,8 @@ ingestr/testdata/merge_expected.csv,sha256=DReHqWGnQMsf2PBv_Q2pfjsgvikYFnf1zYcQZ
|
|
147
147
|
ingestr/testdata/merge_part1.csv,sha256=Pw8Z9IDKcNU0qQHx1z6BUf4rF_-SxKGFOvymCt4OY9I,185
|
148
148
|
ingestr/testdata/merge_part2.csv,sha256=T_GiWxA81SN63_tMOIuemcvboEFeAmbKc7xRXvL9esw,287
|
149
149
|
ingestr/tests/unit/test_smartsheets.py,sha256=eiC2CCO4iNJcuN36ONvqmEDryCA1bA1REpayHpu42lk,5058
|
150
|
-
ingestr-0.13.
|
151
|
-
ingestr-0.13.
|
152
|
-
ingestr-0.13.
|
153
|
-
ingestr-0.13.
|
154
|
-
ingestr-0.13.
|
150
|
+
ingestr-0.13.68.dist-info/METADATA,sha256=l2t9KyoQ_YqRie-2IItPzZSzHCIzk26wW16ZZ5SA4d8,15022
|
151
|
+
ingestr-0.13.68.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
152
|
+
ingestr-0.13.68.dist-info/entry_points.txt,sha256=oPJy0KBnPWYjDtP1k8qwAihcTLHSZokSQvRAw_wtfJM,46
|
153
|
+
ingestr-0.13.68.dist-info/licenses/LICENSE.md,sha256=cW8wIhn8HFE-KLStDF9jHQ1O_ARWP3kTpk_-eOccL24,1075
|
154
|
+
ingestr-0.13.68.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|