Build & develop

Engines and connection profiles (Preview)

KratosForge is growing from "this PC or Fabric" into one place to develop for Microsoft Fabric, Azure Databricks and Snowflake, alone or together. This page describes the two foundations that work is built on, what they can do today, and what is planned. With Preview features shown, a notebook picks its engine from the engine picker; connection profiles have no screen of their own yet, and a Databricks connection comes from a saved profile or the Databricks CLI.

  • An engine is what runs a notebook cell: Python on this PC, DuckDB, SQLite and Polars, and, as Preview engines tested against fakes, a Databricks SQL warehouse, Databricks Connect on a cluster and a Fabric Spark session.
  • A connection profile says which platforms a piece of work uses, where, how it signs in, which engine it runs on by default, and whether it may start remote compute.

What each engine can do#

Every engine states each capability at one of five levels, with the evidence behind it. KratosForge refuses to register an engine that claims more than it has an adapter and tests for.

Level Meaning
Native The engine does it itself, as the platform does.
Partial It does it, with gaps the note names.
Simulated A stand-in runs on this PC. PySpark here is DuckDB's PySpark API, not Spark.
Translated The code is rewritten for another engine first. Spark SQL and Snowflake SQL on DuckDB are translated by sqlglot.
Unsupported Not available. Anything not listed is unsupported.

Which Spark SQL built-in functions a notebook can use on this PC is in Spark functions on this PC: every Spark 3.5 built-in, each checked against Apache Spark's own value for its documented example, and kept current by CI. The PySpark DataFrame API (DataFrame, Column, GroupedData, reader and writer methods) is listed the same way in PySpark DataFrame API on this PC, and the options spark.read.json, csv and parquet honour or refuse in Spark read options on this PC.

Compatibility matrix#

"Tested" means automated tests in this repository, on Linux and Windows CI, with no cloud. Nothing here has run against a Fabric tenant or a Databricks workspace yet: the Databricks SQL warehouse, Databricks Connect and Fabric Spark engines are tested against fakes of the platforms' documented APIs and clients, and stay Preview until they have.

Engine Where it runs Languages SQL Cancel Plan Variables Whole result Billed Status
Python (this PC) This PC, its own process Python native; PySpark simulated (use a SQL engine) Partial (DuckDB queries stop, also on a notebook's own duckdb.connect; Polars, and queries on connections opened in threads the cell starts, finish first) No Native No Nothing Tested
DuckDB (this PC) This PC SQL DuckDB native; Spark SQL, Databricks SQL and Snowflake SQL translated Native Native No Native Nothing Tested
SQLite (this PC) This PC SQL SQLite native Native Native No Native Nothing Tested
Polars SQL (this PC) This PC SQL Polars SQL partial No (the query finishes) Native No No Nothing Tested
Apache Spark (this PC) This PC none yet none yet Nothing Planned
Fabric Spark (remote) A Spark session on your Fabric capacity PySpark, Python, Spark SQL, Scala native Spark SQL native Native No (df.explain) No Partial (SQL cells) Fabric capacity Preview, tested against fakes
Databricks Connect (remote) Your Databricks cluster (Python on this PC) PySpark native; Python partial (use spark.sql) Partial (Spark jobs) No (df.explain) No No DBUs Preview, tested against fakes
Databricks SQL warehouse (remote) Your Databricks SQL warehouse SQL Databricks SQL native Native Partial (EXPLAIN on the warehouse) No Partial (up to 25 MB) DBUs Preview, tested against fakes
Snowflake SQL (remote) Your Snowflake warehouse none yet none yet Snowflake credits Planned, Preview
Snowpark (this PC, simulated) This PC, its own process none yet none yet Nothing Planned
Snowpark Connect (remote) Your Snowflake warehouse none yet none yet Snowflake credits Planned, Preview

Engines on this PC bill nothing themselves. Reading or writing OneLake from this PC still uses Fabric capacity, so "runs on this PC" never means "uses no capacity".

Whole result means the engine can hand back every row of a result, not just the preview, so two engines' answers can be compared (below).

A session's database file (an existing DuckDB or SQLite file) is opened read-only. Each session is its own in-memory database or Python process: two notebooks never see each other's tables or variables, and closing a session frees everything it held.

A SQL session never reaches past its own database. DuckDB refuses COPY, EXPORT, ATTACH, INSTALL and LOAD before anything in the cell runs (the same statements the SQL query page refuses), and its connection can't read or write files on this PC, load extensions or reach the network at all. SQLite refuses ATTACH and DETACH, so a cell can't create or open another database file. Polars reads the files a cell names with read_parquet or read_csv, and never writes one.

The Python engine uses the notebook's own session (the same process Stop ends), so it needs Run notebooks in their own process turned on in Settings. With it off every notebook shares one kernel, and a notebook sharing another notebook's session shares its process too; in both cases the engine says what to change instead of running.

T-SQL on this PC#

Warehouse T-SQL runs on this PC's DuckDB engine after translation. What it refuses, by name, is the "Refused, not half-translated" list in Local data: T-SQL; a test runs a query for each item in that list and fails when the list and the code differ (#1666). T-SQL functions on this PC lists every T-SQL function, with common operators and statements, and whether each runs, differs, is refused or fails here, kept current by CI.

Snowflake SQL on this PC (Preview)#

The DuckDB engine runs Snowflake SQL translated, so Snowflake queries can be tried on this PC without a Snowflake account or a running warehouse. No screen can pick Snowflake SQL yet: this is the engine underneath, and the Snowflake screens come with the warehouse work (SF-02). DuckDB is not Snowflake: nothing here has been compared with a Snowflake account, and "it ran" never means "Snowflake gives the same answer".

Every statement in the cell gets a label, and the label is the cell's first output, before the result:

  • Translated: no known difference applies. It matches Snowflake's documented behaviour as far as KratosForge knows.
  • Runs, with a difference: it runs, and the note says what differs and what to do about it.
  • Runs only in Snowflake: streams, tasks, dynamic tables, Snowflake Scripting, time travel, clones, stages and the rest below. The note says why.

A cell runs whole or not at all: if any statement runs only in Snowflake, nothing in the cell runs. A cell that can't be read as Snowflake SQL at all shows only the error, with no label. The same session rules apply as for any DuckDB cell (no files, extensions or network). Plan shows DuckDB's plan for the translated SQL, not Snowflake's.

The rules and differences come from a probe of 29 common Snowflake statements on the pinned sqlglot and DuckDB versions, and from 268 function checks against Snowflake's documented values (below); each is a test. Snowflake functions on this PC lists every Snowflake SQL function, with common operators and statements, and whether each runs, differs, is refused or fails here, kept current by CI.

Rules 2026.11.11.

Id What Applies to
SFX-001 Rewritten LATERAL FLATTEN and TABLE(FLATTEN(...)) become DuckDB's json_each, with Snowflake's columns: KEY is NULL for an array element and INDEX for an object field, PATH is written as Snowflake writes it (b, b[0], c.d), THIS is the value flattened, OUTER gives one row of NULLs for a value with nothing to flatten, and PATH => takes plain names and [n]. A scalar has nothing to flatten (no row, or the OUTER row). A key that isn't a plain name is written in PATH as it is, since Snowflake's docs don't show how it writes one. SEQ, RECURSIVE and MODE aren't rewritten; SFD-005 is retired.
SFX-002 Rewritten TO_VARCHAR and TO_CHAR with a date or time format written in the query become strftime. Elements with no equivalent (quarter, week) aren't rewritten.
SFX-003 Runs only in Snowflake TO_VARCHAR and TO_CHAR with a number format.
SFX-004 Rewritten OBJECT_CONSTRUCT drops a pair whose value is SQL NULL and keeps JSON null, as Snowflake does. OBJECT_CONSTRUCT(*) isn't rewritten.
SFX-005 Rewritten A VALUES list in FROM gets Snowflake's column names COLUMN1, COLUMN2..., unless its alias names the columns.
SFX-006 Rewritten SOUNDEX becomes American Soundex in DuckDB SQL (the first letter and three digits). Text that starts with a non-letter comes back as it is, as in Spark; Snowflake doesn't document that case.
SFX-007 Rewritten RATIO_TO_REPORT(x) OVER (PARTITION BY ...) becomes x divided by the partition's sum, null when x is null or the sum is 0. An ORDER BY in its window is dropped, as it doesn't change the result. x is worked out twice, which matters only when it isn't deterministic (RANDOM(), for example).
SFX-008 Rewritten HAVERSINE becomes the great-circle distance in kilometres on a sphere of radius 6,371 km.
SFX-009 Rewritten TYPEOF gives Snowflake's type names: NULL_VALUE, BOOLEAN, VARCHAR, ARRAY and OBJECT for JSON; INTEGER, DECIMAL or DOUBLE for a JSON number by how PARSE_JSON reads it (an exponent makes it DOUBLE; otherwise INTEGER or DECIMAL while it fits NUMBER); INTEGER, DECIMAL, DOUBLE, VARCHAR, BOOLEAN, DATE, TIME, TIMESTAMP_NTZ, BINARY and ARRAY for other values; SQL NULL for SQL NULL. A whole number is always INTEGER here, where Snowflake notes it may say DECIMAL. Where the name can't be known, SFD-007 applies. The argument is worked out more than once, which matters only when it isn't deterministic.
SFX-010 Rewritten a / b stops with Snowflake's "Division by zero" error when b is 0, where DuckDB gives infinity or NULL. DIV0 and DIV0NULL still give 0. A divisor that isn't a column or a number is worked out twice, which matters only when it isn't deterministic.
SFX-011 Rewritten IS_ and AS_ (INTEGER, DECIMAL, NUMBER, DOUBLE, REAL, BOOLEAN, CHAR, VARCHAR, ARRAY, OBJECT, BINARY, DATE, DATE_VALUE, TIME, TIMESTAMP_NTZ) test and read the type a VARIANT holds, as Snowflake names it: a PARSE_JSON value by its JSON type, a TO_VARIANT value by the type it was made from. AS_ gives NULL for any other type. A JSON integer too big for 64 bits is DOUBLE here.
SFX-012 Rewritten A JSON value cast to text (v:a::string, v['a']::string, TO_VARCHAR(v:a), PARSE_JSON(...)::varchar) gives a string without its JSON quotes, and JSON null gives SQL NULL, as in Snowflake: DuckDB's cast keeps the quotes and writes 'null'. A table's column whose type the statement doesn't show is cast as written.
SFX-013 Rewritten [i] on a value read from PARSE_JSON stays 0-based, and [i] with an integer column on an ARRAY becomes 1-based, as DuckDB needs. Where the type can't be told from the statement (a table's column), [i] is taken for an ARRAY.
SFX-014 Rewritten HLL becomes APPROX_COUNT_DISTINCT, DATASKETCHES_HLL the same estimate as a DOUBLE (its max_log_k is dropped), and APPROX_PERCENTILE returns a DOUBLE, as in Snowflake. HLL(*) and HLL of more than one value aren't rewritten. BITMAP_BUCKET_NUMBER and BITMAP_BIT_POSITION run as arithmetic on 32,768-bit buckets.
SFX-015 Rewritten OCTET_LENGTH counts bytes (a column is taken for text; a BINARY column stops with DuckDB's error). MD5_NUMBER_LOWER64 and MD5_NUMBER_UPPER64 read MD5's last and first 64 bits. WIDTH_BUCKET gives 0 below min_value, num_buckets + 1 at or above max_value, and NULL when any argument is NULL; min_value at or above max_value stops with an error. TRY_BASE64_DECODE_STRING, TRY_BASE64_DECODE_BINARY, TRY_HEX_DECODE_STRING and TRY_HEX_DECODE_BINARY give NULL where the text doesn't decode; an alphabet argument isn't rewritten. SOUNDEX_P123 keeps the second letter's number (Pfister is P123). Arguments are worked out more than once, which matters only when they aren't deterministic.
SFX-016 Rewritten OBJECT_DELETE, OBJECT_PICK, OBJECT_INSERT, OBJECT_AGG, TO_OBJECT and ARRAYS_TO_OBJECT run on DuckDB JSON with Snowflake's NULL rules: a SQL NULL key or value is left out and JSON null is kept; an existing key in OBJECT_INSERT without updateFlag, a repeated key in OBJECT_AGG and arrays of unequal length stop with an error (OBJECT_AGG's text is DuckDB's "Map keys must be unique"). OBJECT_INSERT of a SQL NULL value leaves the object as it is, an existing key too, as the docs don't say otherwise; OBJECT_AGG of no rows is NULL. OBJECT_PICK with one argument takes it for an array only when it is written as one ([...], ARRAY_CONSTRUCT or PARSE_JSON); a column is a key. OBJECT_AGG(DISTINCT ...) isn't rewritten. Objects keep their keys in order, as Snowflake does, and an object constant ({'a': 1}) reads its keys as text. Arguments are worked out more than once, which matters only when they aren't deterministic.
SFX-017 Rewritten TIME(x) is a cast to TIME, as TO_TIME(x) is: the time of a string or a timestamp. CURRENT_TIMESTAMP and a cast to TIMESTAMP_TZ or TIMESTAMP_LTZ go through TIMESTAMP, the local time; a TIMESTAMP_TZ column stops with DuckDB's cast error, since its type isn't known here.
SFX-018 Rewritten CONDITIONAL_TRUE_EVENT and CONDITIONAL_CHANGE_EVENT count events from each partition's first row in ORDER BY order (a NULL is neither true nor a change), and INTERPOLATE_FFILL, INTERPOLATE_BFILL and INTERPOLATE_LINEAR fill a NULL from the rows before and after it. CONDITIONAL_CHANGE_EVENT, and CONDITIONAL_TRUE_EVENT of a LAG or LEAD, are worked out in a subquery over the SELECT's FROM and WHERE, so they are rewritten only in a SELECT from one table or subquery without JOIN, GROUP BY, HAVING or an aggregate. A window frame isn't allowed, as in Snowflake, and INTERPOLATE_LINEAR needs one ORDER BY expression: a number, DATE or timestamp.
SFX-000 Runs only in Snowflake Anything else sqlglot can't write for DuckDB.
SFD-001 Runs, with a difference: Unquoted names keep their case Snowflake stores an unquoted name in upper case (MyCol becomes MYCOL); DuckDB keeps it as typed.
SFD-002 Runs, with a difference: TIMESTAMP_TZ loses its offset DuckDB stores TIMESTAMP_TZ as TIMESTAMPTZ, an instant, so the offset Snowflake keeps with each value is lost.
SFD-003 Runs, with a difference: Division returns DOUBLE DuckDB returns DOUBLE for /, where Snowflake returns NUMBER with its own scale rules.
SFD-004 Runs, with a difference: Local time zone is this PC's TIMESTAMP_LTZ and CURRENT_TIMESTAMP use this PC's time zone here, not Snowflake's TIMEZONE parameter.
SFD-006 Runs, with a difference: Date arithmetic on a DATE returns a TIMESTAMP DATEADD and TIMESTAMPADD by a date unit (day and longer), and DATE_TRUNC, of a value whose type isn't known here keep a DATE as a DATE in Snowflake; here the result is a TIMESTAMP at midnight. The date is the same. Raised when the value may be a DATE (a column's type isn't known here); a value that is plainly a DATE (a cast, TO_DATE, CURRENT_DATE) is cast back to DATE instead, and a TIMESTAMP cast or function raises nothing.
SFD-007 Runs, with a difference: TYPEOF can't always name Snowflake's type TYPEOF gives Snowflake's type names here (SFX-009), with two exceptions. A JSON number with a fraction or an exponent that isn't read from PARSE_JSON of text written in the query (a column, or a path into one such as v:a) comes back as 'DECIMAL or DOUBLE': Snowflake tells them apart by how the number was written (1.912e2 is DOUBLE, 191.2 is DECIMAL) and DuckDB doesn't keep that. A type with no single Snowflake name keeps DuckDB's name (TIMESTAMP WITH TIME ZONE, which is TIMESTAMP_TZ or TIMESTAMP_LTZ in Snowflake; INTERVAL, UUID, STRUCT, MAP). Raised when the value's type isn't known here: a column, a path or a computed value.
SFD-008 Runs, with a difference: A JSON fraction counts as a decimal Snowflake's PARSE_JSON keeps a number written with a fraction (123.12) as DECIMAL and one written with an exponent (1.912e2) as DOUBLE; DuckDB's JSON reads both as DOUBLE. So IS_DECIMAL, AS_DECIMAL and AS_NUMBER take any JSON number with a fraction or exponent as a decimal: for 1.912e2 they give TRUE and a number here, where Snowflake gives FALSE and NULL. A VARIANT made with TO_VARIANT keeps its type and is exact.
SFD-009 Runs, with a difference: [i] on a value whose type isn't known [i] is 0-based in Snowflake. Here [i] on a table's column whose type the statement doesn't show is taken for an ARRAY: a literal index such as [0] is moved to DuckDB's 1-based lists, and an integer column or expression as the index isn't. On a JSON (VARIANT) column [0] then reads the second element, and v['a']::string keeps the JSON quotes ('"Pine"', not 'Pine').
SFD-010 Runs, with a difference: Approximate answers use DuckDB's estimators APPROX_COUNT_DISTINCT, HLL and DATASKETCHES_HLL run as DuckDB's approx_count_distinct, and APPROX_PERCENTILE as approx_quantile. Snowflake uses its own estimators, so an estimate can be a little different: APPROX_PERCENTILE(c1, 0.5) over 0 to 10 is 5.5 in Snowflake and 5.0 here, and DATASKETCHES_HLL gives 2.000000005 there where 2.0 is given here. DuckDB's distinct estimate can be off even for a few values: 11 distinct values can count as 12.
SFD-011 Runs, with a difference: INTERPOLATE_LINEAR gives a DOUBLE Snowflake's INTERPOLATE_LINEAR returns the input's type; here the filled value is a DOUBLE, because the input's type isn't known when the SQL is rewritten. Snowflake's docs don't say how it rounds a filled value for a whole-number column, so no rounding is done here.
SFN-001 Runs only in Snowflake Streams.
SFN-002 Runs only in Snowflake Tasks.
SFN-003 Runs only in Snowflake Dynamic tables (their SELECT can be tried on its own).
SFN-004 Runs only in Snowflake Snowflake Scripting, procedures, user-defined functions and CALL.
SFN-005 Runs only in Snowflake EXECUTE IMMEDIATE.
SFN-006 Runs only in Snowflake Time travel: AT and BEFORE.
SFN-007 Runs only in Snowflake UNDROP and zero-copy CLONE.
SFN-008 Runs only in Snowflake Stages: @stage references, COPY INTO, PUT, GET, LIST, REMOVE.
SFN-009 Runs only in Snowflake USE, SHOW and DESCRIBE.
SFN-010 Runs only in Snowflake GRANT, REVOKE, and ALTER of Snowflake settings (policies, tags, suspend and resume).
SFN-011 Runs only in Snowflake Snowflake-only objects: stages, pipes, warehouses, roles, users, shares, integrations, file formats, sequences, policies, tags.
SFN-012 Runs only in Snowflake Cortex AI functions.
SFN-013 Runs only in Snowflake TIMESTAMP_TZ text with an offset after a space; DuckDB reads it as a time zone name.
SFN-014 Runs only in Snowflake Context functions about the Snowflake account, session or client: CURRENT_ACCOUNT, CURRENT_ACCOUNT_NAME, CURRENT_AVAILABLE_ROLES, CURRENT_CLIENT, CURRENT_IP_ADDRESS, CURRENT_ORGANIZATION_NAME, CURRENT_REGION, CURRENT_ROLE_TYPE, CURRENT_SECONDARY_ROLES, CURRENT_SESSION, CURRENT_STATEMENT, CURRENT_TRANSACTION, CURRENT_WAREHOUSE and LAST_QUERY_ID.
SFN-015 Runs only in Snowflake IS_TIMESTAMP_LTZ, IS_TIMESTAMP_TZ, AS_TIMESTAMP_LTZ and AS_TIMESTAMP_TZ: DuckDB keeps one kind of timestamp with a time zone.
SFN-016 Runs only in Snowflake Sketch and bitmap states in Snowflake's own format: HLL_ACCUMULATE, HLL_COMBINE, HLL_ESTIMATE, HLL_EXPORT, HLL_IMPORT, the DATASKETCHES_HLL_ACCUMULATE, _COMBINE and _ESTIMATE functions, APPROX_TOP_K and its _ACCUMULATE, _COMBINE and _ESTIMATE, the APPROX_PERCENTILE_ACCUMULATE, _COMBINE and _ESTIMATE functions, MINHASH, MINHASH_COMBINE, APPROXIMATE_SIMILARITY, APPROXIMATE_JACCARD_INDEX, BITMAP_CONSTRUCT_AGG, BITMAP_COUNT and BITMAP_OR_AGG.
SFN-017 Runs only in Snowflake SEARCH and SEARCH_IP (Snowflake's search analyzers), COLLATE (Snowflake collation specifications), HASH_AGG (Snowflake's own hash), and XML: CHECK_XML, PARSE_XML, XMLGET, TO_XML.
SFN-018 Runs only in Snowflake DECFLOAT, TO_DECFLOAT and TRY_TO_DECFLOAT: DuckDB has no decimal floating-point type.
SFN-019 Runs only in Snowflake MATCH_RECOGNIZE: DuckDB has no row pattern matching.
SFN-020 Runs only in Snowflake INSERT OVERWRITE: DuckDB has none, and a DELETE then INSERT wouldn't be one statement.
SFN-099 Runs only in Snowflake Any other Snowflake command sqlglot can't read as a statement.

Snowflake functions checked value by value#

Each check runs a Snowflake function through the same rules and DuckDB and compares the answer with the value Snowflake's SQL reference documents for it. A function that answers differently is always labelled as a difference when it runs, never as translated.

Of 268 checks on commonly used Snowflake functions, against the values Snowflake's SQL reference documents (no Snowflake account was used), these don't answer the same way on this PC.

Function Group On this PC What to know
IS_DECIMAL (vartab) Semi-structured Different result SFD-008: 1.912e2 from PARSE_JSON counts as a decimal here, so row 6 is TRUE too.
TYPEOF (stored value with an exponent) Semi-structured Different result A JSON number with a fraction or exponent read from a column or a stored value is 'DECIMAL or DOUBLE' here: DuckDB doesn't keep how it was written (SFD-007). TYPEOF of PARSE_JSON, or of a path into PARSE_JSON of text in the query, is exact.
DATASKETCHES_HLL (docs example) Aggregate Different result SFD-010: DuckDB's estimate is 4.0, where Snowflake's sketch gives 4.00000003.
APPROX_PERCENTILE (docs example, 0.1) Aggregate Different result SFD-010: DuckDB's approx_quantile gives 1.0.
APPROX_PERCENTILE (docs example, 0.5) Aggregate Different result SFD-010: DuckDB's approx_quantile gives 5.0.
APPROX_PERCENTILE (docs example, 0.999) Aggregate Different result SFD-010: DuckDB's approx_quantile gives 10.0, the largest value; Snowflake's estimate goes past it.

These 262 checks answer as Snowflake documents: IFF, NVL, NVL2 (NULL), NVL2 (value), IFNULL, NULLIF, ZEROIFNULL, NULLIFZERO, DIV0, DIV0NULL, DECODE, DECODE (NULL matches NULL), EQUAL_NULL, COALESCE, GREATEST, GREATEST (any NULL), LEAST (any NULL), CONCAT (any NULL), || (NULL), CONCAT_WS (any NULL), SPLIT_PART, SPLIT_PART (negative part), SPLIT_PART (part 0), SPLIT, STRTOK, REGEXP_SUBSTR, REGEXP_COUNT, REGEXP_REPLACE (every match), REGEXP_LIKE (whole string), RLIKE (whole string), LEFT, RIGHT, LENGTH, LEN, UPPER, INITCAP, TRIM, LTRIM (characters), LPAD, REPLACE, REVERSE, REPEAT, SPACE, INSERT, CONTAINS, STARTSWITH, ENDSWITH, POSITION, CHARINDEX, SUBSTR, TRANSLATE, ASCII, CHR, EDITDISTANCE, SOUNDEX, SOUNDEX (same code for similar names), SOUNDEX (adjacent same codes), SOUNDEX (first letter's code), SOUNDEX (H between same codes), SOUNDEX (padded with zeros), TIME, TIME (fraction), TIMESTAMPADD (years), TIMESTAMPADD (hours on a date), TIMESTAMPADD (month end), TIMESTAMPADD (hours on a time), SOUNDEX_P123 (docs example), SOUNDEX_P123 (same first two codes), OCTET_LENGTH, OCTET_LENGTH (two-byte letter), OCTET_LENGTH (binary), TRY_BASE64_DECODE_STRING, TRY_BASE64_DECODE_STRING (garbage), TRY_BASE64_DECODE_BINARY, TRY_HEX_DECODE_STRING, TRY_HEX_DECODE_STRING (garbage), TRY_HEX_DECODE_BINARY, MD5_NUMBER_LOWER64, MD5_NUMBER_UPPER64, WIDTH_BUCKET (docs example), WIDTH_BUCKET (below min), WIDTH_BUCKET (at max), WIDTH_BUCKET (NULL), MD5, SHA2 (256 by default), ABS, CEIL, FLOOR, ROUND (half away from zero), ROUND (negative half), TRUNC, MOD (negative dividend), % (modulo), SQUARE, SQRT, POWER, SIGN, BITAND, / (by zero), / (by a zero column), TO_NUMBER (scale 0), TRY_TO_NUMBER, TRY_CAST, TO_VARCHAR, TO_BOOLEAN, TO_DATE, TO_DATE (format), TO_TIME, DATE_FROM_PARTS, DATE_TRUNC (DATE), DATEADD (DATE, month end), ADD_MONTHS (month end), LAST_DAY, DATEDIFF (day), DATEDIFF (month boundary), TIMESTAMPDIFF (hour), TIMEADD, TIME_SLICE, DAYOFWEEK (Sunday is 0), YEAR, HOUR, DATE_PART, MONTHNAME, DAYNAME, PARSE_JSON path, PARSE_JSON path (cast to a string), PARSE_JSON path (a number cast to a string), TO_VARCHAR (a JSON string), PARSE_JSON path (brackets cast to a string), TO_VARCHAR (a JSON null), PARSE_JSON path ([1] on a stored array), ARRAY_CONSTRUCT ([i] with an index column), ARRAY_SIZE, ARRAY_CONTAINS, ARRAY_TO_STRING, ARRAY_SLICE, ARRAY_CAT, OBJECT_KEYS, OBJECT_CONSTRUCT (constant), OBJECT_DELETE, OBJECT_DELETE (nested path), OBJECT_PICK, OBJECT_PICK (array of keys), OBJECT_INSERT (docs example), OBJECT_INSERT (update), OBJECT_INSERT (existing key), OBJECT_AGG (docs example), TO_OBJECT, TO_OBJECT (JSON null), ARRAYS_TO_OBJECT, ARRAYS_TO_OBJECT (NULL key), ARRAYS_TO_OBJECT (NULL value), ARRAY_EXCEPT, ARRAY_EXCEPT (copies), ARRAY_EXCEPT (NULLs), ARRAY_EXCEPT (NULL argument), ARRAY_INTERSECTION, ARRAY_INTERSECTION (NULLs), ARRAY_INTERSECTION (objects in another order), FILTER, FILTER (objects), TRANSFORM, TRANSFORM (objects), MAP_CAT, MAP_CAT (the second map wins), IS_NULL_VALUE, IS_NULL_VALUE (vartab), IS_BOOLEAN (vartab), IS_INTEGER (vartab), IS_DOUBLE (vartab), IS_REAL (vartab), IS_VARCHAR (vartab), IS_CHAR (vartab), IS_ARRAY (vartab), IS_OBJECT (vartab), IS_DECIMAL, IS_DECIMAL (a DOUBLE), IS_DECIMAL (an integer), IS_INTEGER (a DECIMAL), IS_INTEGER (a DOUBLE), IS_DOUBLE (a BOOLEAN), IS_DOUBLE (a DECIMAL), IS_REAL, IS_DATE, IS_DATE_VALUE, IS_TIME, IS_TIMESTAMP_NTZ, IS_BINARY, AS_REAL (vartab), AS_DOUBLE, AS_ARRAY, AS_BOOLEAN, AS_CHAR, AS_VARCHAR, AS_VARCHAR (not a string), AS_DECIMAL, AS_NUMBER, AS_DECIMAL (a DOUBLE), AS_INTEGER, AS_INTEGER (a DECIMAL), AS_OBJECT, AS_OBJECT (an array), AS_INTEGER (of an AS_OBJECT path), IS_INTEGER (of AS_INTEGER), AS_DATE, AS_TIME, AS_TIMESTAMP_NTZ, AS_BINARY, TYPEOF, TYPEOF (JSON null), TYPEOF (SQL NULL), TYPEOF (BOOLEAN), TYPEOF (INTEGER), TYPEOF (DECIMAL), TYPEOF (DOUBLE), TYPEOF (VARCHAR), TYPEOF (ARRAY), TYPEOF (OBJECT), TYPEOF (VARCHAR cast to VARIANT), TYPEOF (TIMESTAMP cast to VARIANT), TYPEOF (path to an exponent), TYPEOF (path to a fraction), LISTAGG, ARRAY_AGG, COUNT_IF, MEDIAN, BOOLOR_AGG, ANY_VALUE, GROUPING (grouping sets, docs example), GROUPING (rollup, docs example), GROUPING_ID (docs example), APPROX_COUNT_DISTINCT, HLL, HLL (DISTINCT has no effect), BITMAP_BUCKET_NUMBER, BITMAP_BUCKET_NUMBER (last of bucket 1), BITMAP_BUCKET_NUMBER (first of bucket 2), BITMAP_BIT_POSITION, BITMAP_BIT_POSITION (last of bucket 1), BITMAP_BIT_POSITION (first of bucket 2), STDDEV_SAMP, RATIO_TO_REPORT, RATIO_TO_REPORT (docs example), RATIO_TO_REPORT (null value), RATIO_TO_REPORT (sum is 0), RATIO_TO_REPORT (by partition), HAVERSINE, HAVERSINE (docs example), LATERAL FLATTEN (docs example), LATERAL FLATTEN (PATH, docs example), LATERAL FLATTEN (empty array, docs example), LATERAL FLATTEN (OUTER, docs example), LATERAL FLATTEN (nested, docs example), CONDITIONAL_CHANGE_EVENT (docs example), CONDITIONAL_CHANGE_EVENT (of a condition), CONDITIONAL_CHANGE_EVENT (power changes), CONDITIONAL_TRUE_EVENT (docs example), CONDITIONAL_TRUE_EVENT (of a condition), CONDITIONAL_TRUE_EVENT (of LAG), INTERPOLATE_FFILL (docs example), INTERPOLATE_BFILL (docs example), INTERPOLATE_LINEAR (between two values).

Databricks SQL warehouse (Preview)#

SQL cells can run on a Databricks SQL warehouse in your workspace, through Databricks' documented Statement Execution API. A cell may hold several statements; they run in order and the last one's result is shown, with the warehouse's exact row count. Cancel stops the statement on the warehouse. Catalog lists Unity Catalog catalogs, schemas and tables without starting the warehouse. Plan runs EXPLAIN on the warehouse.

  • It bills DBUs. A statement sent to a stopped warehouse starts it, and a running warehouse bills Databricks units until its own auto-stop. KratosForge never stops your warehouse and never sends a cell there without your confirmation or your profile's policy.
  • Sign-in comes from where you already keep it: a Databricks CLI profile (signed in with databricks auth login, or holding a service principal or personal access token), browser sign-in through the Databricks CLI, or a service principal whose secret is an env: or credman: reference. The token stays in memory for the session and is never written anywhere.
  • Cells can change data. Once the session is open, a cell's CREATE, INSERT, MERGE or DROP runs on the warehouse with no further confirm, as in a Databricks notebook. The confirm is for starting the session, not for each statement.
  • Try it on this PC first. The DuckDB engine runs Databricks SQL translated by sqlglot, so you can write and test a warehouse query against local tables without starting the warehouse. Unity Catalog three-part names need that catalog and schema in the local session, and Delta-only commands don't run there.
  • Busy or briefly unavailable: checking on a statement, and cancelling one, is tried up to four times through throttling (HTTP 429), gateway errors (502, 503, 504) and a dropped connection, waiting as Databricks' Retry-After says (at most 30 seconds in all). A statement is sent again only after a 429, because the warehouse turned it away unread; after any other failure it is never resent, so it can't run twice. An error after the last try says how many times it was tried.
  • If the connection stays down mid-cell: the statement is cancelled on the warehouse, so it doesn't keep the warehouse busy with no one watching. If the cancel can't get through either, the error says the statement may still be running; stop it in Databricks' query history. The two-hour limit and a Cancel pressed while the statement is being sent report the same way: "stopped" only when the warehouse accepted the cancel.
  • If a send may have reached the warehouse: a statement whose submit got a server error (5xx), a dropped connection or a reply that can't be read is never sent again, since it may have started. The error says so: check Databricks' query history before you run the cell again. A refusal (4xx), or a connection that never opened (name lookup, refused, connect timeout), means nothing ran, and the error says nothing was sent.
  • Answers the engine doesn't trust: a result sent as download links instead of inline rows, a result chunk that holds fewer rows than it says or starts at the wrong row, a whole result shorter than the warehouse's own row count, or a reply that isn't a JSON object is an error, never a short table. A statement cancelled in Databricks (not from here) or closed by the warehouse says so and asks you to run the cell again.
  • Limits: a statement still running after two hours is cancelled. One still waiting to start (PENDING, while the warehouse starts or queues it) at that point is cancelled too, and the error says it never started. Results come back inline, so the warehouse refuses one over 25 MB (add a LIMIT), and only the first result chunk is previewed. Billed DBUs are in Databricks' system billing tables, per warehouse and hour, so the engine reports measured seconds only.
  • Whole results, to compare engines. When a comparison asks for the whole result, the cell's last statement runs with a row limit one above the rows asked for, and every result chunk is read in order. Values are typed from the warehouse's schema: numbers, decimals, booleans, strings, dates and timestamps (read as UTC, kept without a zone, as the Fabric Spark engine keeps them). Arrays, maps, structs, binary and intervals come back as text, and the output names those columns. More rows than asked for is an error, never a cut table. The rows are copied onto this PC, so a comparison asks for them only after its own confirm.

Databricks SQL functions on this PC#

The DuckDB engine's own translation (sqlglot, then DuckDB) runs each check against the value Databricks gives: its documented example, or one worked by hand where the reference gives none. A test runs them again, so the table changes when an upgrade fixes or breaks one. Databricks SQL functions on this PC lists every built-in Databricks SQL shares with Spark 3.5 the same way, each run through a Databricks SQL cell's translation and kept current by CI.

Translated Spark SQL and Databricks SQL run with the session time zone set to UTC, the default for Spark sessions in Fabric and Databricks, so a timestamp reads the same here as there whatever this PC's time zone. DuckDB SQL cells keep the session's own zone.

Casts to TINYINT, SMALLINT, INT or BIGINT answer as Spark does, in Spark SQL, Databricks SQL, F.expr and Column.cast: a fraction is truncated (CAST(3.7 AS INT) is 3, not 4), and text is read as Spark reads it (CAST('1.9' AS INT) is 1 with ANSI off, NULL for try_cast, and stops in Databricks SQL's ANSI CAST).

from_json runs here when its schema is written out as text, such as 'a INT, b STRING' or 'ARRAY<STRUCT<n: BIGINT>>', with fields of INT, BIGINT, SMALLINT, TINYINT, DOUBLE, FLOAT, DECIMAL, STRING, BOOLEAN, DATE, TIMESTAMP, ARRAY and STRUCT. JSON keys match field names case-sensitively, as in Databricks. Values are read as Databricks' JSON reader reads them: DOUBLE also takes "NaN" and "Infinity", DECIMAL also takes a number written as text ("1,000.5"), and TIMESTAMP also takes a whole number of seconds since 1970. A value that doesn't fit its field (text in an INT field, for example) gives NULL for that field, as Databricks does with partial results on; text that isn't JSON gives a struct of NULLs. An object that repeats one of the schema's keys stops with a message, since Databricks keeps the last value. A number read into a STRING field is written as DuckDB writes it, which can differ from Databricks for very large or very small numbers (1e20). A schema with MAP or TIMESTAMP_NTZ fields, a schema that isn't written-out text, from_json options, and a JSON array read with a struct schema are refused with a message, so nothing runs with a different answer. str_to_map splits on regular expressions, as Databricks does. schema_of_json of JSON written out as text is worked out when the query is translated, as Databricks infers it with default options, so from_json(x, schema_of_json('...')) runs too; options, a whole number too big for BIGINT, and a repeated key are refused.

Of 209 checks on commonly used Databricks SQL built-in functions, these are the functions the DuckDB engine doesn't answer the same way.

Function Group On this PC What to know
get_json_object (every element) JSON Not translated Refused here: a [*] path would give a list, not the JSON text '[1,2]'. Read the values with from_json, or use a path to one element.
json_tuple JSON Doesn't run json_tuple runs in the select list here, not in FROM. Write SELECT json_tuple(...) or use get_json_object for each field.

These 207 checks answer the same as on Databricks: concat, concat_ws, upper, lower, length, substring, substr, trim, ltrim, rtrim, lpad, rpad, replace, instr, locate, position, split, split_part, regexp_replace, regexp_extract, regexp_like, initcap, reverse, repeat, left, right, startswith, endswith, contains, md5, sha2, base64, ascii, chr, translate, format_number, levenshtein, soundex, abs, round, round (negative half), bround, ceil, floor, mod (%), pmod, div, power, sqrt, ln, log10, log, greatest, least, sign, try_divide, hex, bin, conv, factorial, date_add, date_sub, datediff, add_months, last_day, year, month, dayofmonth, dayofweek, weekofyear, quarter, date_format, to_date, to_timestamp, date_trunc, trunc, make_date, next_day, months_between, array, size, array_contains, element_at, array_distinct, array_sort, sort_array, array_join, array_max, array_min, flatten, slice, sequence, array_position, arrays_overlap, array_union, array_intersect, array_except, transform, filter, aggregate, exists, explode, map_keys, map_values, coalesce, nvl, ifnull, nullif, nvl2, if, iff, decode, get_json_object, to_json, json_array_length, count_if, collect_list, collect_set, array_agg, max_by, min_by, bool_and, bool_or, median, percentile, percentile_approx, approx_count_distinct, stddev, variance, any_value, sort_array (descending), arrays_overlap (only NULL could match), array_union (NULLs), pmod (negative divisor), pmod (both negative), dayofweek (Sunday), array_intersect (order and NULL), array_except (order and NULL), array_distinct (order and NULL), bround (one argument, odd), bround (negative places), conv (negative to a signed base), conv (negative to an unsigned base), conv (stops at an invalid digit), conv (base out of range), soundex (H and W keep a run), soundex (not a letter first), format_number (no decimals), format_number (half-even), exists (NULL and no match), transform (with index), filter (with index), filter (drop NULLs), exists (looking for NULL), forall, forall (all match), forall (NULL and a miss), forall (NULL and no miss), aggregate (finish), aggregate (struct accumulator), reduce, reduce (finish), array_sort (comparator), array_sort (descending comparator), zip_with, zip_with (strings), zip_with (unequal lengths), map_filter, transform_keys, transform_keys (key and value), transform_values, transform_values (key and value), map_from_arrays, map_concat, map_from_entries, map_entries, str_to_map, str_to_map (no value), element_at (map), element_at (map, missing key), element_at (negative index), try_element_at, map_contains_key, map_contains_key (missing key), get_json_object (nested), get_json_object (array index), get_json_object (bracket name), get_json_object (no match), from_json, from_json (name case), to_json (array of structs), to_json (map), json_tuple (in the select list), schema_of_json, lag, lag (default), lag (offset 2), lead, lead (default), nth_value, nth_value (too few rows), ntile, percent_rank, cume_dist, rank, dense_rank, row_number.

array_sort with a comparator compares every pair of elements, so it sorts up to 3,000 elements per array on this PC; a longer array stops with a message (use array_sort or sort_array without a comparator, or run it on Databricks).

Databricks workspace discovery (Preview)#

To find a SQL warehouse or a cluster without copying IDs from the Databricks UI, ask the workspace what you can use: Settings > Connections > Check workspace in the app (below), or the command:

fabric-desktop databricks-discover --profile dev
fabric-desktop databricks-discover --host https://adb-1234567890123456.7.azuredatabricks.net --json

It lists who you're signed in as, the SQL warehouses (state, size, auto-stop), the all-purpose clusters (job clusters are left out), the Unity Catalog metastore and its catalogs, and then a warehouse and a cluster to try first.

  • Nothing starts. Every request is a read of a documented Databricks REST API, so discovery never starts a warehouse or a cluster and bills no DBUs. It needs no confirm for that reason.
  • Databricks Connect, before you try it. Each cluster says whether Databricks Connect can use it and, if not, why: its runtime line (16.4 or 17.3 in this version) or an access mode without Unity Catalog (Connect needs Dedicated or Standard). Installing the client is a separate step.
  • No auto-stop is called out. A warehouse or cluster that never stops on its own bills DBUs until someone stops it, so it's flagged and never suggested.
  • Each part stands alone. A part you can't read (a 403 on clusters, say) says why, and the rest still come back. The command exits 0 when every part was read, 1 when one couldn't be, and 2 when it couldn't sign in. Use --no-catalogs to leave the catalogs out.

It's tested against fakes of those APIs, not yet against a live workspace.

Connection profiles in Settings (Preview)#

Settings > Connections lists the connection profiles on this PC and adds a connection to one.

  • Sign in with the CLI first. A Databricks connection uses a profile of the Databricks CLI (databricks auth login --host <workspace URL> --profile dev); a Snowflake one uses a connection of the Snowflake CLI (snow connection add). You pick it by name: the workspace address or account and the sign-in are read from the CLI's own file, so the app never types or keeps a token. A CLI profile that keeps a personal access token in plain text says so.
  • Check workspace runs discovery for the CLI profile you picked and lists the warehouses, the clusters Databricks Connect can use, and the catalogs, with the suggested ones already picked. Nothing starts and nothing bills DBUs.
  • Save connection adds it to a profile, or to a new one, with the warehouse, cluster, catalog and schema you picked. The engine picker lists it at once. A profile with connections to two platforms becomes a hybrid profile. A value that looks like a token is refused and nothing is written.
  • Remove takes one connection out of a profile, after you confirm. The CLI's own profile or connection stays as it is.

Checking a Snowflake account from Settings, and switching the profile in use, come later.

Databricks jobs and Lakeflow in Monitor (Preview)#

Monitor > Databricks lists the job runs and Lakeflow pipeline updates in the workspace of a Databricks connection: yours by default, or everyone's, for the last 24 hours or 7 days, newest first.

  • Nothing starts. Runs are read with the Jobs and Pipelines REST APIs, GET requests only, so reading them starts no job, pipeline, warehouse or cluster and bills no DBUs.
  • Why a run failed. Pick a job run to see each task, how long it took, its notebook, and the failed task's error. Open in Databricks opens the run's own page, only when it is on that workspace.
  • Each list stands alone. If the pipelines can't be read (a 403, say), the job runs still show, with a line that says why.
  • DBUs per run come from billing, which Optimize > Cost reads after asking first: reading billing runs a query on a SQL warehouse.

Repair run and opening a failed task's notebook on this PC come later: repair starts compute, so it will confirm first and say which cluster.

Databricks workspace sync (Preview)#

Workspaces > Databricks keeps a folder of notebooks on this PC in step with a folder in a Databricks workspace. Pair a folder names the two folders and the Databricks connection to use.

  • Compare reads only. It lists each notebook (.py, .ipynb, .sql) directly in the folder, with its state on this PC and in Databricks and what pushing would do. Reading the workspace starts nothing.
  • Never over someone else's change. Each file remembers when Databricks last changed it at the last sync. If it has changed there since, it's a conflict: it can't be pushed until you sort it out. A file that isn't in Databricks is written so that one appearing meanwhile isn't replaced.
  • Deletes ask twice. A notebook deleted on this PC stays in Databricks unless you tick it, and pushing a delete asks again. If the notebook changed in Databricks since the last sync, it is a conflict and isn't deleted. Folders are never deleted.
  • Notebooks go across as Databricks source (# COMMAND ----------). What a .ipynb loses on the way (outputs, the parameter cell, Fabric-only calls such as notebookutils) is listed before you push.
  • Pull brings a .py or .sql file changed in Databricks to this PC, when it hasn't changed here.
  • Git folders are read only here: a path under /Repos, a Git folder or a folder inside one changes through Git, so it can't be paired or pushed to.
  • Pushes and pulls are written as you, and each one is recorded in the audit log.

Comparing a conflict side by side and picking a side come later.

Databricks Asset Bundles in Source control (Preview)#

Source control > Bundles works with a Databricks Asset Bundle (databricks.yml) in the open repository, or in a folder of it you pick. It runs your own Databricks CLI as one of its profiles, so the CLI signs in and KratosForge never handles a token. Install the Databricks CLI and sign in with databricks auth login first.

  • Validate and Plan change nothing in Databricks. Validate lists problems and warnings in the files. Plan lists what a deploy to the target would create, update, delete or rebuild.
  • Commands on this PC are shown first. A bundle can make the CLI run commands on your PC: experimental.scripts hooks, artifact builds (a wheel builds even with no build line) and Python resource code. Before the CLI runs, databricks.yml and every file it includes are read and any such command is listed. Nothing runs until you allow exactly those commands, and a changed list asks again. An include that matches no file or points out of the folder is refused.
  • Deploy deploys the plan you saw. It plans again first. If the plan changed (the files or the workspace changed meanwhile), it shows the new plan instead of deploying.
  • Deletes and production ask for the target's name. A plan that deletes or rebuilds a job or pipeline, or a target that is production (by its mode or its name), needs the target's name typed. A rebuilt job or pipeline loses its run history.
  • Deploying runs nothing. No job or pipeline starts; their next scheduled run bills as usual.
  • Deploys are recorded in the audit log.

Databricks DBUs in Optimize > Cost (Preview)#

Optimize > Cost and savings has a Databricks DBUs section: the DBUs billed in the last 24 hours, 7 days or 30 days, by job, Lakeflow pipeline, SQL warehouse and cluster, read from Databricks' system.billing.usage table.

  • It asks first. Billing is a system table, so reading it runs one query on a SQL warehouse you pick. If the warehouse is stopped it starts, and it bills DBUs while it runs. Read Databricks billing names the warehouse and says whether it's running and when it stops, and runs nothing until you confirm. The connection profile's execution policy applies, as for any remote cell: a profile set to never refuses, and one that allows Databricks SQL by policy runs without the confirm.
  • The query is fixed. Only the number of days goes in. It needs SELECT on system.billing.usage; without it, the section says Databricks refused.
  • DBUs stay DBUs. They are never added to Fabric capacity units or Snowflake credits, and never turned into money.
  • Kept on this PC. The last read is kept per workspace, so the section shows it again without reading.

Databricks Connect (Preview)#

PySpark cells can run their spark work on a Databricks cluster through Databricks Connect, while the rest of the cell's Python runs on this PC.

  • Its own environment. Databricks Connect brings its own PySpark, so it never loads inside KratosForge. You install it once per Databricks Runtime line (for example 16.4); KratosForge downloads it with pip into a folder of its own and runs each session as a separate process there. Opening a session never installs anything.
  • Pinned packages only. Each supported runtime line (16.4 and 17.3 in this version) has a lock file in the app naming every package, its exact version and its hash. pip installs only those files, as prebuilt wheels, and refuses any whose hash differs, so a changed or look-alike package never installs. Other runtime lines say they aren't supported in this version. Your organization can point the download at its own package mirror (dbconnect_index_url) or turn installs off (allow_dbconnect_install) in the policy file.
  • Checked first. Before anything starts, KratosForge reads the cluster's runtime and checks it against the installed client and this PC's Python. KratosForge's Python is 3.12, so clusters on Databricks Runtime 16 and later work. 13.3 to 15.4 need Python 3.10 or 3.11, and the check says so.
  • It bills DBUs. Connecting to a terminated cluster starts it, and a running cluster bills Databricks units until it auto-terminates. A session opens only after your confirmation for that cluster, or your profile's policy. Closing the session ends the process on this PC, not the cluster.
  • Sign-in goes to the process as the Databricks SDK's own settings: your CLI profile's name, or the workspace address with the CLI's sign-in, or a service principal whose secret is read from its reference. Databricks variables already set on this PC are left out. A sign-in through the CLI needs the Databricks CLI on PATH; without it the session doesn't start. A service principal's secret is removed from the process once the session has signed in, but cells still run with that principal's rights in the workspace, so give it only the access the notebook needs.
  • Limits: Spark Connect has no RDDs or SparkContext. Results show the first rows only, because counting them all would run another Spark job. Cancel stops the session's Spark jobs, not plain Python. Serverless compute isn't offered yet.

Fabric Spark (Preview)#

Cells can run in an interactive Spark session in your Fabric workspace, on a lakehouse you pick, through Fabric's Livy API with your own Fabric sign-in. PySpark, Python, Spark SQL and Scala cells run in the same session, as in a Fabric notebook. A cell is sent again only when Fabric turns it away as busy (HTTP 429) before accepting it, so it can't run twice; checking on a cell, cancelling it and closing the session are tried up to four times through throttling, gateway errors and a dropped connection, within 30 seconds of waiting. Cancel cancels the running statement in Fabric, and closing the session ends it.

  • It uses Fabric capacity for as long as the session is open, including while it sits idle, until you close it or Fabric ends it. A session opens only after your confirmation for that lakehouse, or your profile's policy, and never when your organization has turned off Fabric runs from KratosForge.
  • Limits: output arrives when the cell finishes; notebookutils and %magics are Fabric notebook features a Livy session doesn't fully have; capacity use is in the Fabric Capacity Metrics app, not per cell. A cell still running after two hours is cancelled. If the connection stays down mid-cell, the cell is cancelled in Fabric. If that cancel, the two-hour limit's cancel, or a Cancel pressed while the cell is being sent can't get through, the error says the cell may still be running, so stop it from the Monitor hub or close the session.

Switching engines#

A notebook has one engine at a time. Switching to another engine starts a new session: cells and outputs stay, but variables and tables in the old session are not carried over. KratosForge asks first, with two choices: close the old session, or keep it in the background so switching back finds it (local engines only; a remote session is never left running).

If a cell can't run on the chosen engine, KratosForge says why and stops. It never moves the cell to another engine on its own, and above all never to a remote one.

Comparing two engines' answers (engine only, no screen yet)#

engines/compare.py runs one query on two open sessions, for example DuckDB and SQLite on this PC, and compares the two results with the same rules, levels and limits as Prove (verify.py): key columns, numeric tolerances, and only counts and a checksum above 5,000,000 rows. Each side can have its own SQL, so a query and its translation can be checked against each other.

  • Only engines with Whole result take part. Any other engine is refused before anything runs, with the reason.
  • The whole result is never cut short. More rows than asked for (1,000,000 by default), or more than 256 MB, makes that side an error, and nothing is compared.
  • If the first engine fails, the second doesn't run.
  • A remote engine's result would be copied onto this PC. That never happens on its own: the caller asks you first, and approving the session itself doesn't count. Fabric Spark is the only remote engine that returns whole results so far, for SQL cells: Spark sends the rows as JSON with its schema, and this PC types them back. Timestamps read as the session's time zone shows them. Nested types and binary come back as text, and the cell says which columns.
  • Both results stay in memory and are gone when the comparison is returned. Nothing is written.

Remote compute needs your say-so#

A remote engine can start compute that is billed. It opens only when:

  • you confirm it for that engine and that workspace, cluster or warehouse (the confirmation lasts an hour), or
  • the connection profile's execution policy allows that engine without asking.

A profile can also forbid remote compute altogether.

Engine picker (Preview)#

With Preview features shown (Settings), Engine replaces Runs on in the notebook ribbon, beside Run all, which stays the main button. Nothing else in the ribbon moves. With Preview hidden, Runs on works as before.

  • Badge. Beside the engine, This PC or Remote says where cells run; a remote engine also says how it bills ("bills DBUs" for Databricks, "uses Fabric capacity" for Fabric).
  • Connection. For a Databricks engine, Connection picks the saved profile connection or Databricks CLI profile to use. Only the host and warehouse or cluster id reach the screen; tokens stay with the sidecar. The connection's default catalog and schema show beside it, as a label.
  • Engine menu. Python (this PC) first, then the other engines on this PC (DuckDB, SQLite, Polars), then Remote: Run in Fabric (the whole notebook as a Fabric job, as before), Fabric Spark, Databricks SQL warehouse and Databricks Connect, each marked Preview. Engines that are planned but not built are listed under More as information only; they can't be chosen. Hover ⓘ for what each engine runs and how it differs from the platform.
  • Remote confirm. Choosing a remote engine opens a confirm that names the engine, the warehouse, cluster or lakehouse, the connection, how it bills, and what the 60-minute grant allows. It runs a risk check first: the policy, whether the warehouse or cluster is running and its auto-stop, cells that write data, and cells the engine can't run. The check is advice only and never blocks; when it can't read something it says "Couldn't run" and why. A profile whose policy already allows the engine skips the confirm. Nothing remote starts without one or the other, and KratosForge never falls back to remote compute on its own.
  • Switching. Leaving an engine with a session lists what is lost (its variables) and kept (cells and outputs). Switch and close session is red; Keep both keeps a local session in the background. Going back to Python from another engine also closes that engine's session.
  • Cells. The status line under a cell names the engine that ran it. A cell the engine can't run is flagged before anything runs, with the reason and Run this cell on Python, which runs that one cell in the Python kernel on this PC; the notebook stays on its engine.

The choice lasts while the app is open; it isn't saved in the notebook file yet. Engine sessions close when the app quits or the notebook switches back to Python, not when its tab closes. Remote engines have run against fakes only, not a live Fabric tenant or Databricks workspace.

Usage figures#

Every run records what it used, labeled as one of: measured on this PC, billed by the platform (with where the bill came from), or estimated (with its assumptions). Fabric capacity unit seconds, Databricks DBUs and Snowflake credits are different units, priced differently: KratosForge never adds them together or converts one into the other. Comparing money needs your pricing, in Optimize.

Connection profiles#

A profile needs only a name and a kind: This PC only, Microsoft Fabric, Azure Databricks, Snowflake, or Two or more platforms (hybrid). Everything else has a sensible default:

Part Default What it's for
Connections The app's own Fabric sign-in One per platform: Fabric workspace; Databricks workspace address, catalog and schema; Snowflake account, user, role, warehouse, database and schema
Default engine DuckDB on this PC What a new notebook runs on
Environments Dev, Test, Staging, Prod, all empty Which workspace, catalog or schema each environment uses, per connection
Deploy targets none Where each environment deploys, per connection (a Fabric workspace, a Databricks bundle target)
Execution policy Ask before remote compute Ask, allow listed engines, or never; an optional daily remote-minutes budget
Data access Ask before copying between platforms Data never moves between Fabric and Databricks on its own
Validation Not checked The last check of the profile

The app's current behaviour is the built-in profile This PC and Fabric.

Sign-in: references, never secrets#

A profile never holds a password, token or key. It holds a reference to one:

Platform Ways to sign in
Fabric The app's own sign-in (default); a service principal, managed identity or workload identity for automation
Databricks A profile from the Databricks CLI's config file; browser sign-in (OAuth); a service principal (OAuth machine-to-machine)
Snowflake (planned) Browser sign-in through Snowflake's built-in local application (default); a key pair (the private key file's path, and its passphrase as a reference); a programmatic access token (as a reference); a connection from the Snowflake CLI

A service principal's secret is named as env:NAME (an environment variable) or credman:TARGET (Windows Credential Manager). KratosForge refuses to save or import a profile with anything that looks like a token, key or password in it, and it never repeats the value in its error.

In a hybrid profile, each platform keeps its own sign-in, workspaces and deploy targets, and no two platforms can share a secret.

A Snowflake connection names the account by its identifier (myorg-myaccount, or a legacy locator such as xy12345.east-us-2.azure), never by a URL; the address is always https://<account>.snowflakecomputing.com. On Windows a private key file must be a full path on a drive (C:\keys\snowflake.p8): a network share path is refused, so reading the key never reaches another computer. Nothing signs in to Snowflake yet; the sign-in methods are recorded so a profile made now keeps working when they arrive.

Profiles that use only Fabric and Databricks are still saved in the format older versions of KratosForge read, so a profile shared with someone who hasn't updated still opens for them. A profile with Snowflake, or any other mix of platforms, needs this version or later.

Databricks CLI profiles#

If you already use the Databricks CLI, KratosForge reads the profile names and workspace addresses in ~/.databrickscfg (or DATABRICKS_CONFIG_FILE) so you can pick one. It never reads out tokens or client secrets. A profile that keeps a personal access token in that file gets a warning, because databricks auth login keeps tokens out of plain text. Only Azure Databricks is supported for now.

Snowflake CLI connections#

If you already use the Snowflake CLI, KratosForge reads its connection names, accounts, users, roles, warehouses, databases and schemas so you can pick one. It looks where the CLI does: SNOWFLAKE_HOME if it's set (if that folder doesn't exist it finds nothing, as the CLI does), else ~/.snowflake, else %USERPROFILE%\AppData\Local\snowflake, and connections.toml there wins over the connections in config.toml. It never reads out passwords, tokens, private keys or passphrases. A connection that keeps one in the file gets a warning, and a file it can't read says only that, never which line was wrong. A connection that signs in with browser single sign-on is listed but can't be used yet.

Sharing a profile#

Export writes a profile without anything tied to your PC: secret references, the Databricks CLI profile name, the Snowflake CLI connection name, the private key file's path and the last check are removed. Whoever imports it adds their own sign-in; the imported profile says what's missing.

Switching profiles#

Switching closes every open engine session (they may hold data read with the old sign-in). Cells and outputs stay. A notebook with unsaved changes must be saved or discarded first.

Adding an engine#

Every engine with an adapter must pass the shared contract checks in sidecar/tests/engine_conformance.py, run by tests/test_engine_conformance.py. The checks read the engine's own descriptor and hold the adapter to it: claimed capabilities work, unsupported ones raise Unsupported with a reason, a cell in a language or dialect the engine marks unsupported never comes back as run, a failing cell is an error output that never repeats a secret, a closed session refuses cells, two sessions share nothing, a whole result comes back only from an engine that claims it and only when asked, and a remote engine contacts nothing before it has an authorization. Remote engines run against the same fakes as their own tests, so the checks never reach a workspace.

A new adapter adds a harness there: how to open a session (against a fake for a remote engine), a cell that runs, a cell that fails, and cells it refuses. The run fails until every engine with an adapter has one.

Not yet#

  • Settings > Connections adds CLI-based connections only: service principals and the other sign-in methods are set in the profile file for now, and the profile in use isn't switched from Settings yet.
  • Snowflake: the three engines above are listed so the plan is visible, but none runs a cell yet. Snowflake SQL and Snowpark Connect will run on your Snowflake warehouse and use credits, so they will ask first, as every remote engine does. Snowpark on this PC will be simulated by Snowflake's local testing framework, which can't run session.sql and implements only some functions.
  • Databricks SQL warehouses sign in through the Databricks CLI or a service principal and run SQL through the Statement Execution API, tested against fakes only. Workspace discovery and Databricks Connect stay Preview until tested against a live workspace.
  • Databricks Connect will run in its own Python environment: it ships its own PySpark, which would otherwise change what spark means in every local notebook. Its version is checked before anything starts (Databricks Runtime 16.4 or later, or serverless, for this app's Python 3.12).

Need a hand?

Find a fix in troubleshooting, or share a reproducible issue with the community.

Get support ↗Improve this guide on GitHub ↗
Development documentation snapshot: cbf1c74e441de6cb982e7b463591fc6f1a3d2c6b · View source on GitHub ↗

Search documentation

Start typing to search all 115 guides.

Search runs in your browser esc to close