You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from kartothek.io.eager import commit_dataset, write_single_partition, create_empty_dataset_header
from kartothek.core.common_metadata import make_meta
import pandas as pd
import storefact
store = storefact.get_store_from_url("hfs:///tmp/some_directory")
for x in store.keys():
store.delete(x)
df = pd.DataFrame({"a": [1, 1, 2, 2], "b": [3, 4, 5, 6]})
create_empty_dataset_header(
store=store,
dataset_uuid="uuid",
table_meta={"table": make_meta(df, "table", ["a"])},
partition_on=["a"],
)
partitions = []
for x in range(2):
partitions.append(
write_single_partition(
store=store,
dataset_uuid="uuid",
data={"data": {"table": df}},
partition_on=["a"],
)
)
commit_dataset(
store=store,
dataset_uuid="uuid",
new_partitions=partitions,
partition_on=["a"],
)
Will create the error message AttributeError: Accessing label attribute is not allowed while nested.
Additionally you can observe the behaviour that after commit_dataset the partitions list contains one less element. In my understanding commit_dataset should not manipulate input objects.
The text was updated successfully, but these errors were encountered:
The following code example
Will create the error message
AttributeError: Accessing
labelattribute is not allowed while nested
.Additionally you can observe the behaviour that after
commit_dataset
thepartitions
list contains one less element. In my understandingcommit_dataset
should not manipulate input objects.The text was updated successfully, but these errors were encountered: