cuddly-jelly-27016
05/31/2025, 12:09 AMextract task with AttributeError: 'StructuredDataset' object has no attribute 'to_flyte_idl'.
@dataclass
class Data:
f: StructuredDataset
@task
def create_data() -> Data:
return Data(f=StructuredDataset(dataframe=pd.DataFrame({"a": [5]})))
@task
def extract(d: Data) -> StructuredDataset:
return d.f
@workflow
def example_wf() -> None:
d = create_data()
f = extract(d=d)
It is possible to work around the issue by returning StructuredDataset(dataframe=d.f.open(pd.DataFrame).all()) instead.
### Expected behavior
The field value should be returned by the task.
### Additional context to reproduce
No response
### Screenshots
No response
### Are you sure this issue hasn't been raised already?
• Yes
### Have you read the Code of Conduct?
• Yes
flyteorg/flytecuddly-jelly-27016
05/31/2025, 12:09 AM