[
https://issues.apache.org/jira/browse/ATLAS-3597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mandar Ambawane resolved ATLAS-3597.
------------------------------------
Resolution: Fixed
> Incorrect error message when attempting to update Namespacedef
> --------------------------------------------------------------
>
> Key: ATLAS-3597
> URL: https://issues.apache.org/jira/browse/ATLAS-3597
> Project: Atlas
> Issue Type: Bug
> Reporter: Mandar Ambawane
> Assignee: Mandar Ambawane
> Priority: Major
>
> # Create a new namespaceDef:
>
> {code:java}
> curl --location --request POST
> 'http://localhost:21000/api/atlas/v2/types/typedefs' \
> --header 'Content-Type: application/json' \
> --header 'Authorization: Basic YWRtaW46YWRtaW4=' \
> --data-raw '{
> "namespaceDefs": [
> {
> "name": "namespace1",
> "description": "Sample namespace1",
> "serviceType": "NAMESPACES",
> "typeVersion": "1.0",
> "attributeDefs": [
> {
> "name": "namespaceAttr1",
> "typeName": "string",
> "options": {
> "applicableEntityTypes": "[\"hive_db\",
> \"hive_table\"]",
> "maxStrLength": "50"
> },
> "cardinality": "SINGLE",
> "isIndexable": true,
> "isOptional": true,
> "includeInNotification": true,
> "isUnique": false
> },
> {
> "name": "namespaceAttr2",
> "typeName": "int",
> "options": {
> "applicableEntityTypes": "[\"hive_db\",
> \"hive_column\"]"
> },
> "cardinality": "SINGLE",
> "isIndexable": true,
> "isOptional": true,
> "includeInNotification": true,
> "isUnique": false
> }
> ]
> }
> ]
> }'{code}
>
> 2. Update the namespaceDef to remove an entry from applicable entityTypes in
> 'namespaceAttr1':
>
> {code:java}
> curl --location --request PUT
> 'http://localhost:21000/api/atlas/v2/types/typedefs' \
> --header 'Content-Type: application/json' \
> --header 'Authorization: Basic YWRtaW46YWRtaW4=' \
> --data-raw '{
> "namespaceDefs": [
> {
> "name": "namespace1",
> "description": "Sample namespace1",
> "serviceType": "NAMESPACES",
> "typeVersion": "1.0",
> "attributeDefs": [
> {
> "name": "namespaceAttr1",
> "typeName": "string",
> "options": {
> "applicableEntityTypes": "[\"hive_db\"]",
> "maxStrLength": "50"
> },
> "cardinality": "SINGLE",
> "isIndexable": true,
> "isOptional": true,
> "includeInNotification": true,
> "isUnique": false
> },
> {
> "name": "namespaceAttr2",
> "typeName": "int",
> "options": {
> "applicableEntityTypes": "[\"hive_db\",
> \"hive_column\"]"
> },
> "cardinality": "SINGLE",
> "isIndexable": true,
> "isOptional": true,
> "includeInNotification": true,
> "isUnique": false
> }
> ]
> }
> ]
> }'{code}
>
>
> The following error message is thrown:
>
> {code:java}
> { "errorCode": "ATLAS-400-00-095", "errorMessage": "Cannot remove
> applicableEntityTypes in Attribute Def: namespace1, defined in namespace:
> {2}" }{code}
> error message should be: "Updating '*applicableEntityTypes*' in namespace:
> \{namespace_name}, attribute: \{namespace_attribute} is not allowed."
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)