Repository navigation
docs(databricks): dbt column types per adapter and the runtime platform a Databricks dbt build must set - #334
Merged
Merged
Conversation
…rm a Databricks dbt build must set Dialect column types such as int64 and datetime2 map to a native type on Redshift, DuckDB and Databricks, and a type with none is refused by validate and generate transformation. A dbt build that writes a Databricks table must set execution.runtime.platform. Not yet in a release. Signed-off-by: Speculator55005 <50082482+fas89@users.noreply.github.com>
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.
What
Documents forge-cli #1187, which is merged into
main(squash 528822e1b) and is in no release yet.docs/cli/generate.md: a new section, "Column types in a dbt project". The dialect spellings the 0.7.7 schema admits (int64,float64,datetime2,uniqueidentifierand others) map to a native type on Redshift, DuckDB and Databricks, with what 0.44.0 wrote beside it. A spelling with no native type on the adapter is refused byfluid validateand byfluid generate transformation: the page has the lists per adapter, which builds and exposes are judged, and the message.docs/cli/validate.md,docs/advanced/error-codes.md: the two new finding codes,ERR_CONTRACT_DBT_COLUMN_TYPEandERR_CONTRACT_DBT_RUNTIME_PLATFORM. The counts on those pages (45 and 38) are not changed here: they already trail the catalog and are recounted from the pinned CLI at the next release.docs/providers/databricks.md: a section, "Setting where a dbt build runs", for what a build with noexecution.runtime.platformdid through 0.44.0 and what is refused now; the Unity Catalog tablefluid applycreates for the dialect spellings (mapped, not refused); the profile lookup wording.docs/cli/import.md:fluid import dbtwriteslocalon the build it makes for a Databricks project, and says so in its report; what the build needs to run as a Databricks job (platformandrepository).docs/upgrading.md, "Not in a release yet": four bullets (the refusal of an unmapped type, the mapped spellings, the Unity Catalog column, the runtime platform).Validation
mainhas the same tree as that head (the same tree hash, an empty diff), so nothing read changed in the merge. An earlier read of the same branch found five imprecisions, now fixed (for example: DuckDB keepsvarcharforrowandsuperas before, the table lacked theintervalrow, and the order in which aprofiles.ymlis looked for). A last read of the newfluid import dbtsentences found one more: setting the field todatabricksis not enough for an imported build, which also needs arepository.fluid generate transformationon a Databricks hybrid-reference build withint64,datetime2,float64anduniqueidentifiercolumns writesbigint,timestamp_ntz,doubleandstring; 0.44.0 wrotestringfor all four.fluid validateon a DuckDB build with abitand ageometrycolumn refuses both with the quoted message andERR_CONTRACT_DBT_COLUMN_TYPE.fluid generate transformationon a Databricks build with the same columns exits 1 and writes nothing.execution.runtime.platform(enginedbtanddbt-databricks) is refused by both commands with the quoted message. The refusal goes away withlocalordatabricks, and does not apply tooutputs: []or to outputs on another platform.fluid import dbton a manifest with adapterdatabrickswriteslocaland prints the quoted note under Notes (with--split-byeach line starts with the product id in brackets); on a manifest for any other adapter (tried: Snowflake, BigQuery, Redshift, DuckDB, Postgres, Spark) the build has noexecutionblock. The imported build withplatform: databricksand norepositoryis refused (names no repository), and valid once arepositoryis set.scripts/check_cli_docs.pyin every mode (againstdata-product-forge==0.44.0, the release sweep against forge-cli'sCHANGELOG.mdat 6d0e7ba70),scripts/check_providers.py,scripts/gen_contract_reference.py --check, the offline link check on the route mirror,npm run docs:buildandnode scripts/check-dist-links.mjs: pass.Not run: a live Databricks workspace,
fluid applyagainst one, and a real dbt run.