Package com.atlan.samples.loaders
Class AssetLoader
- java.lang.Object
-
- com.atlan.samples.loaders.AbstractLoader
-
- com.atlan.samples.loaders.AssetLoader
-
- All Implemented Interfaces:
com.amazonaws.services.lambda.runtime.RequestHandler<java.util.Map<java.lang.String,java.lang.String>,java.lang.String>
- Direct Known Subclasses:
ImportAllDataAssets
public abstract class AssetLoader extends AbstractLoader implements com.amazonaws.services.lambda.runtime.RequestHandler<java.util.Map<java.lang.String,java.lang.String>,java.lang.String>
-
-
Constructor Summary
Constructors Constructor Description AssetLoader()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.util.List<com.atlan.model.fields.AtlanField>
getAttributesToOverwrite()
Produce a list of all the attributes that should be overwritten for each asset, even when their value is empty in the input CSV file.AssetGenerator
getRowToAssetTranslator()
Produces a function that will translate all the values from a row of CSV into an asset that can be saved into Atlan.java.lang.String
handleRequest(java.util.Map<java.lang.String,java.lang.String> event, com.amazonaws.services.lambda.runtime.Context context)
static java.util.Map<java.lang.String,java.lang.String>
prepEvent()
Translates environment variables into a pseudo-event, to have a common method (handleRequest(Map, Context)
) across both local workstation runtimes and AWS Lambda execution.-
Methods inherited from class com.atlan.samples.loaders.AbstractLoader
appendAtlanTags, deserializeAssetRefFromCSV, deserializeCMValueFromCSV, deserializeEnumFromCSV, deserializeStructToCSV, deserializeValueFromCSV, getBatchSize, getBucket, getDelimiter, getEmbeddedList, getFilename, getRegion, isUpdateOnly, parseParametersFromEvent, setFilename
-
-
-
-
Method Detail
-
getAttributesToOverwrite
public abstract java.util.List<com.atlan.model.fields.AtlanField> getAttributesToOverwrite()
Produce a list of all the attributes that should be overwritten for each asset, even when their value is empty in the input CSV file.- Returns:
- list of attributes to overwrite for each asset
-
getRowToAssetTranslator
public AssetGenerator getRowToAssetTranslator()
Produces a function that will translate all the values from a row of CSV into an asset that can be saved into Atlan.- Returns:
- an asset generator that translates from row of CSV to asset
-
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 interfacecom.amazonaws.services.lambda.runtime.RequestHandler<java.util.Map<java.lang.String,java.lang.String>,java.lang.String>
-
prepEvent
public static java.util.Map<java.lang.String,java.lang.String> prepEvent()
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
-
-