Skip to content

Conversation

toshifumisuga
Copy link
Contributor

@toshifumisuga toshifumisuga commented Sep 25, 2025

Summary

This PR adds the changelog that was missing in the previous one.
#898

  • Tests pass
  • ruff format
Tests and ruff result
(datacontract-cli)datacontract-cli toshifumi.suga$ pytest tests/test_export_dbt_models.py -v
================================================================================================================= test session starts =================================================================================================================
platform darwin -- Python 3.11.13, pytest-8.4.2, pluggy-1.6.0 -- /Users/toshifumi.suga/Documents/dev/datacontract-cli/.venv/bin/python3
cachedir: .pytest_cache
rootdir: /Users/toshifumi.suga/Documents/dev/datacontract-cli
configfile: pyproject.toml
plugins: xdist-3.8.0, anyio-4.10.0, typeguard-4.4.4
collected 6 items                                                                                                                                                                                                                                     

tests/test_export_dbt_models.py::test_cli PASSED                                                                                                                                                                                                [ 16%]
tests/test_export_dbt_models.py::test_to_dbt_models PASSED                                                                                                                                                                                      [ 33%]
tests/test_export_dbt_models.py::test_to_dbt_models_with_server PASSED                                                                                                                                                                          [ 50%]
tests/test_export_dbt_models.py::test_to_dbt_models_with_no_model_type PASSED                                                                                                                                                                   [ 66%]
tests/test_export_dbt_models.py::test_to_dbt_models_with_model_level_composite_primary_key PASSED                                                                                                                                               [ 83%]
tests/test_export_dbt_models.py::test_to_dbt_models_with_single_column_primary_key PASSED                                                                                                                                                       [100%]

================================================================================================================== 6 passed in 1.79s ==================================================================================================================
(datacontract-cli)datacontract-cli toshifumi.suga$ ruff check tests/test_export_dbt_models.py 
All checks passed!
(datacontract-cli)datacontract-cli toshifumi.suga$ 

  • README.md updated (if relevant)
  •  CHANGELOG.md entry added

@toshifumisuga toshifumisuga changed the title fix changelog docs: Add changelog for composite primary key support in dbt export Sep 25, 2025
@toshifumisuga
Copy link
Contributor Author

The CI is failing with errors that I believe are unrelated to my changes. I'd appreciate it if you could verify.
Let me know if any action is required from me

Comment on lines 208 to +215
models={
"sfdc_loc_tenants_test": Model(
"test_table": Model(
type="table",
primaryKey=["tenant_id", "account_id"], # Model-level composite primary key
primaryKey=["order_id", "user_id"], # Model-level composite primary key
fields={
"tenant_id": Field(type="string", required=True),
"account_id": Field(type="string", required=True),
"name": Field(type="string", required=True)
"order_id": Field(type="string", required=True),
"user_id": Field(type="string", required=True),
"product_id": Field(type="string", required=True)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sample was not using generic table and column names, so I corrected them together.

@toshifumisuga toshifumisuga marked this pull request as ready for review September 25, 2025 06:31
@jochenchrist
Copy link
Contributor

The CI is failing with errors that I believe are unrelated to my changes. I'd appreciate it if you could verify. Let me know if any action is required from me

Yes, correct. Sorry for inconvienience, I will fix main.

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