We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The new pythonic resources allow us to pass the resource directly as a parameter to the asset, instead of going through the asset context.
A simplified example of what we have now:
@asset( required_resource_keys={"file_store"}, partitions_def=PartitionDefinitionAHN(), ) def laz_files_ahn3(context): context.resources.file_store.file_store.data_dir
What is possible with the pythonic resource:
@asset(partitions_def=PartitionDefinitionAHN()) def laz_files_ahn3(context, file_store: FileStoreResource): file_store.data_dir
While the first works, the second approach has a few advantages, it's shorter and we get code completion and type checking in the editor.
Finish the migration of the assets to the pythonic resource usage.
The text was updated successfully, but these errors were encountered:
GinaStavropoulou
No branches or pull requests
The new pythonic resources allow us to pass the resource directly as a parameter to the asset, instead of going through the asset context.
A simplified example of what we have now:
What is possible with the pythonic resource:
While the first works, the second approach has a few advantages, it's shorter and we get code completion and type checking in the editor.
Finish the migration of the assets to the pythonic resource usage.
The text was updated successfully, but these errors were encountered: