dataform icon indicating copy to clipboard operation
dataform copied to clipboard

`dataform compile --json` truncates JS-returned SQL to first character

Open cjangrist opened this issue 7 months ago • 0 comments

Description: When compiling with dataform compile --json (Dataform CLI v3.0.0), any SQL string returned from a js {…} block is truncated to its first character in the JSON graph.

Reproduction Steps:

  1. definitions/silver/product/numbers.sqlx:
    config { type: "table", schema: "silver_product", name: "numbers" }
    js { return "SELECT 1 AS test_column"; }
    
  2. Run:
    dataform compile --json > graph.json
    
  3. In graph.json, you see:
    "query": "S",
    

Expected Behavior: Full SQL string in query, not just its first character.

Actual Behavior: Only first character appears.

Environment:

  • @dataform/cli v3.0.0
  • Node.js v16.x
  • Linux
  • workflow_settings.yaml: dataformCoreVersion: 3.0.0

Tried cache-clears, renames, console.log(), simplifying config—nothing resolves the truncation.

cjangrist avatar Jun 05 '25 16:06 cjangrist