Jacob Marcil
02/16/2023, 9:05 PMValueError: Tried to get asset partitions for an output that correponds to a partitioned asset that is not partitioned with a TimeWindowPartitionsDefinition.
Anyone know what I should do?claire
02/16/2023, 10:20 PMJacob Marcil
02/16/2023, 10:22 PMMultiKeyPartition
and if so how can I tell him which one is static and which one is the time windows function.
Right now the only configuration parameter for partition seems to be partition_expr
and this needs to be a Time windows.
Right?Jacob Marcil
02/16/2023, 10:25 PM@asset(
partitions_def=dar_multi_partitions,
op_tags={"kind": "snowflake"},
io_manager_key="warehouse_io_manager",
key_prefix=["dar"],
required_resource_keys={"snowflake"},
metadata={"partition_expr": "effectivetime"},
)
def dar_hourly_token_price(dar_hourly_token_price_s3) -> DataFrame:
payload = json.loads(dar_hourly_token_price_s3)
df = pd.json_normalize(payload["prices"], sep="_")
return df
dar_hourly_token_price_s3
is partition with the same partitions_def
.claire
02/16/2023, 10:25 PMjamie
02/16/2023, 10:28 PM@asset(
partitions_def=MultiPartitionsDefinition(
{
"date": DailyPartitionsDefinition(start_date="2023-01-01"),
"species": StaticPartitionDefinition(
["Iris-setosa", "Iris-virginica", "Iris-versicolor"]
),
}
),
metadata={
"partition_expr": {"date": "DATE", "species": "SPECIES"}
},
)
There will be docs for this shortly!Jacob Marcil
02/16/2023, 10:29 PM