import --format sql: description is missing?
Hello, I'm wondering if I'm doing something wrong since I couldn't find any issue related "missing descriptions" based on sql import.
We are using oracle ddl's where I thought this might be the issue that oracle is not properly supported.
But I checked now ingest from posgres ddl on your page: https://github.com/datacontract/datacontract-cli/blob/main/tests/fixtures/postgres/data/data_constraints.sql#L20
comment on table my_schema.customer_location is 'Table contains records of customer specific Location/address.';
comment on column my_schema.customer_location.change_date is 'Date when record is modified.';
comment on column my_schema.customer_location.changed_by is 'User who modified record.';
and column comments --> description is still "ignored" in the final datacontract:
dataContractSpecification: 1.2.0
id: my-data-contract-id
info:
title: My Data Contract
version: 0.0.1
servers:
postgres:
type: postgres
models:
customer_location:
type: table
fields:
id:
type: decimal
required: true
config:
postgresType: DECIMAL
created_by:
type: string
required: true
maxLength: 30
config:
postgresType: VARCHAR(30)
create_date:
type: timestamp_ntz
required: true
config:
postgresType: TIMESTAMP
changed_by:
type: string
maxLength: 30
config:
postgresType: VARCHAR(30)
change_date:
type: timestamp_ntz
config:
postgresType: TIMESTAMP
name:
type: string
required: true
maxLength: 120
config:
postgresType: VARCHAR(120)
short_name:
type: string
maxLength: 60
config:
postgresType: VARCHAR(60)
display_name:
type: string
required: true
maxLength: 120
config:
postgresType: VARCHAR(120)
code:
type: string
required: true
maxLength: 30
config:
postgresType: VARCHAR(30)
description:
type: string
maxLength: 4000
config:
postgresType: VARCHAR(4000)
language_id:
type: decimal
required: true
config:
postgresType: DECIMAL
status:
type: string
required: true
maxLength: 2
config:
postgresType: VARCHAR(2)
So is this description for import --format "sql" not supported or do I anything wrong here?
This is how I call it:
datacontract import --format sql --source test_descriptions.sql --output ../test_descriptions.datacontract.yaml --schema $SCHEMA_PATH --dialect oracle
I'm using datacontract cli version "0.10.35"
Thanks a lot!
Hi it's related to the PR #790 I'm still waiting for the approval