ingestr 0.13.69__py3-none-any.whl → 0.13.71__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/src/buildinfo.py +1 -1
- ingestr/src/kafka/__init__.py +4 -1
- ingestr/src/solidgate/__init__.py +4 -8
- ingestr/src/solidgate/helpers.py +13 -5
- ingestr/src/tiktok_ads/__init__.py +8 -6
- {ingestr-0.13.69.dist-info → ingestr-0.13.71.dist-info}/METADATA +1 -1
- {ingestr-0.13.69.dist-info → ingestr-0.13.71.dist-info}/RECORD +10 -10
- {ingestr-0.13.69.dist-info → ingestr-0.13.71.dist-info}/WHEEL +0 -0
- {ingestr-0.13.69.dist-info → ingestr-0.13.71.dist-info}/entry_points.txt +0 -0
- {ingestr-0.13.69.dist-info → ingestr-0.13.71.dist-info}/licenses/LICENSE.md +0 -0
ingestr/src/buildinfo.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
version = "v0.13.
|
1
|
+
version = "v0.13.71"
|
ingestr/src/kafka/__init__.py
CHANGED
@@ -83,7 +83,7 @@ def kafka_consumer(
|
|
83
83
|
# read messages up to the maximum offsets,
|
84
84
|
# not waiting for new messages
|
85
85
|
with closing(consumer):
|
86
|
-
while
|
86
|
+
while True:
|
87
87
|
messages = consumer.consume(batch_size, timeout=batch_timeout)
|
88
88
|
if not messages:
|
89
89
|
break
|
@@ -101,3 +101,6 @@ def kafka_consumer(
|
|
101
101
|
tracker.renew(msg)
|
102
102
|
|
103
103
|
yield batch
|
104
|
+
|
105
|
+
if tracker.has_unread is False:
|
106
|
+
return
|
@@ -86,16 +86,12 @@ COLUMN_HINTS = {
|
|
86
86
|
"transaction_datetime_provider": {"data_type": "timestamp"},
|
87
87
|
"transaction_datetime_utc": {"data_type": "timestamp"},
|
88
88
|
"accounting_date": {"data_type": "date"},
|
89
|
-
"amount": {"data_type": "
|
90
|
-
"amount_in_major_units": {"data_type": "
|
89
|
+
"amount": {"data_type": "double"},
|
90
|
+
"amount_in_major_units": {"data_type": "double"},
|
91
91
|
"currency": {"data_type": "text"},
|
92
92
|
"currency_minor_units": {"data_type": "bigint"},
|
93
|
-
"payout_amount": {"data_type": "
|
94
|
-
"payout_amount_in_major_units": {
|
95
|
-
"data_type": "decimal",
|
96
|
-
"precision": 18,
|
97
|
-
"scale": 4,
|
98
|
-
},
|
93
|
+
"payout_amount": {"data_type": "double"},
|
94
|
+
"payout_amount_in_major_units": {"data_type": "double"},
|
99
95
|
"payout_currency": {"data_type": "text"},
|
100
96
|
"payout_currency_minor_units": {"data_type": "bigint"},
|
101
97
|
"record_type_key": {"data_type": "text"},
|
ingestr/src/solidgate/helpers.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import base64
|
2
|
+
import csv
|
2
3
|
import hashlib
|
3
4
|
import hmac
|
4
5
|
import json
|
@@ -123,11 +124,18 @@ class SolidgateClient:
|
|
123
124
|
except json.JSONDecodeError:
|
124
125
|
try:
|
125
126
|
csv_data = get_response.content.decode("utf-8")
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
127
|
+
reader = csv.DictReader(StringIO(csv_data))
|
128
|
+
rows = []
|
129
|
+
for row in reader:
|
130
|
+
if row["created_at"]:
|
131
|
+
row["created_at"] = pendulum.parse(row["created_at"])
|
132
|
+
else:
|
133
|
+
row["created_at"] = None
|
134
|
+
|
135
|
+
row2 = {k: v for k, v in row.items() if v != ''}
|
136
|
+
rows.append(row2)
|
137
|
+
|
138
|
+
return rows
|
131
139
|
except Exception as e:
|
132
140
|
raise Exception(f"Error reading CSV: {e}")
|
133
141
|
else:
|
@@ -112,7 +112,8 @@ def tiktok_source(
|
|
112
112
|
datetime=(
|
113
113
|
dlt.sources.incremental(
|
114
114
|
incremental_loading_param,
|
115
|
-
start_date,
|
115
|
+
initial_value=start_date,
|
116
|
+
end_value=end_date,
|
116
117
|
range_end="closed",
|
117
118
|
range_start="closed",
|
118
119
|
)
|
@@ -120,15 +121,16 @@ def tiktok_source(
|
|
120
121
|
else None
|
121
122
|
),
|
122
123
|
) -> Iterable[TDataItem]:
|
123
|
-
|
124
|
+
start_date_tz_adjusted = start_date.in_tz(timezone)
|
125
|
+
end_date_tz_adjusted = end_date.in_tz(timezone)
|
124
126
|
|
125
127
|
if datetime is not None:
|
126
|
-
|
127
|
-
|
128
|
+
start_date_tz_adjusted = ensure_pendulum_datetime(datetime.last_value).in_tz(timezone)
|
129
|
+
end_date_tz_adjusted = ensure_pendulum_datetime(datetime.end_value).in_tz(timezone)
|
128
130
|
|
129
131
|
list_of_interval = find_intervals(
|
130
|
-
current_date=
|
131
|
-
end_date=
|
132
|
+
current_date=start_date_tz_adjusted,
|
133
|
+
end_date=end_date_tz_adjusted,
|
132
134
|
interval_days=interval_days,
|
133
135
|
)
|
134
136
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ingestr
|
3
|
-
Version: 0.13.
|
3
|
+
Version: 0.13.71
|
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
|
@@ -2,7 +2,7 @@ ingestr/conftest.py,sha256=OE2yxeTCosS9CUFVuqNypm-2ftYvVBeeq7egm3878cI,1981
|
|
2
2
|
ingestr/main.py,sha256=wu4c_4nit3c5v2K1af68DjT2hIfEiCvzQ8EZJxOkJjo,26369
|
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=
|
5
|
+
ingestr/src/buildinfo.py,sha256=GlvBwB8aV5mufGGW4MafbR067L8Zr8wModuobUsy3Gs,21
|
6
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
|
@@ -74,7 +74,7 @@ ingestr/src/hubspot/__init__.py,sha256=wqHefhc_YRI5dNFCcpvH-UUilNThE49sbGouSBiHY
|
|
74
74
|
ingestr/src/hubspot/helpers.py,sha256=k2b-lhxqBNKHoOSHoHegFSsk8xxjjGA0I04V0XyX2b4,7883
|
75
75
|
ingestr/src/hubspot/settings.py,sha256=i73MkSiJfRLMFLfiJgYdhp-rhymHTfoqFzZ4uOJdFJM,2456
|
76
76
|
ingestr/src/isoc_pulse/__init__.py,sha256=9b4eN4faatpiwTuRNPuYcEt1hEFDEjua9XhfakUigBk,4648
|
77
|
-
ingestr/src/kafka/__init__.py,sha256=
|
77
|
+
ingestr/src/kafka/__init__.py,sha256=QUHsGmdv5_E-3z0GDHXvbk39puwuGDBsyYSDhvbA89E,3595
|
78
78
|
ingestr/src/kafka/helpers.py,sha256=V9WcVn3PKnEpggArHda4vnAcaV8VDuh__dSmRviJb5Y,7502
|
79
79
|
ingestr/src/kinesis/__init__.py,sha256=YretSz4F28tbkcPhd55mBp2Xk7XE9unyWx0nmvl8iEc,6235
|
80
80
|
ingestr/src/kinesis/helpers.py,sha256=SO2cFmWNGcykUYmjHdfxWsOQSkLQXyhFtfWnkcUOM0s,3152
|
@@ -117,8 +117,8 @@ ingestr/src/slack/__init__.py,sha256=pyDukxcilqTAe_bBzfWJ8Vxi83S-XEdEFBH2pEgILrM
|
|
117
117
|
ingestr/src/slack/helpers.py,sha256=08TLK7vhFvH_uekdLVOLF3bTDe1zgH0QxHObXHzk1a8,6545
|
118
118
|
ingestr/src/slack/settings.py,sha256=NhKn4y1zokEa5EmIZ05wtj_-I0GOASXZ5V81M1zXCtY,457
|
119
119
|
ingestr/src/smartsheets/__init__.py,sha256=pdzSV7rA0XYD5Xa1u4zb6vziy5iFXIQNROkpJ9oYas0,1623
|
120
|
-
ingestr/src/solidgate/__init__.py,sha256=
|
121
|
-
ingestr/src/solidgate/helpers.py,sha256=
|
120
|
+
ingestr/src/solidgate/__init__.py,sha256=Ts83j-JSnFsFuF4tDhVOfZKg7H0-bIpfn3kg1ZOR58A,8003
|
121
|
+
ingestr/src/solidgate/helpers.py,sha256=yZRBrBZlofuTvKOs_KQVoH1K60shSeDMyiBYzXYfMT0,5750
|
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
|
@@ -126,7 +126,7 @@ ingestr/src/stripe_analytics/helpers.py,sha256=KGtRcSrhKEqzJ3AWpgDV2o4cuBFaIwu2G
|
|
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
|
129
|
-
ingestr/src/tiktok_ads/__init__.py,sha256=
|
129
|
+
ingestr/src/tiktok_ads/__init__.py,sha256=KFaN_s7VIj9AW6z-4Fcq0PXYcoX7OtKUgrdcHEitvUk,4794
|
130
130
|
ingestr/src/tiktok_ads/tiktok_helpers.py,sha256=jmWHvZzN1Vt_PWrJkgq5a2wIwon-OBEzXoZx0jEy-74,3905
|
131
131
|
ingestr/src/trustpilot/__init__.py,sha256=ofhjep4qRPIi8q41qc97QVex8UbWF-Fd7gUsqeQlQX8,1279
|
132
132
|
ingestr/src/trustpilot/client.py,sha256=zKYt5C7nrR83Id0KN49EPmtml8MEtlSPlAosEFU3VXY,1616
|
@@ -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.71.dist-info/METADATA,sha256=YIzmk8sSvhEUF2Yb7VRLRyGJpcigSaJrExacU-QtXlU,15022
|
151
|
+
ingestr-0.13.71.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
152
|
+
ingestr-0.13.71.dist-info/entry_points.txt,sha256=oPJy0KBnPWYjDtP1k8qwAihcTLHSZokSQvRAw_wtfJM,46
|
153
|
+
ingestr-0.13.71.dist-info/licenses/LICENSE.md,sha256=cW8wIhn8HFE-KLStDF9jHQ1O_ARWP3kTpk_-eOccL24,1075
|
154
|
+
ingestr-0.13.71.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|