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

entity_types restrictions not working for structured properties #10491

Open
siladitya2 opened this issue May 13, 2024 · 0 comments
Open

entity_types restrictions not working for structured properties #10491

siladitya2 opened this issue May 13, 2024 · 0 comments
Assignees
Labels
bug Bug report

Comments

@siladitya2
Copy link
Contributor

siladitya2 commented May 13, 2024

Describe the bug
When we create a structure property with entity_types defined only dataset, we still can assign the structure property to other entity types(dataflow, datajob etc.) as well.
Version: v0.13.1
To Reproduce
Steps to reproduce the behavior:

  1. Create a structure property with below-mentioned definition through CLI or Open API.
- id: my.test.SP01
  urn: urn:li:structuredProperty:my.test.SP01
  qualified_name: my.test.SP01
  display_name: SP01
  type: STRING
  cardinality: MULTIPLE
  entity_types:
    - dataset
  1. Try to assign the above created Structure property to a Dataflow Entity.

POST http://localhost:8080/openapi/v2/entity/dataset/urn:li:dataFlow:(airflow,test_instance1.demo-1%2F7,DEV)/structuredProperties
Request Body:

{
  "properties": [
    {
      "propertyUrn": " urn: urn:li:structuredProperty:my.test.SP01",
      "values": [
        {"string": "bar"}
      ]
    }
  1. No error is thrown, and the structuredProperty is assigned to the Dataflow entity.

Expected behavior
The structured property should not be assigned to the Dataflow entity.
As the entity_types are defined as only allow datasets.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):
Datahub Version: v0.13.1

Additional context
Add any other context about the problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug report
Projects
None yet
Development

No branches or pull requests

4 participants