Class S3CsvItemReader
Item Reader configuration for iterating over items in a CSV file stored in S3.
Implements
Namespace: Amazon.CDK.AWS.StepFunctions
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class S3CsvItemReader : DeputyBase, IItemReader
Syntax (vb)
Public Class S3CsvItemReader Inherits DeputyBase Implements IItemReader
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.S3;
using Amazon.CDK.AWS.StepFunctions;
Bucket bucket;
CsvHeaders csvHeaders;
var s3CsvItemReader = new S3CsvItemReader(new S3CsvItemReaderProps {
Key = "key",
// the properties below are optional
Bucket = bucket,
BucketNamePath = "bucketNamePath",
CsvDelimiter = CsvDelimiter.COMMA,
CsvHeaders = csvHeaders,
MaxItems = 123
});
Synopsis
Constructors
S3CsvItemReader(IS3CsvItemReaderProps) | Item Reader configuration for iterating over items in a CSV file stored in S3. |
Properties
Bucket | S3 Bucket containing a file with a list to iterate over. |
BucketNamePath | S3 bucket name containing objects to iterate over or a file with a list to iterate over, as JsonPath. |
CsvDelimiter | Delimiter used in CSV file. |
CsvHeaders | CSV headers configuration. |
InputType | Item Reader configuration for iterating over items in a CSV file stored in S3. |
Key | S3 key of a file with a list to iterate over. |
MaxItems | Limits the number of items passed to the Distributed Map state. |
Resource | ARN for the |
Methods
ProvidePolicyStatements() | Compile policy statements to provide relevent permissions to the state machine. |
Render(QueryLanguage?) | Renders the ItemReader configuration as JSON object. |
ValidateItemReader() | Validate that ItemReader contains exactly either. |
Constructors
S3CsvItemReader(IS3CsvItemReaderProps)
Item Reader configuration for iterating over items in a CSV file stored in S3.
public S3CsvItemReader(IS3CsvItemReaderProps props)
Parameters
- props IS3CsvItemReaderProps
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.S3;
using Amazon.CDK.AWS.StepFunctions;
Bucket bucket;
CsvHeaders csvHeaders;
var s3CsvItemReader = new S3CsvItemReader(new S3CsvItemReaderProps {
Key = "key",
// the properties below are optional
Bucket = bucket,
BucketNamePath = "bucketNamePath",
CsvDelimiter = CsvDelimiter.COMMA,
CsvHeaders = csvHeaders,
MaxItems = 123
});
Properties
Bucket
S3 Bucket containing a file with a list to iterate over.
public virtual IBucket Bucket { get; }
Property Value
Remarks
ExampleMetadata: fixture=_generated
BucketNamePath
S3 bucket name containing objects to iterate over or a file with a list to iterate over, as JsonPath.
public virtual string? BucketNamePath { get; }
Property Value
Remarks
ExampleMetadata: fixture=_generated
CsvDelimiter
Delimiter used in CSV file.
public virtual CsvDelimiter? CsvDelimiter { get; }
Property Value
Remarks
ExampleMetadata: fixture=_generated
CsvHeaders
CSV headers configuration.
public virtual CsvHeaders CsvHeaders { get; }
Property Value
Remarks
ExampleMetadata: fixture=_generated
InputType
Item Reader configuration for iterating over items in a CSV file stored in S3.
protected virtual string InputType { get; }
Property Value
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.S3;
using Amazon.CDK.AWS.StepFunctions;
Bucket bucket;
CsvHeaders csvHeaders;
var s3CsvItemReader = new S3CsvItemReader(new S3CsvItemReaderProps {
Key = "key",
// the properties below are optional
Bucket = bucket,
BucketNamePath = "bucketNamePath",
CsvDelimiter = CsvDelimiter.COMMA,
CsvHeaders = csvHeaders,
MaxItems = 123
});
Key
S3 key of a file with a list to iterate over.
public virtual string Key { get; }
Property Value
Remarks
ExampleMetadata: fixture=_generated
MaxItems
Limits the number of items passed to the Distributed Map state.
public virtual double? MaxItems { get; }
Property Value
Remarks
Default: - No maxItems
Resource
ARN for the getObject
method of the S3 API This API method is used to iterate all objects in the S3 bucket/prefix.
public virtual string Resource { get; }
Property Value
Remarks
ExampleMetadata: fixture=_generated
Methods
ProvidePolicyStatements()
Compile policy statements to provide relevent permissions to the state machine.
public virtual PolicyStatement[] ProvidePolicyStatements()
Returns
Remarks
ExampleMetadata: fixture=_generated
Render(QueryLanguage?)
Renders the ItemReader configuration as JSON object.
public virtual object Render(QueryLanguage? queryLanguage = null)
Parameters
- queryLanguage QueryLanguage?
Returns
Remarks
ExampleMetadata: fixture=_generated
ValidateItemReader()
Validate that ItemReader contains exactly either.
public virtual string[] ValidateItemReader()
Returns
string[]
Remarks
See: bucketNamePath