0

I am creating a crawler through AWS CLI in Glue, but facing issue.

Here's the CLI Command that i use

aws glue create-crawler \
--name "mytestcrawlernew" \
--role "arn:aws:iam::role/AWSGlueServiceRole-AWSGlueServiceRole" \
--database-name "mydb" \
--description "This is the test Crawler" \
--targets "JdbcTargets":{"ConnectionName":"RS_Connection"}

Am i doing anything wring, cause i am facing the subjected issue

Marcin
  • 215,873
  • 14
  • 235
  • 294

1 Answers1

1

On the official documentation here, you can have a look at the proper syntax like in this example:

aws glue create-crawler 
--name comprehend-analysis-crawler
--role glue-iam-role-arn 
--targets S3Targets=[
{Path="s3://DOC-EXAMPLE-BUCKET/sentiment-results"},
{Path="s3://DOC-EXAMPLE-BUCKET/entities-results"}] 
--database-name comprehend-results

Look carefully that you are stating --targets "JdbcTargets" and it looks like it should be --targets JdbcTargets=[

Colin Moreno Burgess
  • 1,432
  • 1
  • 12
  • 17
  • Thanks @Ikaro0 Added one more param to JdbcTargets as 'Path'--> --targets JdbcTargets=[{ConnectionName="RS_Connection"},{Path="awsuser\public\tutorial_tbl"}] here awsuser = DB Name public = schema tutorial_tbl=Table Name which needs to be crawled it's now giving below error "An error occurred (InvalidInputException) when calling the CreateCrawler operation: Connection name cannot be equal to null or empty." – Devanshi Apr 07 '21 at 17:33
  • Can you update your initial post with the new code for anyone that came here to watch your question? – Colin Moreno Burgess Apr 08 '21 at 19:47