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

fix: Optimize regex in post-hooks #623

Merged
merged 1 commit into from
Apr 15, 2024
Merged

fix: Optimize regex in post-hooks #623

merged 1 commit into from
Apr 15, 2024

Conversation

CommonCrisis
Copy link
Contributor

@CommonCrisis CommonCrisis commented Apr 15, 2024

optimize\W+\w+\W+rewrite data using bin_pack does not match optimize awsdatacatalog.db_name.fct_table_name__inc rewrite data using bin_pack and therefor fails.

Description

I was wondering why this does not work. But the current regex does not match <data_source>.<db_name>.<table_name>.

Can you maybe check on your end, why the regex was designed this way? Not too sure if I am missing sth.
My post hooks are:

    ...
    s3_data_naming = 'schema_table_unique',
    post_hook=['optimize {{ this }} rewrite data using bin_pack', 'vacuum {{ this }}'],
    table_properties={
     'optimize_rewrite_delete_file_threshold': '10'
     }
  )

Checklist

  • You followed contributing section
  • You kept your Pull Request small and focused on a single feature or bug fix.
  • You added unit testing when necessary
  • You added functional testing when necessary

optimize\W+\w+\W+rewrite data using bin_pack does not match

optimize awsdatacatalog.db_name.fct_table_name__inc rewrite data using bin_pack
@nicor88 nicor88 changed the title Optimize regex is not correct fix: Optimize regex in post-hooks Apr 15, 2024
@nicor88
Copy link
Contributor

nicor88 commented Apr 15, 2024

@Jrmyy any idea about the original implementation?

@Jrmyy
Copy link
Contributor

Jrmyy commented Apr 15, 2024

Hum I don't recall exactly, I thought I handled the case of having data catalog and db name but it seems not 😅

@nicor88 nicor88 merged commit b3f85b9 into dbt-labs:main Apr 15, 2024
12 checks passed
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