szalai1
05/27/2021, 9:37 AMget_output_asset_key
,but when I implemented it I got this error:
Both the OutputDefinition and the IOManager of output "result" on solid "pull_tweets" associate it with an asset. Either remove the asset_key parameter on the OutputDefinition or use an IOManager that does not specify an AssetKey in its get_output_asset_key() function.
class S3IOManagerWithPathEntry(PickledObjectS3IOManager):
def get_output_asset_key(self, context:OutputContext):
return AssetKey(context.name)
def handle_output(self, context, obj):
super().handle_output(context, obj)
yield EventMetadataEntry.path(f"s3://{self.bucket}/{self._get_path(context)}", label="path")
alex
05/27/2021, 2:55 PMprha
05/27/2021, 4:19 PMget_output_asset_key
in the IOManager.users
asset from a solid create_users_table
. But you could also want to materialize a location-specific asset, like redshift > users
or snowflake > users
, where it kind of depends how you’ve configured your IOManager.szalai1
05/28/2021, 9:25 AMIf you have a generic solid, and want to materialize an asset whose key depends on the behavior of the io manager, you probably want to usedoes this mean I shouldn't name my output with asset_key, but using thre ``get_output_asset_key`` method ?in the IOManager.get_output_asset_key
prha
05/28/2021, 3:35 PMasset_key
, you should do that instead of using the IOManager get_output_asset_key