Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DVX-398: Removed the required kwarg (name) from the DataContract creator() #348

Merged
merged 3 commits into from
Jun 10, 2024

Conversation

Aryamanz29
Copy link
Member

@Aryamanz29 Aryamanz29 commented Jun 10, 2024

  • Updated creator() to use the Atlan CLI approach to construct the DataContract name.

Sample snippet:

from json import dumps
from pyatlan.client.atlan import AtlanClient
from pyatlan.model.assets import DataContract
from pyatlan.model.enums import CertificateStatus

contract_json = {
    "type": table.type_name,
    "status": CertificateStatus.DRAFT,
    "kind": "DataContract",
    "data_source": connection.name,
    "dataset": table.name,
    "description": "Automated testing of the Python SDK.",
}

contract = DataContract.creator(
    asset_qualified_name=table.qualified_name,
    contract_json=dumps(contract_json),
)

response = client.asset.save(contract)

@Aryamanz29 Aryamanz29 self-assigned this Jun 10, 2024
@Aryamanz29 Aryamanz29 added the change Pyatlan change pull request label Jun 10, 2024
@Aryamanz29 Aryamanz29 merged commit 0a9dc10 into main Jun 10, 2024
33 checks passed
@Aryamanz29 Aryamanz29 deleted the DVX-398 branch June 10, 2024 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change Pyatlan change pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant