Ad
  • Custom User Avatar

    I'm stuck. I don't know how to troubleshoot any further, when the data changes before I can inspect it.

    I'm getting ~90% accuracy, with about 5% of expected names failing to appear in my final report, and 5% appearing with a "max" credit limit lower than the expected max.

    I assume some rows are somehow failing to pass through my transformation pipeline, but I haven't any idea how to check why that happens. The test run failed info lists which rows were incorrect or absent, but I can't then go browse the prospect source data to figure out why exactly that row is being dropped (or not matched).

    Any tips on how to continue troubleshooting?

  • Custom User Avatar

    Coming from other languages: this made my head explode. Well done!

  • Custom User Avatar

    I suspect a programming bug in the implementation of the tests.

    I think "the randomized process generating the input data" is being invoked twice, yielding different results for user code versus test code, which has an exceedingly low probability of being identical. Thus, correct implementations don't match the expected output.

  • Custom User Avatar
  • Custom User Avatar

    I feel silly. Just noticed the instruction near the start to only count days in 2023.

  • Custom User Avatar

    I'm pretty inexperienced with SQL, so this could totally be a newbie mistake, but I think the provided tests are malfunctioning?

    [1, '2022-12-31'],  # Last Saturday of 2022
    [1, '2023-01-01'],  # First Sunday of 2023, still ISO week 52 of 2022
    [1, '2023-10-07'],  # A Saturday in late 2023
    [1, '2023-10-08'],  # A Sunday in late 2023
    

    But the expected in the test comes back as

    employee_id weekends_worked total_weekend_days_worked
    1 2 3

    Just eyeballing the test data, shouldn't that be 2 weekends, 4 days?