You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Arrays of objects/structs are not being outputted in the SQL schema automated generation.
Example Contract
dataContractSpecification: 0.9.3id: wormsinfo:
title: Wormsversion: 0.0.1description: List of Worm Teamslinks:
blog: hungovercoders.comservers:
production:
type: databricks # this will default to context running in - see servers in data contract spec if want to be more remote catalog: mainschema: wormsmodels:
worm_team:
description: Worm teams and their memberstype: tablefields:
team_name:
type: stringenum:
- Aliens
- South Park
- Ghostbusters
- The A Teamrequired: trueprimary: trueunique: truedescription: Name of the worms teamexample: "Aliens"pii: falsedomain: Wormsteam_members:
type: arrayitems:
type: objectdescription: Worm team membersfields:
name:
type: stringrequired: truedescription: Name of the wormexample: "Hudson"pii: falsedomain: Wormsage:
type: integerrequired: truedescription: Age of the wormexample: "10"pii: falsedomain: Worms
Current Output
-- Data Contract: worms-- SQL Dialect: databricksCREATE OR REPLACETABLEmain.worms.worm_team (
team_name STRING not nullprimary key COMMENT "Name of the worms team",
team_members ARRAY
) COMMENT "Worm teams and their members";
Desired Output
-- Data Contract: worms-- SQL Dialect: databricksCREATE OR REPLACETABLEmain.worms.worm_team (
team_name STRING not nullprimary key COMMENT "Name of the worms team",
team_members ARRAY <STRUCT<name STRING, age INT>> COMMENT "Worm Team Members"
) COMMENT "Worm teams and their members";
The text was updated successfully, but these errors were encountered:
Thanks for reporting this nicely written issue! I second this. This is also a good starting point for anyone who wants to contribute to the Data Contract CLI tool. @mr-griffles would you, by any chance, would like to have a go to contribute a pull request for this issue?
Arrays of objects/structs are not being outputted in the SQL schema automated generation.
Example Contract
Current Output
Desired Output
The text was updated successfully, but these errors were encountered: