简体   繁体   中英

Error Update Crawler when using UpdateCrawler from AWS powershell tools

I was trying to update the Glue Crawler from a powershell script. But it seems AWS dont like the name, eventhough the crawler name was created by the AWS Data Lake Formation!

I want to update only the include path, nothing else one that crawler, so i assume the below JSON request is ok, any idea why i'm getting the error?

    # Update Source Schema Discoverer Crawler.
    $crawlername = 'wf_db_snapshot_discoverer_286ef141'
    $includePath = "$($Config.DbName)/dbo/%"

$crawlerUpdateReq = @"
{
   "Name": "$crawlername",
   "Targets": { 
      "JdbcTargets": [ 
         { 
            "Path": "$includePath"
         }
      ]
   }
}
"@

$crawlerUpdateResp = Update-GLUECrawler $crawlerUpdateReq

Log

Updating Crawler...
1 validation error detected: Value '{
   "Name": "wf_db_snapshot_discoverer_286ef141",
   "Targets": {
      "JdbcTargets": [
         {
            "Path": "DB_029/dbo/%"
         }
      ]
   }
}' at 'name' failed to satisfy constraint: Member must satisfy regular expression pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\t]*
1 validation error detected: Value '{
   "Name": "wf_db_snapshot_discoverer_286ef141",
   "Targets": {
      "JdbcTargets": [
         {
            "Path": "DB_029/dbo/%"
         }
      ]
   }
}' at 'name' failed to satisfy constraint: Member must satisfy regular expression pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\t]*
The remote server returned an error: (400) Bad Request.
The remote server returned an error: (400) Bad Request.

The regular expression pattern: [\ -\퟿\-\�\?\?-\?\?\\t]* does not allow you to add new line characters. The JSON needs to be minified before sending to the API endpoint.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM