CfnCrawler
- class aws_cdk.aws_glue.CfnCrawler(scope, id, *, role, targets, classifiers=None, configuration=None, crawler_security_configuration=None, database_name=None, description=None, lake_formation_configuration=None, name=None, recrawl_policy=None, schedule=None, schema_change_policy=None, table_prefix=None, tags=None)
Bases:
CfnResource
The
AWS::Glue::Crawler
resource specifies an AWS Glue crawler.For more information, see Cataloging Tables with a Crawler and Crawler Structure in the AWS Glue Developer Guide .
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-crawler.html
- CloudformationResource:
AWS::Glue::Crawler
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_glue as glue # tags: Any cfn_crawler = glue.CfnCrawler(self, "MyCfnCrawler", role="role", targets=glue.CfnCrawler.TargetsProperty( catalog_targets=[glue.CfnCrawler.CatalogTargetProperty( connection_name="connectionName", database_name="databaseName", dlq_event_queue_arn="dlqEventQueueArn", event_queue_arn="eventQueueArn", tables=["tables"] )], delta_targets=[glue.CfnCrawler.DeltaTargetProperty( connection_name="connectionName", create_native_delta_table=False, delta_tables=["deltaTables"], write_manifest=False )], dynamo_db_targets=[glue.CfnCrawler.DynamoDBTargetProperty( path="path" )], iceberg_targets=[glue.CfnCrawler.IcebergTargetProperty( connection_name="connectionName", exclusions=["exclusions"], maximum_traversal_depth=123, paths=["paths"] )], jdbc_targets=[glue.CfnCrawler.JdbcTargetProperty( connection_name="connectionName", enable_additional_metadata=["enableAdditionalMetadata"], exclusions=["exclusions"], path="path" )], mongo_db_targets=[glue.CfnCrawler.MongoDBTargetProperty( connection_name="connectionName", path="path" )], s3_targets=[glue.CfnCrawler.S3TargetProperty( connection_name="connectionName", dlq_event_queue_arn="dlqEventQueueArn", event_queue_arn="eventQueueArn", exclusions=["exclusions"], path="path", sample_size=123 )] ), # the properties below are optional classifiers=["classifiers"], configuration="configuration", crawler_security_configuration="crawlerSecurityConfiguration", database_name="databaseName", description="description", lake_formation_configuration=glue.CfnCrawler.LakeFormationConfigurationProperty( account_id="accountId", use_lake_formation_credentials=False ), name="name", recrawl_policy=glue.CfnCrawler.RecrawlPolicyProperty( recrawl_behavior="recrawlBehavior" ), schedule=glue.CfnCrawler.ScheduleProperty( schedule_expression="scheduleExpression" ), schema_change_policy=glue.CfnCrawler.SchemaChangePolicyProperty( delete_behavior="deleteBehavior", update_behavior="updateBehavior" ), table_prefix="tablePrefix", tags=tags )
- Parameters:
scope (
Construct
) – Scope in which this resource is defined.id (
str
) – Construct identifier for this resource (unique in its scope).role (
str
) – The Amazon Resource Name (ARN) of an IAM role that’s used to access customer resources, such as Amazon Simple Storage Service (Amazon S3) data.targets (
Union
[IResolvable
,TargetsProperty
,Dict
[str
,Any
]]) – A collection of targets to crawl.classifiers (
Optional
[Sequence
[str
]]) – A list of UTF-8 strings that specify the names of custom classifiers that are associated with the crawler.configuration (
Optional
[str
]) – Crawler configuration information. This versioned JSON string allows users to specify aspects of a crawler’s behavior. For more information, see Configuring a Crawler .crawler_security_configuration (
Optional
[str
]) – The name of theSecurityConfiguration
structure to be used by this crawler.database_name (
Optional
[str
]) – The name of the database in which the crawler’s output is stored.description (
Optional
[str
]) – A description of the crawler.lake_formation_configuration (
Union
[IResolvable
,LakeFormationConfigurationProperty
,Dict
[str
,Any
],None
]) – Specifies whether the crawler should use AWS Lake Formation credentials for the crawler instead of the IAM role credentials.name (
Optional
[str
]) – The name of the crawler.recrawl_policy (
Union
[IResolvable
,RecrawlPolicyProperty
,Dict
[str
,Any
],None
]) – A policy that specifies whether to crawl the entire dataset again, or to crawl only folders that were added since the last crawler run.schedule (
Union
[IResolvable
,ScheduleProperty
,Dict
[str
,Any
],None
]) – For scheduled crawlers, the schedule when the crawler runs.schema_change_policy (
Union
[IResolvable
,SchemaChangePolicyProperty
,Dict
[str
,Any
],None
]) – The policy that specifies update and delete behaviors for the crawler. The policy tells the crawler what to do in the event that it detects a change in a table that already exists in the customer’s database at the time of the crawl. TheSchemaChangePolicy
does not affect whether or how new tables and partitions are added. New tables and partitions are always created regardless of theSchemaChangePolicy
on a crawler. The SchemaChangePolicy consists of two components,UpdateBehavior
andDeleteBehavior
.table_prefix (
Optional
[str
]) – The prefix added to the names of tables that are created.tags (
Any
) – The tags to use with this crawler.
Methods
- add_deletion_override(path)
Syntactic sugar for
addOverride(path, undefined)
.- Parameters:
path (
str
) – The path of the value to delete.- Return type:
None
- add_dependency(target)
Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.
- Parameters:
target (
CfnResource
) –- Return type:
None
- add_depends_on(target)
(deprecated) Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
- Parameters:
target (
CfnResource
) –- Deprecated:
use addDependency
- Stability:
deprecated
- Return type:
None
- add_metadata(key, value)
Add a value to the CloudFormation Resource Metadata.
- Parameters:
key (
str
) –value (
Any
) –
- See:
- Return type:
None
Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.
- add_override(path, value)
Adds an override to the synthesized CloudFormation resource.
To add a property override, either use
addPropertyOverride
or prefixpath
with “Properties.” (i.e.Properties.TopicName
).If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.
To include a literal
.
in the property name, prefix with a\
. In most programming languages you will need to write this as"\\."
because the\
itself will need to be escaped.For example:
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"]) cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")
would add the overrides Example:
"Properties": { "GlobalSecondaryIndexes": [ { "Projection": { "NonKeyAttributes": [ "myattribute" ] ... } ... }, { "ProjectionType": "INCLUDE" ... }, ] ... }
The
value
argument toaddOverride
will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.- Parameters:
path (
str
) –The path of the property, you can use dot notation to override values in complex types. Any intermediate keys will be created as needed.
value (
Any
) –The value. Could be primitive or complex.
- Return type:
None
- add_property_deletion_override(property_path)
Adds an override that deletes the value of a property from the resource definition.
- Parameters:
property_path (
str
) – The path to the property.- Return type:
None
- add_property_override(property_path, value)
Adds an override to a resource property.
Syntactic sugar for
addOverride("Properties.<...>", value)
.- Parameters:
property_path (
str
) – The path of the property.value (
Any
) – The value.
- Return type:
None
- apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)
Sets the deletion policy of the resource based on the removal policy specified.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.
The resource can be deleted (
RemovalPolicy.DESTROY
), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN
). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT
). A list of resources that support this policy can be found in the following link:- Parameters:
policy (
Optional
[RemovalPolicy
]) –apply_to_update_replace_policy (
Optional
[bool
]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: truedefault (
Optional
[RemovalPolicy
]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resource, please consult that specific resource’s documentation.
- See:
- Return type:
None
- get_att(attribute_name, type_hint=None)
Returns a token for an runtime attribute of this resource.
Ideally, use generated attribute accessors (e.g.
resource.arn
), but this can be used for future compatibility in case there is no generated attribute.- Parameters:
attribute_name (
str
) – The name of the attribute.type_hint (
Optional
[ResolutionTypeHint
]) –
- Return type:
- get_metadata(key)
Retrieve a value value from the CloudFormation Resource Metadata.
- Parameters:
key (
str
) –- See:
- Return type:
Any
Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.
- inspect(inspector)
Examines the CloudFormation resource and discloses attributes.
- Parameters:
inspector (
TreeInspector
) – tree inspector to collect and process attributes.- Return type:
None
- obtain_dependencies()
Retrieves an array of resources this resource depends on.
This assembles dependencies on resources across stacks (including nested stacks) automatically.
- Return type:
List
[Union
[Stack
,CfnResource
]]
- obtain_resource_dependencies()
Get a shallow copy of dependencies between this resource and other resources in the same stack.
- Return type:
List
[CfnResource
]
- override_logical_id(new_logical_id)
Overrides the auto-generated logical ID with a specific ID.
- Parameters:
new_logical_id (
str
) – The new logical ID to use for this stack element.- Return type:
None
- remove_dependency(target)
Indicates that this resource no longer depends on another resource.
This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.
- Parameters:
target (
CfnResource
) –- Return type:
None
- replace_dependency(target, new_target)
Replaces one dependency with another.
- Parameters:
target (
CfnResource
) – The dependency to replace.new_target (
CfnResource
) – The new dependency to add.
- Return type:
None
- to_string()
Returns a string representation of this construct.
- Return type:
str
- Returns:
a string representation of this resource
Attributes
- CFN_RESOURCE_TYPE_NAME = 'AWS::Glue::Crawler'
- cfn_options
Options for this resource, such as condition, update policy etc.
- cfn_resource_type
AWS resource type.
- classifiers
A list of UTF-8 strings that specify the names of custom classifiers that are associated with the crawler.
- configuration
Crawler configuration information.
- crawler_security_configuration
The name of the
SecurityConfiguration
structure to be used by this crawler.
- creation_stack
return:
the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.
- database_name
The name of the database in which the crawler’s output is stored.
- description
A description of the crawler.
- lake_formation_configuration
Specifies whether the crawler should use AWS Lake Formation credentials for the crawler instead of the IAM role credentials.
- logical_id
The logical ID for this CloudFormation stack element.
The logical ID of the element is calculated from the path of the resource node in the construct tree.
To override this value, use
overrideLogicalId(newLogicalId)
.- Returns:
the logical ID as a stringified token. This value will only get resolved during synthesis.
- name
The name of the crawler.
- node
The tree node.
- recrawl_policy
A policy that specifies whether to crawl the entire dataset again, or to crawl only folders that were added since the last crawler run.
- ref
Return a string that will be resolved to a CloudFormation
{ Ref }
for this element.If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through
Lazy.any({ produce: resource.ref })
.
- role
The Amazon Resource Name (ARN) of an IAM role that’s used to access customer resources, such as Amazon Simple Storage Service (Amazon S3) data.
- schedule
For scheduled crawlers, the schedule when the crawler runs.
- schema_change_policy
The policy that specifies update and delete behaviors for the crawler.
- stack
The stack in which this element is defined.
CfnElements must be defined within a stack scope (directly or indirectly).
- table_prefix
The prefix added to the names of tables that are created.
- tags
Tag Manager which manages the tags for this resource.
- tags_raw
The tags to use with this crawler.
- targets
A collection of targets to crawl.
Static Methods
- classmethod is_cfn_element(x)
Returns
true
if a construct is a stack element (i.e. part of the synthesized cloudformation template).Uses duck-typing instead of
instanceof
to allow stack elements from different versions of this library to be included in the same stack.- Parameters:
x (
Any
) –- Return type:
bool
- Returns:
The construct as a stack element or undefined if it is not a stack element.
- classmethod is_cfn_resource(x)
Check whether the given object is a CfnResource.
- Parameters:
x (
Any
) –- Return type:
bool
- classmethod is_construct(x)
Checks if
x
is a construct.Use this method instead of
instanceof
to properly detectConstruct
instances, even when the construct library is symlinked.Explanation: in JavaScript, multiple copies of the
constructs
library on disk are seen as independent, completely different libraries. As a consequence, the classConstruct
in each copy of theconstructs
library is seen as a different class, and an instance of one class will not test asinstanceof
the other class.npm install
will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of theconstructs
library can be accidentally installed, andinstanceof
will behave unpredictably. It is safest to avoid usinginstanceof
, and using this type-testing method instead.- Parameters:
x (
Any
) – Any object.- Return type:
bool
- Returns:
true if
x
is an object created from a class which extendsConstruct
.
CatalogTargetProperty
- class CfnCrawler.CatalogTargetProperty(*, connection_name=None, database_name=None, dlq_event_queue_arn=None, event_queue_arn=None, tables=None)
Bases:
object
Specifies an AWS Glue Data Catalog target.
- Parameters:
connection_name (
Optional
[str
]) – The name of the connection for an Amazon S3-backed Data Catalog table to be a target of the crawl when using aCatalog
connection type paired with aNETWORK
Connection type.database_name (
Optional
[str
]) – The name of the database to be synchronized.dlq_event_queue_arn (
Optional
[str
]) – A valid Amazon dead-letter SQS ARN. For example,arn:aws:sqs:region:account:deadLetterQueue
.event_queue_arn (
Optional
[str
]) – A valid Amazon SQS ARN. For example,arn:aws:sqs:region:account:sqs
.tables (
Optional
[Sequence
[str
]]) – A list of the tables to be synchronized.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_glue as glue catalog_target_property = glue.CfnCrawler.CatalogTargetProperty( connection_name="connectionName", database_name="databaseName", dlq_event_queue_arn="dlqEventQueueArn", event_queue_arn="eventQueueArn", tables=["tables"] )
Attributes
- connection_name
The name of the connection for an Amazon S3-backed Data Catalog table to be a target of the crawl when using a
Catalog
connection type paired with aNETWORK
Connection type.
- database_name
The name of the database to be synchronized.
- dlq_event_queue_arn
A valid Amazon dead-letter SQS ARN.
For example,
arn:aws:sqs:region:account:deadLetterQueue
.
- event_queue_arn
A valid Amazon SQS ARN.
For example,
arn:aws:sqs:region:account:sqs
.
- tables
A list of the tables to be synchronized.
DeltaTargetProperty
- class CfnCrawler.DeltaTargetProperty(*, connection_name=None, create_native_delta_table=None, delta_tables=None, write_manifest=None)
Bases:
object
Specifies a Delta data store to crawl one or more Delta tables.
- Parameters:
connection_name (
Optional
[str
]) – The name of the connection to use to connect to the Delta table target.create_native_delta_table (
Union
[bool
,IResolvable
,None
]) – Specifies whether the crawler will create native tables, to allow integration with query engines that support querying of the Delta transaction log directly.delta_tables (
Optional
[Sequence
[str
]]) – A list of the Amazon S3 paths to the Delta tables.write_manifest (
Union
[bool
,IResolvable
,None
]) – Specifies whether to write the manifest files to the Delta table path.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_glue as glue delta_target_property = glue.CfnCrawler.DeltaTargetProperty( connection_name="connectionName", create_native_delta_table=False, delta_tables=["deltaTables"], write_manifest=False )
Attributes
- connection_name
The name of the connection to use to connect to the Delta table target.
- create_native_delta_table
Specifies whether the crawler will create native tables, to allow integration with query engines that support querying of the Delta transaction log directly.
- delta_tables
A list of the Amazon S3 paths to the Delta tables.
- write_manifest
Specifies whether to write the manifest files to the Delta table path.
DynamoDBTargetProperty
- class CfnCrawler.DynamoDBTargetProperty(*, path=None)
Bases:
object
Specifies an Amazon DynamoDB table to crawl.
- Parameters:
path (
Optional
[str
]) – The name of the DynamoDB table to crawl.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_glue as glue dynamo_dBTarget_property = glue.CfnCrawler.DynamoDBTargetProperty( path="path" )
Attributes
- path
The name of the DynamoDB table to crawl.
IcebergTargetProperty
- class CfnCrawler.IcebergTargetProperty(*, connection_name=None, exclusions=None, maximum_traversal_depth=None, paths=None)
Bases:
object
Specifies Apache Iceberg data store targets.
- Parameters:
connection_name (
Optional
[str
]) – The name of the connection to use to connect to the Iceberg target.exclusions (
Optional
[Sequence
[str
]]) – A list of global patterns used to exclude from the crawl.maximum_traversal_depth (
Union
[int
,float
,None
]) – The maximum depth of Amazon S3 paths that the crawler can traverse to discover the Iceberg metadata folder in your Amazon S3 path. Used to limit the crawler run time.paths (
Optional
[Sequence
[str
]]) – One or more Amazon S3 paths that contains Iceberg metadata folders as s3://bucket/prefix .
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_glue as glue iceberg_target_property = glue.CfnCrawler.IcebergTargetProperty( connection_name="connectionName", exclusions=["exclusions"], maximum_traversal_depth=123, paths=["paths"] )
Attributes
- connection_name
The name of the connection to use to connect to the Iceberg target.
- exclusions
A list of global patterns used to exclude from the crawl.
- maximum_traversal_depth
The maximum depth of Amazon S3 paths that the crawler can traverse to discover the Iceberg metadata folder in your Amazon S3 path.
Used to limit the crawler run time.
- paths
//bucket/prefix .
- See:
- Type:
One or more Amazon S3 paths that contains Iceberg metadata folders as s3
JdbcTargetProperty
- class CfnCrawler.JdbcTargetProperty(*, connection_name=None, enable_additional_metadata=None, exclusions=None, path=None)
Bases:
object
Specifies a JDBC data store to crawl.
- Parameters:
connection_name (
Optional
[str
]) – The name of the connection to use to connect to the JDBC target.enable_additional_metadata (
Optional
[Sequence
[str
]]) – Specify a value ofRAWTYPES
orCOMMENTS
to enable additional metadata in table responses.RAWTYPES
provides the native-level datatype.COMMENTS
provides comments associated with a column or table in the database. If you do not need additional metadata, keep the field empty.exclusions (
Optional
[Sequence
[str
]]) – A list of glob patterns used to exclude from the crawl. For more information, see Catalog Tables with a Crawler .path (
Optional
[str
]) – The path of the JDBC target.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_glue as glue jdbc_target_property = glue.CfnCrawler.JdbcTargetProperty( connection_name="connectionName", enable_additional_metadata=["enableAdditionalMetadata"], exclusions=["exclusions"], path="path" )
Attributes
- connection_name
The name of the connection to use to connect to the JDBC target.
- enable_additional_metadata
Specify a value of
RAWTYPES
orCOMMENTS
to enable additional metadata in table responses.RAWTYPES
provides the native-level datatype.COMMENTS
provides comments associated with a column or table in the database.If you do not need additional metadata, keep the field empty.
- exclusions
A list of glob patterns used to exclude from the crawl.
For more information, see Catalog Tables with a Crawler .
- path
The path of the JDBC target.
LakeFormationConfigurationProperty
- class CfnCrawler.LakeFormationConfigurationProperty(*, account_id=None, use_lake_formation_credentials=None)
Bases:
object
Specifies AWS Lake Formation configuration settings for the crawler.
- Parameters:
account_id (
Optional
[str
]) – Required for cross account crawls. For same account crawls as the target data, this can be left as null.use_lake_formation_credentials (
Union
[bool
,IResolvable
,None
]) – Specifies whether to use AWS Lake Formation credentials for the crawler instead of the IAM role credentials.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_glue as glue lake_formation_configuration_property = glue.CfnCrawler.LakeFormationConfigurationProperty( account_id="accountId", use_lake_formation_credentials=False )
Attributes
- account_id
Required for cross account crawls.
For same account crawls as the target data, this can be left as null.
- use_lake_formation_credentials
Specifies whether to use AWS Lake Formation credentials for the crawler instead of the IAM role credentials.
MongoDBTargetProperty
- class CfnCrawler.MongoDBTargetProperty(*, connection_name=None, path=None)
Bases:
object
Specifies an Amazon DocumentDB or MongoDB data store to crawl.
- Parameters:
connection_name (
Optional
[str
]) – The name of the connection to use to connect to the Amazon DocumentDB or MongoDB target.path (
Optional
[str
]) – The path of the Amazon DocumentDB or MongoDB target (database/collection).
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_glue as glue mongo_dBTarget_property = glue.CfnCrawler.MongoDBTargetProperty( connection_name="connectionName", path="path" )
Attributes
- connection_name
The name of the connection to use to connect to the Amazon DocumentDB or MongoDB target.
- path
The path of the Amazon DocumentDB or MongoDB target (database/collection).
RecrawlPolicyProperty
- class CfnCrawler.RecrawlPolicyProperty(*, recrawl_behavior=None)
Bases:
object
When crawling an Amazon S3 data source after the first crawl is complete, specifies whether to crawl the entire dataset again or to crawl only folders that were added since the last crawler run.
For more information, see Incremental Crawls in AWS Glue in the developer guide.
- Parameters:
recrawl_behavior (
Optional
[str
]) – Specifies whether to crawl the entire dataset again or to crawl only folders that were added since the last crawler run. A value ofCRAWL_EVERYTHING
specifies crawling the entire dataset again. A value ofCRAWL_NEW_FOLDERS_ONLY
specifies crawling only folders that were added since the last crawler run. A value ofCRAWL_EVENT_MODE
specifies crawling only the changes identified by Amazon S3 events.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_glue as glue recrawl_policy_property = glue.CfnCrawler.RecrawlPolicyProperty( recrawl_behavior="recrawlBehavior" )
Attributes
- recrawl_behavior
Specifies whether to crawl the entire dataset again or to crawl only folders that were added since the last crawler run.
A value of
CRAWL_EVERYTHING
specifies crawling the entire dataset again.A value of
CRAWL_NEW_FOLDERS_ONLY
specifies crawling only folders that were added since the last crawler run.A value of
CRAWL_EVENT_MODE
specifies crawling only the changes identified by Amazon S3 events.
S3TargetProperty
- class CfnCrawler.S3TargetProperty(*, connection_name=None, dlq_event_queue_arn=None, event_queue_arn=None, exclusions=None, path=None, sample_size=None)
Bases:
object
Specifies a data store in Amazon Simple Storage Service (Amazon S3).
- Parameters:
connection_name (
Optional
[str
]) – The name of a connection which allows a job or crawler to access data in Amazon S3 within an Amazon Virtual Private Cloud environment (Amazon VPC).dlq_event_queue_arn (
Optional
[str
]) – A valid Amazon dead-letter SQS ARN. For example,arn:aws:sqs:region:account:deadLetterQueue
.event_queue_arn (
Optional
[str
]) – A valid Amazon SQS ARN. For example,arn:aws:sqs:region:account:sqs
.exclusions (
Optional
[Sequence
[str
]]) –A list of glob patterns used to exclude from the crawl. For more information, see Catalog Tables with a Crawler .
path (
Optional
[str
]) – The path to the Amazon S3 target.sample_size (
Union
[int
,float
,None
]) – Sets the number of files in each leaf folder to be crawled when crawling sample files in a dataset. If not set, all the files are crawled. A valid value is an integer between 1 and 249.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_glue as glue s3_target_property = glue.CfnCrawler.S3TargetProperty( connection_name="connectionName", dlq_event_queue_arn="dlqEventQueueArn", event_queue_arn="eventQueueArn", exclusions=["exclusions"], path="path", sample_size=123 )
Attributes
- connection_name
The name of a connection which allows a job or crawler to access data in Amazon S3 within an Amazon Virtual Private Cloud environment (Amazon VPC).
- dlq_event_queue_arn
A valid Amazon dead-letter SQS ARN.
For example,
arn:aws:sqs:region:account:deadLetterQueue
.
- event_queue_arn
A valid Amazon SQS ARN.
For example,
arn:aws:sqs:region:account:sqs
.
- exclusions
A list of glob patterns used to exclude from the crawl.
For more information, see Catalog Tables with a Crawler .
- path
The path to the Amazon S3 target.
- sample_size
Sets the number of files in each leaf folder to be crawled when crawling sample files in a dataset.
If not set, all the files are crawled. A valid value is an integer between 1 and 249.
ScheduleProperty
- class CfnCrawler.ScheduleProperty(*, schedule_expression=None)
Bases:
object
A scheduling object using a
cron
statement to schedule an event.- Parameters:
schedule_expression (
Optional
[str
]) – Acron
expression used to specify the schedule. For more information, see Time-Based Schedules for Jobs and Crawlers . For example, to run something every day at 12:15 UTC, specifycron(15 12 * * ? *)
.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_glue as glue schedule_property = glue.CfnCrawler.ScheduleProperty( schedule_expression="scheduleExpression" )
Attributes
- schedule_expression
A
cron
expression used to specify the schedule.For more information, see Time-Based Schedules for Jobs and Crawlers . For example, to run something every day at 12:15 UTC, specify
cron(15 12 * * ? *)
.
SchemaChangePolicyProperty
- class CfnCrawler.SchemaChangePolicyProperty(*, delete_behavior=None, update_behavior=None)
Bases:
object
The policy that specifies update and delete behaviors for the crawler.
The policy tells the crawler what to do in the event that it detects a change in a table that already exists in the customer’s database at the time of the crawl. The
SchemaChangePolicy
does not affect whether or how new tables and partitions are added. New tables and partitions are always created regardless of theSchemaChangePolicy
on a crawler.The SchemaChangePolicy consists of two components,
UpdateBehavior
andDeleteBehavior
.- Parameters:
delete_behavior (
Optional
[str
]) – The deletion behavior when the crawler finds a deleted object. A value ofLOG
specifies that if a table or partition is found to no longer exist, do not delete it, only log that it was found to no longer exist. A value ofDELETE_FROM_DATABASE
specifies that if a table or partition is found to have been removed, delete it from the database. A value ofDEPRECATE_IN_DATABASE
specifies that if a table has been found to no longer exist, to add a property to the table that says “DEPRECATED” and includes a timestamp with the time of deprecation.update_behavior (
Optional
[str
]) – The update behavior when the crawler finds a changed schema. A value ofLOG
specifies that if a table or a partition already exists, and a change is detected, do not update it, only log that a change was detected. Add new tables and new partitions (including on existing tables). A value ofUPDATE_IN_DATABASE
specifies that if a table or partition already exists, and a change is detected, update it. Add new tables and partitions.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_glue as glue schema_change_policy_property = glue.CfnCrawler.SchemaChangePolicyProperty( delete_behavior="deleteBehavior", update_behavior="updateBehavior" )
Attributes
- delete_behavior
The deletion behavior when the crawler finds a deleted object.
A value of
LOG
specifies that if a table or partition is found to no longer exist, do not delete it, only log that it was found to no longer exist.A value of
DELETE_FROM_DATABASE
specifies that if a table or partition is found to have been removed, delete it from the database.A value of
DEPRECATE_IN_DATABASE
specifies that if a table has been found to no longer exist, to add a property to the table that says “DEPRECATED” and includes a timestamp with the time of deprecation.
- update_behavior
The update behavior when the crawler finds a changed schema.
A value of
LOG
specifies that if a table or a partition already exists, and a change is detected, do not update it, only log that a change was detected. Add new tables and new partitions (including on existing tables).A value of
UPDATE_IN_DATABASE
specifies that if a table or partition already exists, and a change is detected, update it. Add new tables and partitions.
TargetsProperty
- class CfnCrawler.TargetsProperty(*, catalog_targets=None, delta_targets=None, dynamo_db_targets=None, iceberg_targets=None, jdbc_targets=None, mongo_db_targets=None, s3_targets=None)
Bases:
object
Specifies data stores to crawl.
- Parameters:
catalog_targets (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,CatalogTargetProperty
,Dict
[str
,Any
]]],None
]) – Specifies AWS Glue Data Catalog targets.delta_targets (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,DeltaTargetProperty
,Dict
[str
,Any
]]],None
]) – Specifies an array of Delta data store targets.dynamo_db_targets (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,DynamoDBTargetProperty
,Dict
[str
,Any
]]],None
]) – Specifies Amazon DynamoDB targets.iceberg_targets (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,IcebergTargetProperty
,Dict
[str
,Any
]]],None
]) – Specifies Apache Iceberg data store targets.jdbc_targets (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,JdbcTargetProperty
,Dict
[str
,Any
]]],None
]) – Specifies JDBC targets.mongo_db_targets (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,MongoDBTargetProperty
,Dict
[str
,Any
]]],None
]) – A list of Mongo DB targets.s3_targets (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,S3TargetProperty
,Dict
[str
,Any
]]],None
]) – Specifies Amazon Simple Storage Service (Amazon S3) targets.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_glue as glue targets_property = glue.CfnCrawler.TargetsProperty( catalog_targets=[glue.CfnCrawler.CatalogTargetProperty( connection_name="connectionName", database_name="databaseName", dlq_event_queue_arn="dlqEventQueueArn", event_queue_arn="eventQueueArn", tables=["tables"] )], delta_targets=[glue.CfnCrawler.DeltaTargetProperty( connection_name="connectionName", create_native_delta_table=False, delta_tables=["deltaTables"], write_manifest=False )], dynamo_db_targets=[glue.CfnCrawler.DynamoDBTargetProperty( path="path" )], iceberg_targets=[glue.CfnCrawler.IcebergTargetProperty( connection_name="connectionName", exclusions=["exclusions"], maximum_traversal_depth=123, paths=["paths"] )], jdbc_targets=[glue.CfnCrawler.JdbcTargetProperty( connection_name="connectionName", enable_additional_metadata=["enableAdditionalMetadata"], exclusions=["exclusions"], path="path" )], mongo_db_targets=[glue.CfnCrawler.MongoDBTargetProperty( connection_name="connectionName", path="path" )], s3_targets=[glue.CfnCrawler.S3TargetProperty( connection_name="connectionName", dlq_event_queue_arn="dlqEventQueueArn", event_queue_arn="eventQueueArn", exclusions=["exclusions"], path="path", sample_size=123 )] )
Attributes
- catalog_targets
Specifies AWS Glue Data Catalog targets.
- delta_targets
Specifies an array of Delta data store targets.
- dynamo_db_targets
Specifies Amazon DynamoDB targets.
- iceberg_targets
Specifies Apache Iceberg data store targets.
- jdbc_targets
Specifies JDBC targets.
- mongo_db_targets
A list of Mongo DB targets.
- s3_targets
Specifies Amazon Simple Storage Service (Amazon S3) targets.