Skip to content

Commit 8a9785e

Browse files
committed
fixed: infer datatypes from sequence_by to __START_AT, __END_AT for apply_changes API
removed: github actions for release modified: setup.py for version
1 parent 84945c1 commit 8a9785e

File tree

3 files changed

+8
-16
lines changed

3 files changed

+8
-16
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,4 @@ jobs:
3737
uses: pypa/gh-action-pypi-publish@release/v1
3838
with:
3939
user: __token__
40-
password: ${{ secrets.LABS_PYPI_TOKEN }}
41-
42-
- name: Create Release
43-
uses: actions/create-release@v1
44-
env:
45-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions
46-
with:
47-
tag_name: ${{ github.ref }}
48-
release_name: Release ${{ github.ref }}
49-
body: |
50-
Release for version ${{ github.ref }}. Please refer to CHANGELOG.md for detailed information.
51-
draft: false
52-
prerelease: false
40+
password: ${{ secrets.LABS_PYPI_TOKEN }}

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"""
2020
setup(
2121
name="dlt_meta",
22-
version="0.0.2",
22+
version="0.0.21",
2323
python_requires=">=3.8",
2424
setup_requires=["wheel>=0.37.1,<=0.40.0"],
2525
install_requires=INSTALL_REQUIRES,

src/dataflow_pipeline.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,16 +253,20 @@ def cdc_apply_changes(self):
253253
else self.silver_schema
254254
)
255255

256+
sequenced_by_data_type = None
257+
256258
if cdc_apply_changes.except_column_list:
257259
modified_schema = StructType([])
258260
for field in struct_schema.fields:
259261
if field.name not in cdc_apply_changes.except_column_list:
260262
modified_schema.add(field)
263+
if field.name == cdc_apply_changes.sequence_by:
264+
sequenced_by_data_type = field.dataType
261265
struct_schema = modified_schema
262266

263267
if cdc_apply_changes.scd_type == "2":
264-
struct_schema.add(StructField("__START_AT", IntegerType()))
265-
struct_schema.add(StructField("__END_AT", IntegerType()))
268+
struct_schema.add(StructField("__START_AT", sequenced_by_data_type))
269+
struct_schema.add(StructField("__END_AT", sequenced_by_data_type))
266270

267271
dlt.create_streaming_live_table(
268272
name=f"{self.dataflowSpec.targetDetails['table']}",

0 commit comments

Comments
 (0)