DEV Community

Marcos Henrique
Marcos Henrique

Posted on

4 4

[SOLVED] glue view is stale; it must be re-created

when you facing this annoying error:

'<your-view-name' is stale; it must be re-created
This query ran against the "glue_<yours>_crawler"

power rangers begging for something to stop

In the most cases the solution is simple, despite you barely find solutions on the internet (stackoverflow and some fancy blogs) try just review your columns order on presto metadata, in my case I'm creating the view with aws cdk, so I created a json with my configuration like the following example and then parse this to base64:

{
  "catalog": "awsdatacatalog",
  "schema": "glue_my_crawler",
  "columns": [
    {
      "name": "name",
      "type": "varchar"
    },
    {
      "id": "id",
      "type": "varchar"
    },
  ],
  "originalSql": "SELECT id, name from \"schema-job-result\""
}
Enter fullscreen mode Exit fullscreen mode

The example above results on the:

'<your-view-name' is stale; it must be re-created
This query ran against the "glue_<yours>_crawler"

The correct way is like the example bellow

{
  "catalog": "awsdatacatalog",
  "schema": "glue_my_crawler",
  "columns": [
    {
      "name": "id",
      "type": "varchar"
    },
    {
      "id": "name",
      "type": "varchar"
    },
  ],
  "originalSql": "SELECT id, name from \"schema-job-result\""
}
Enter fullscreen mode Exit fullscreen mode

Barney thumbs up

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post →

Top comments (0)

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up