Repository navigation
Conversation
convert and census read the folder holding the policy file as a project: tables from sources/*.yml in SQLBuild's source format, functions from functions/sql/*.sql (FUNCTION header) and functions/python/*.py (@udf decorator from sqlbuild.functions or sqlquack), and overrides from overrides/. [project.session] and [project.confirm] give session parameters and confirmations; flags apply on top for one run, --schema adds to the project's declarations, and a name declared twice is an error naming both files. The Python API takes ConvertOptions(project=). A refused Python function's help names the line to add under [project.confirm]. Override headers share the project's header parser, which now keeps commas and parentheses inside quoted descriptions.
The table is left out whole, so SELECT * never misses a column; convert and census name the file, the source and the column on standard error, and convert's report lists the same message under warnings.
Contributor
Author
|
Post-launch: this project-configuration feature isn't needed for launch, so it stays open and out of the current landing queue. It will be reviewed when the SQLBuild integration work starts, and will need main merged in and an auditor read then. |
Contributor
Author
|
Closing: SQLQuack lands through local-gate trains, not PR merges (D94), so open PRs only add clutter (D628/D630). The branch is kept. Any work here that isn't on main yet is tracked by the train owner and lands through a train. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
A SQLQuack project should be configured the way a SQLBuild project is: tables, functions and overrides found by convention beside the config file, with no flags inside a project. A SQLBuild project's sources and functions folders should work unchanged.
Changes
convertandcensustreat the folder holdingsqlquack.toml(or--policy) as a project and read:sources/*.ymlin SQLBuild's source format (name, columns with name and type), names upper-cased as Snowflake folds them; inline-expression sources are not tables, and a source with an untyped column is left out with a warning naming the file, source and column.functions/sql/*.sql(SQLBuild'sFUNCTION ( ... );header) andfunctions/python/*.py(@udf(...), imported fromsqlbuild.functionsorsqlquack), named after the file.overrides/, as--overridesreads it.sqlquack.tomlgains[project](folder paths only where they differ),[project.session]and[project.confirm](python_runtime,utc_session,declared_offsets).--schemaadds to the project, and a name declared twice is an error naming both files.[project.confirm].ConvertOptions(project=...)andsqlquack.udf.Verification
make check-cipasses locally. Lands after fix: translate common incremental-model timestamp idioms #96 through the merge gate.