Skip to main content

crawlers

Creates, updates, deletes, gets or lists a crawlers resource.

Overview

Namecrawlers
TypeResource
Idaws.glue.crawlers

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
crawlersarrayA list of crawler definitions.
crawlers_not_foundarrayA list of names of crawlers that were not found.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
batch_get_crawlersselectregionReturns a list of resource metadata for a given list of crawler names. After calling the ListCrawlers operation, you can call this operation to access the data to which you have been granted permissions. This operation supports all IAM permissions, including permission conditions that uses tags.
get_crawlerselectregionRetrieves metadata for a specified crawler.
create_crawlerinsertregionCreates a new crawler with specified targets, role, configuration, and optional schedule. At least one crawl target must be specified, in the s3Targets field, the jdbcTargets field, or the DynamoDBTargets field.
update_crawler_scheduleupdateregion, CrawlerNameUpdates the schedule of a crawler using a cron expression.
update_crawlerupdateregionUpdates a crawler. If a crawler is running, you must stop it using StopCrawler before updating it.
delete_crawlerdeleteregionRemoves a specified crawler from the Glue Data Catalog, unless the crawler state is RUNNING.
get_crawlersexecregionRetrieves metadata for all crawlers defined in the customer account.
list_crawlersexecregionRetrieves the names of all crawler resources in this Amazon Web Services account, or the resources with the specified tag. This operation allows you to see which resources are available in your account, and their names. This operation takes the optional Tags field, which you can use as a filter on the response so that tagged resources can be retrieved as a group. If you choose to use tags filtering, only resources with the tag are retrieved.
start_crawler_scheduleexecregion, CrawlerNameChanges the schedule state of the specified crawler to SCHEDULED, unless the crawler is already running or the schedule state is already SCHEDULED.
stop_crawler_scheduleexecregion, CrawlerNameSets the schedule state of the specified crawler to NOT_SCHEDULED, but does not stop the crawler if it is already running.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Returns a list of resource metadata for a given list of crawler names. After calling the ListCrawlers operation, you can call this operation to access the data to which you have been granted permissions. This operation supports all IAM permissions, including permission conditions that uses tags.

SELECT
crawlers,
crawlers_not_found
FROM aws.glue.crawlers
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a new crawler with specified targets, role, configuration, and optional schedule. At least one crawl target must be specified, in the s3Targets field, the jdbcTargets field, or the DynamoDBTargets field.

INSERT INTO aws.glue.crawlers (
Name,
Role,
DatabaseName,
Description,
Targets,
Schedule,
Classifiers,
TablePrefix,
SchemaChangePolicy,
RecrawlPolicy,
LineageConfiguration,
LakeFormationConfiguration,
Configuration,
CrawlerSecurityConfiguration,
Tags,
region
)
SELECT
'{{ Name }}',
'{{ Role }}',
'{{ DatabaseName }}',
'{{ Description }}',
'{{ Targets }}',
'{{ Schedule }}',
'{{ Classifiers }}',
'{{ TablePrefix }}',
'{{ SchemaChangePolicy }}',
'{{ RecrawlPolicy }}',
'{{ LineageConfiguration }}',
'{{ LakeFormationConfiguration }}',
'{{ Configuration }}',
'{{ CrawlerSecurityConfiguration }}',
'{{ Tags }}',
'{{ region }}'
;

UPDATE examples

Updates the schedule of a crawler using a cron expression.

UPDATE aws.glue.crawlers
SET
CrawlerName = '{{ CrawlerName }}',
Schedule = '{{ Schedule }}'
WHERE
region = '{{ region }}' --required
AND CrawlerName = '{{ CrawlerName }}' --required;

DELETE examples

Removes a specified crawler from the Glue Data Catalog, unless the crawler state is RUNNING.

DELETE FROM aws.glue.crawlers
WHERE region = '{{ region }}' --required
;

Lifecycle Methods

Retrieves metadata for all crawlers defined in the customer account.

EXEC aws.glue.crawlers.get_crawlers
@region='{{ region }}' --required
@@json=
'{
"MaxResults": {{ MaxResults }},
"NextToken": "{{ NextToken }}"
}'
;