Skip to content

Conversation

@dmaresma
Copy link
Contributor

Add view sql statement drive by schema.physicalType [table|view] alway table as default value
use properties.transformSourceObjects as FROM entity lists

  • [x ] Tests pass
  • [x ] ruff format
  • README.md updated (if relevant)
  •  CHANGELOG.md entry added

@dmaresma
Copy link
Contributor Author

Hi I try to adress #1026 for snowflake, turn Multiple primaryKey (a.k.a composite key) as Unique constraint for snowflake

@dmaresma dmaresma changed the title Feat/export format sql view #1031 Feat/export format sql view table primary key constraints added #1031 #1026 Jan 28, 2026
@Auguronomics
Copy link

The fact some existing data contracts in dcs ( datacontract specification format) when instanciate with :

        "sql", server="staging"
    )````
the automatic translation from dcs to odcs prefill the physicalType in Schema Properties, and overload the existing 
`sql_type_converter` function `def convert_to_sql_type(field: Union[SchemaProperty, FieldLike], server_type: str) -> str:
    physical_type = _get_config_value(field, "physicalType")`

@Auguronomics
Copy link

Should I refactor the Test or Implement a better logic here : def _convert_models_to_schema(models: Dict[str, Model], definitions: Dict[str, Field] = None) -> List[SchemaObject]:
"""Convert DCS models dict to ODCS schema list."""
schema = []
for model_name, model in models.items():
schema_obj = SchemaObject(
name=model_name,
physicalType=model.type,
description=model.description,
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants