Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zero-Downtime option for CTAS recreation #95

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

SOVALINUX
Copy link

Implementation for #88

README.md Outdated
{{config(tags=['table_zero_downtime'])}}
```
2. Create a companion view for your table
a) It's usually is very simple like `select * from {{ref('table_model')}}`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curios question: why not let the code do this themselves? Like create the real table with a temp name and the name which corresponds to the filename as a view with this simple select star?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jankatins Good catch actually - Thanks! Haven't considered such an option to be honest. Will think on it - since it might eliminate several downsides of the solution

@jcgarciam-signavio
Copy link

What about the following approach:

  • Create a CTAS with random name (and specific location) (1)
  • Create the target table as a CTA with the NO DATA, so it only copy the table structure.
  • Use Glue API to point the target table location to the S3 files from (1)
  • Drop the Athena table created from (1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants