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

Functional test for hourly microbatch model #11220

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft

Conversation

dbeatty10
Copy link
Contributor

@dbeatty10 dbeatty10 commented Jan 16, 2025

Resolves #11165

Problem

For hourly microbatch models that run concurrently (like Snowflake), the batch id can have spaces which causes an invalid name for the temporary table and leads to a database error.

Solution

Only use alphanumeric characters within batch ids.

Since the most granular batch size is hour, the simplest solution might be to use the ISO8601 basic format for time using an hour granularity:

    def format_batch_start(batch_start: datetime, batch_size: BatchSize) -> str:
        return batch_start.strftime("%Y%m%dT%H")

Checklist

  • I have read the contributing guide and understand what's expected of me.
  • I have run this code in development, and it appears to resolve the stated issue.
  • This PR includes tests, or tests are not required or relevant for this PR.
  • This PR has no interface changes (e.g., macros, CLI, logs, JSON artifacts, config files, adapter interface, etc.).
  • This PR includes type annotations for new and modified functions.

@dbeatty10 dbeatty10 added the Skip Changelog Skips GHA to check for changelog file label Jan 16, 2025
@cla-bot cla-bot bot added the cla:yes label Jan 16, 2025
Copy link

codecov bot commented Jan 16, 2025

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Project coverage is 82.73%. Comparing base (3de3b82) to head (65a1db0).

❗ There is a different number of reports uploaded between BASE (3de3b82) and HEAD (65a1db0). Click for more details.

HEAD has 20 uploads less than BASE
Flag BASE (3de3b82) HEAD (65a1db0)
unit 4 0
integration 20 4
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11220      +/-   ##
==========================================
- Coverage   88.92%   82.73%   -6.20%     
==========================================
  Files         187      187              
  Lines       24041    24043       +2     
==========================================
- Hits        21378    19891    -1487     
- Misses       2663     4152    +1489     
Flag Coverage Δ
integration 82.73% <0.00%> (-3.59%) ⬇️
unit ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Unit Tests 82.73% <0.00%> (-6.20%) ⬇️
Integration Tests 82.73% <0.00%> (-3.59%) ⬇️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla:yes Skip Changelog Skips GHA to check for changelog file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] MicrobatchBuilder generates invalid table names with spaces for hourly batches
1 participant