astro-anand opened a new issue, #53474:
URL: https://github.com/apache/airflow/issues/53474
### Apache Airflow version
3.0.3
### If "Other Airflow 2 version" selected, which one?
_No response_
### What happened?
In version 3.0.2 I was able to emit an asset with some values pulled from a
dataframe in the extra field. These values were of type np.float64. In 3.0.3,
the task failed on attempting to emit the asset extra.
### What you think should happen instead?
The asset should be created with the relevant extra.
### How to reproduce
```python
import random
from airflow.sdk import dag, task, Asset, AssetAlias
ALIAS = AssetAlias("s3://alias-example")
TEST_ASSET = Asset("s3://my-bucket/data/file.csv")
@dag(tags=["asset_demo"])
def asset_demo():
@task
def get_file_ids():
return [i for i in range(10)]
@task(outlets=[TEST_ASSET])
def add_assets_to_alias(i, outlet_events):
"""
adds assets to alias
"""
import numpy as np
random_value = random.randint(1, 100)
print(random_value, "is the random value for file_id:", i)
outlet_events[TEST_ASSET].extra = {
"file_id": i,
"random_value": random_value,
"float_value": np.float64(1.23412415),
}
add_assets_to_alias.expand(i=get_file_ids())
```
### Operating System
Linux
### Versions of Apache Airflow Providers
N/A
### Deployment
Astronomer
### Deployment details
_No response_
### Anything else?
_No response_
### Are you willing to submit PR?
- [x] Yes I am willing to submit a PR!
### Code of Conduct
- [x] I agree to follow this project's [Code of
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]