refactor to allow for multiple code locations

This commit is contained in:
2025-07-20 19:49:30 +02:00
parent 9b8cfabee5
commit fd73e1367c
40 changed files with 161 additions and 628 deletions

48
apps/other/test.py Normal file
View File

@@ -0,0 +1,48 @@
from assets import asset_multi_1, asset_multi_2, asset_single_1, asset_single_2
from dagster_polars import PolarsParquetIOManager
from dagster import materialize
resources = {
"polars_parquet_io_manager": PolarsParquetIOManager(base_dir="/opt/dagster/storage")
}
def test_single():
result = materialize(
[asset_single_1, asset_single_2],
partition_key="2024-10-02",
resources=resources,
)
assert result.success
ic(result.asset_value)
def test_multi():
# result = materialize([
# asset_multi_1
# ], partition_key="2024-10-01|plato", resources=resources
# )
# assert result.success
# ic(result.asset_value)
#
#
# result = materialize([
# asset_multi_1
# ], partition_key="2024-10-02|plato", resources=resources
# )
# assert result.success
# ic(result.asset_value)
result = materialize(
[asset_multi_1, asset_multi_2],
partition_key="2024-10-02|plato",
resources=resources,
)
assert result.success
ic(result.asset_value)
if __name__ == "__main__":
# test_single()
test_multi()