YAML value column selector
Maintainers usually reply within 1 day
@rich-iannone is already working on this.
Since Dec 3, 2025.
Assessment
This issue has not been assessed yet.
Description
Description
I can't get pb.col() to work within the YAML workflow. It appears, for col_vals_ge() & col_vals_gt() at least, pb.col() inputs fail in _string_date_dttm_conversion(value=value).
Reproducible example
Create some data for example:
import pointblank as pb
import polars as pl
from datetime import date
df = pl.DataFrame(
{
"id": list(range(123, 123 + 6)), # 123, 124, 125, 126, 127, 128
"start_date": [
date(2024, 5, 1),
date(2024, 6, 1),
date(2024, 5, 15),
date(2024, 7, 1),
date(2024, 6, 10),
date(2024, 5, 20),
],
"end_date": [
date(2024, 5, 10),
date(2024, 6, 5),
date(2024, 5, 25),
date(2024, 7, 10),
date(2024, 6, 5),
date(2024, 5, 30),
],
}
)
This validation works, 1 row fails because the end date is later than the start date:
validation = (
pb.Validate(data=df)
.col_vals_ge(columns="end_date", value=pb.col("start_date"))
.interrogate()
)
validation
This validation fails, I get the error ValueError: If value= is provided as a string it must be a date or datetime string:
# Set to small_table because None fails due to validator that runs before set_tbl, allowing None would be helpful but totally separate issue :)
pb_yaml = '''
tbl: small_table
steps:
- col_vals_ge:
columns: [end_date]
value: pb.col("start_date")
'''
result = pb.yaml_interrogate(pb_yaml, set_tbl = df)
Expected result
I want the YAML validation to provide the same output as the python code version above.
Development environment
macOS 14.5
pointblank 0.14.0
- Dominant language
- Python
- Stars
- 493
- Forks
- 34
- Avg merge
- 13h 39m
- Merged PRs (30d)
- 16
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from posit-dev/pointblank
-
Type: ★ Enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
posit-dev/pointblank#379 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
posit-dev/pointblank#395 ·
Maintainers usually reply within 1 day
-
Type: ★ Enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
posit-dev/pointblank#394 ·
Maintainers usually reply within 1 day
-
ibis.pyspark col_vals_in_set produces invalid SQLMay be free again @rich-iannone claimed this 295 days ago, and no pull request is open. OpenDifficulty: [2] Intermediate Effort: [3] High Priority: [3] High Type: ☹︎ Bug
posit-dev/pointblank#335 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
Type: ⁇ Question
Difficulty 5/5 Over a week Newbie friendliness 25/100
posit-dev/pointblank#323 ·
Maintainers usually reply within 1 day
All issues in posit-dev/pointblank
Similar issues
-
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
tharje/spooler-v2#20 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Bump version of azure-servicebusPossibly taken @joostlek claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
home-assistant/core#186275 ·
Maintainers usually reply within 1 day
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 72/100