Class AssetReporter

  • All Implemented Interfaces:
    com.amazonaws.services.lambda.runtime.RequestHandler<java.util.Map<java.lang.String,​java.lang.String>,​java.lang.String>
    Direct Known Subclasses:
    ExportAllDataAssets

    public abstract class AssetReporter
    extends AbstractReporter
    implements com.amazonaws.services.lambda.runtime.RequestHandler<java.util.Map<java.lang.String,​java.lang.String>,​java.lang.String>
    • Constructor Detail

      • AssetReporter

        public AssetReporter()
    • Method Detail

      • getAssetsToExtract

        public abstract com.atlan.model.search.FluentSearch.FluentSearchBuilder<?,​?> getAssetsToExtract​(java.util.Map<java.lang.String,​java.lang.String> event)
        Produce a query that will retrieve all the assets you want to extract.
        Parameters:
        event - context passed through the Lambda invocation event (or environment variables)
        Returns:
        a fluent search with all necessary conditions for selecting the set of assets to extract
      • getAttributesToExtract

        public abstract java.util.List<com.atlan.model.fields.AtlanField> getAttributesToExtract​(java.util.Map<java.lang.String,​java.lang.String> event)
        Produce a list of all the attributes that should be extracted for each asset, in the order they should be produced for each row of the output. The qualifiedName and type of every asset will automatically be included as the first two columns (as they are required), so you do not need to specify these.
        Parameters:
        event - context passed through the Lambda invocation event (or environment variables)
        Returns:
        list of attributes to include for each asset
      • getRelatedAttributesToExtract

        public java.util.List<com.atlan.model.fields.AtlanField> getRelatedAttributesToExtract​(java.util.Map<java.lang.String,​java.lang.String> event)
        Produce a list of all the attributes that should be extracted for each related asset that is retrieved through the search. The qualifiedName and type of every related asset will automatically be included, so you do not need to specify these. (You only need to override this class if you want any other related attributes.)
        Parameters:
        event - context passed through the Lambda invocation event (or environment variables)
        Returns:
        list of attributes to include for each related asset
      • getAssetToValueTranslator

        public RowGenerator getAssetToValueTranslator​(java.util.Map<java.lang.String,​java.lang.String> event)
        Produces a function that will translate all the attributes from each asset to string-encoded results that can be placed into the CSV.
        Parameters:
        event - context passed through the Lambda invocation event (or environment variables)
        Returns:
        a row generator that translates from asset to a row of strings for the CSV
      • handleRequest

        public java.lang.String handleRequest​(java.util.Map<java.lang.String,​java.lang.String> event,
                                              com.amazonaws.services.lambda.runtime.Context context)
        Specified by:
        handleRequest in interface com.amazonaws.services.lambda.runtime.RequestHandler<java.util.Map<java.lang.String,​java.lang.String>,​java.lang.String>
      • envVarsAsEvent

        public static java.util.Map<java.lang.String,​java.lang.String> envVarsAsEvent()
        Translates environment variables into a pseudo-event, to have a common method (handleRequest(Map, Context)) across both local workstation runtimes and AWS Lambda execution.
        Returns:
        a map of environment variables as if they are event context from AWS
      • parseParametersFromEvent

        protected void parseParametersFromEvent​(java.util.Map<java.lang.String,​java.lang.String> event)
        Description copied from class: AbstractReporter
        Extract the configuration parameters to use from the lambda payload (or equivalent).
        Overrides:
        parseParametersFromEvent in class AbstractReporter
        Parameters:
        event - configuration payload from the lambda function (or equivalent)