move partition definition
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import os
|
||||
import sys
|
||||
from collections.abc import Iterator
|
||||
from functools import partial
|
||||
@@ -7,6 +6,7 @@ from logging import getLogger
|
||||
import pandas as pd
|
||||
import pyarrow as pa
|
||||
from config import APP
|
||||
from partitions import daily_partitions_def
|
||||
|
||||
import dagster as dg
|
||||
|
||||
@@ -50,11 +50,6 @@ def iris_cleaned(table: pa.Table) -> pa.Table:
|
||||
return pa.Table.from_pandas(result_df)
|
||||
|
||||
|
||||
daily_partitions_def = dg.DailyPartitionsDefinition(
|
||||
start_date="2024-09-01", end_offset=1, timezone=os.environ.get("TZ", "UTC")
|
||||
)
|
||||
|
||||
|
||||
@asset(partitions_def=daily_partitions_def)
|
||||
def one() -> Iterator[dg.Output[int]]:
|
||||
# Attempt to materialize multiple times
|
||||
|
||||
7
apps/other/src/partitions.py
Normal file
7
apps/other/src/partitions.py
Normal file
@@ -0,0 +1,7 @@
|
||||
import os
|
||||
|
||||
import dagster as dg
|
||||
|
||||
daily_partitions_def = dg.DailyPartitionsDefinition(
|
||||
start_date="2024-09-01", end_offset=1, timezone=os.environ.get("TZ", "UTC")
|
||||
)
|
||||
Reference in New Issue
Block a user