You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by Madhan Neethiraj <ma...@apache.org> on 2020/12/15 06:07:53 UTC

Review Request 73086: ATLAS-4077: updated Python client to fix errors while running sample - #2

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73086/
-----------------------------------------------------------

Review request for atlas, Ashutosh Mestry, Deep Singh, Jayendra Parab, Nikhil Bonte, Pinal Shah, Radhika Kundam, Sarath Subramanian, Sharmadha Sainath, Sidharth Mishra, and Umesh Padashetty.


Bugs: ATLAS-4077
    https://issues.apache.org/jira/browse/ATLAS-4077


Repository: atlas


Description
-------

fixed errors in Python client handling of typedef while running sample code.


Diffs
-----

  atlas-examples/sample-app/src/main/python/request_json/typedef_create.json 5ebfc83bd 
  atlas-examples/sample-app/src/main/python/sample_client.py 732b28084 
  intg/src/main/python/apache_atlas/model/typedef.py 30e275008 


Diff: https://reviews.apache.org/r/73086/diff/1/


Testing
-------

- verified that the sample code runs successfully in a clean Atlas environment.

```
$ python sample_client.py 
Enter Atlas URL: http://localhost:21000
Enter username: admin
Enter password: 
2020-12-14 21:57:49,322 sample-example INFO     
---------- Creating Sample Types -----------
2020-12-14 21:57:52,068 sample-example INFO     
---------- Creating Sample Entities -----------
2020-12-14 21:57:52,458 entity-example INFO     Created database entity: guid=3362e3ad-7fa3-44d2-b0f4-7556301b8dbd, attr.name=employee_db
2020-12-14 21:57:52,459 entity-example INFO     setting: table(-1).db={"relationshipStatus": null, "relationshipGuid": null, "relationshipAttributes": null, "typeName": null, "entityStatus": null, "displayText": null, "relationshipType": null, "guid": "3362e3ad-7fa3-44d2-b0f4-7556301b8dbd", "uniqueAttributes": null}
2020-12-14 21:57:52,756 entity-example INFO     Created US table entity: guid=fb4bb630-ddaf-47e0-ae94-35c0a07349f3, attr.name=employees_us
2020-12-14 21:57:52,756 entity-example INFO     setting: table(-1).db={"relationshipStatus": null, "relationshipGuid": null, "relationshipAttributes": null, "typeName": null, "entityStatus": null, "displayText": null, "relationshipType": null, "guid": "3362e3ad-7fa3-44d2-b0f4-7556301b8dbd", "uniqueAttributes": null}
2020-12-14 21:57:52,983 entity-example INFO     Created Canada table entity: guid=64117caf-aba1-45c8-916a-ca05a22812a1, attr.name=employees_canada
2020-12-14 21:57:53,155 entity-example INFO     Created process entity: guid=0b631b24-ab7a-48da-a5c9-3c102be35af9, attr.name=employee_process
2020-12-14 21:57:53,224 entity-example INFO     Entity(guid=fb4bb630-ddaf-47e0-ae94-35c0a07349f3): typeName=sample_table, attr.name=employees_us
2020-12-14 21:57:53,225 sample-example INFO     
---------- Lineage example -----------
2020-12-14 21:57:53,263 lineage-example INFO     employee_process (sample_process) -> employees_canada (sample_table)
2020-12-14 21:57:53,264 lineage-example INFO     employees_us (sample_table) -> employee_process (sample_process)
2020-12-14 21:57:53,264 sample-example INFO     
---------- Search example -----------
2020-12-14 21:57:56,836 discovery-example INFO     query: 'from Process' retrieved: 1 rows
2020-12-14 21:57:59,680 discovery-example INFO     query: 'from DataSet' retrieved: 9 rows
2020-12-14 21:58:00,189 discovery-example INFO     Quick-search result: {"searchParameters": {"includeSubTypes": false, "excludeDeletedEntities": false, "includeSubClassifications": true, "typeName": "sample_table", "limit": 2, "offset": 0, "includeClassificationAttributes": false, "query": "sample_table"}, "approximateCount": 2, "classification": null, "referredEntities": null, "entities": [{"status": "ACTIVE", "isIncomplete": false, "guid": "fb4bb630-ddaf-47e0-ae94-35c0a07349f3", "classifications": null, "labels": [], "typeName": "sample_table", "meaningNames": [], "displayText": "employees_us", "meanings": null, "attributes": {"qualifiedName": "employee_db.employees_us@cl1", "description": "US employees", "createTime": 0, "name": "employees_us"}, "classificationNames": []}, {"status": "ACTIVE", "isIncomplete": false, "guid": "64117caf-aba1-45c8-916a-ca05a22812a1", "classifications": null, "labels": [], "typeName": "sample_table", "meaningNames": [], "displayText": "employees_canad
 a", "meanings": null, "attributes": {"qualifiedName": "employee_db.employees_canada@cl1", "description": "Canada employees", "createTime": 0, "name": "employees_canada"}, "classificationNames": []}], "fullTextResult": null, "queryText": "sample_table", "attributes": null, "type": null, "queryType": "BASIC"}
2020-12-14 21:58:00,275 discovery-example INFO     Basic-search result: {"searchParameters": {"classification": "sample_metric", "includeSubTypes": true, "excludeDeletedEntities": false, "includeSubClassifications": true, "typeName": "sample_table", "limit": 2, "offset": 0, "includeClassificationAttributes": false, "query": "employees_us"}, "approximateCount": 0, "classification": null, "referredEntities": null, "entities": null, "fullTextResult": null, "queryText": "employees_us", "attributes": null, "type": null, "queryType": "BASIC"}
2020-12-14 21:58:00,276 sample-example INFO     
---------- Glossary Example -----------
2020-12-14 21:58:00,493 glossary-example INFO     Created glossary with name: EmployeeCountry and guid: 0c4b6b1d-2058-4caf-9696-a621e3573224
2020-12-14 21:58:00,879 glossary-example INFO     Created Term for Employee Salary: EmpSalaryTerm with guid: b740f8ce-1e1e-4698-b241-a1a714e2ba17
2020-12-14 21:58:00,917 glossary-example INFO     Glossary extended info: 0c4b6b1d-2058-4caf-9696-a621e3573224; name: EmployeeCountry; language: None
2020-12-14 21:58:01,215 glossary-example INFO     Created Category for Employee Category: EmpSalaryCategory with guid: 336cdbe2-e0f6-4a64-ac31-f5c65f852c56
2020-12-14 21:58:01,430 glossary-example INFO     Delete is complete for Glossary!
2020-12-14 21:58:01,434 sample-example INFO     
---------- Deleting Entities -----------
2020-12-14 21:58:02,619 entity-example INFO     Purged entities
```


Thanks,

Madhan Neethiraj


Re: Review Request 73086: ATLAS-4077: updated Python client to fix errors while running sample - #2

Posted by Sarath Subramanian <sa...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73086/#review222343
-----------------------------------------------------------


Ship it!




Ship It!

- Sarath Subramanian


On Dec. 14, 2020, 10:07 p.m., Madhan Neethiraj wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73086/
> -----------------------------------------------------------
> 
> (Updated Dec. 14, 2020, 10:07 p.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Deep Singh, Jayendra Parab, Nikhil Bonte, Pinal Shah, Radhika Kundam, Sarath Subramanian, Sharmadha Sainath, Sidharth Mishra, and Umesh Padashetty.
> 
> 
> Bugs: ATLAS-4077
>     https://issues.apache.org/jira/browse/ATLAS-4077
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> fixed errors in Python client handling of typedef while running sample code.
> 
> 
> Diffs
> -----
> 
>   atlas-examples/sample-app/src/main/python/request_json/typedef_create.json 5ebfc83bd 
>   atlas-examples/sample-app/src/main/python/sample_client.py 732b28084 
>   intg/src/main/python/apache_atlas/model/typedef.py 30e275008 
> 
> 
> Diff: https://reviews.apache.org/r/73086/diff/1/
> 
> 
> Testing
> -------
> 
> - verified that the sample code runs successfully in a clean Atlas environment.
> 
> ```
> $ python sample_client.py 
> Enter Atlas URL: http://localhost:21000
> Enter username: admin
> Enter password: 
> 2020-12-14 21:57:49,322 sample-example INFO     
> ---------- Creating Sample Types -----------
> 2020-12-14 21:57:52,068 sample-example INFO     
> ---------- Creating Sample Entities -----------
> 2020-12-14 21:57:52,458 entity-example INFO     Created database entity: guid=3362e3ad-7fa3-44d2-b0f4-7556301b8dbd, attr.name=employee_db
> 2020-12-14 21:57:52,459 entity-example INFO     setting: table(-1).db={"relationshipStatus": null, "relationshipGuid": null, "relationshipAttributes": null, "typeName": null, "entityStatus": null, "displayText": null, "relationshipType": null, "guid": "3362e3ad-7fa3-44d2-b0f4-7556301b8dbd", "uniqueAttributes": null}
> 2020-12-14 21:57:52,756 entity-example INFO     Created US table entity: guid=fb4bb630-ddaf-47e0-ae94-35c0a07349f3, attr.name=employees_us
> 2020-12-14 21:57:52,756 entity-example INFO     setting: table(-1).db={"relationshipStatus": null, "relationshipGuid": null, "relationshipAttributes": null, "typeName": null, "entityStatus": null, "displayText": null, "relationshipType": null, "guid": "3362e3ad-7fa3-44d2-b0f4-7556301b8dbd", "uniqueAttributes": null}
> 2020-12-14 21:57:52,983 entity-example INFO     Created Canada table entity: guid=64117caf-aba1-45c8-916a-ca05a22812a1, attr.name=employees_canada
> 2020-12-14 21:57:53,155 entity-example INFO     Created process entity: guid=0b631b24-ab7a-48da-a5c9-3c102be35af9, attr.name=employee_process
> 2020-12-14 21:57:53,224 entity-example INFO     Entity(guid=fb4bb630-ddaf-47e0-ae94-35c0a07349f3): typeName=sample_table, attr.name=employees_us
> 2020-12-14 21:57:53,225 sample-example INFO     
> ---------- Lineage example -----------
> 2020-12-14 21:57:53,263 lineage-example INFO     employee_process (sample_process) -> employees_canada (sample_table)
> 2020-12-14 21:57:53,264 lineage-example INFO     employees_us (sample_table) -> employee_process (sample_process)
> 2020-12-14 21:57:53,264 sample-example INFO     
> ---------- Search example -----------
> 2020-12-14 21:57:56,836 discovery-example INFO     query: 'from Process' retrieved: 1 rows
> 2020-12-14 21:57:59,680 discovery-example INFO     query: 'from DataSet' retrieved: 9 rows
> 2020-12-14 21:58:00,189 discovery-example INFO     Quick-search result: {"searchParameters": {"includeSubTypes": false, "excludeDeletedEntities": false, "includeSubClassifications": true, "typeName": "sample_table", "limit": 2, "offset": 0, "includeClassificationAttributes": false, "query": "sample_table"}, "approximateCount": 2, "classification": null, "referredEntities": null, "entities": [{"status": "ACTIVE", "isIncomplete": false, "guid": "fb4bb630-ddaf-47e0-ae94-35c0a07349f3", "classifications": null, "labels": [], "typeName": "sample_table", "meaningNames": [], "displayText": "employees_us", "meanings": null, "attributes": {"qualifiedName": "employee_db.employees_us@cl1", "description": "US employees", "createTime": 0, "name": "employees_us"}, "classificationNames": []}, {"status": "ACTIVE", "isIncomplete": false, "guid": "64117caf-aba1-45c8-916a-ca05a22812a1", "classifications": null, "labels": [], "typeName": "sample_table", "meaningNames": [], "displayText": "employees_can
 ada", "meanings": null, "attributes": {"qualifiedName": "employee_db.employees_canada@cl1", "description": "Canada employees", "createTime": 0, "name": "employees_canada"}, "classificationNames": []}], "fullTextResult": null, "queryText": "sample_table", "attributes": null, "type": null, "queryType": "BASIC"}
> 2020-12-14 21:58:00,275 discovery-example INFO     Basic-search result: {"searchParameters": {"classification": "sample_metric", "includeSubTypes": true, "excludeDeletedEntities": false, "includeSubClassifications": true, "typeName": "sample_table", "limit": 2, "offset": 0, "includeClassificationAttributes": false, "query": "employees_us"}, "approximateCount": 0, "classification": null, "referredEntities": null, "entities": null, "fullTextResult": null, "queryText": "employees_us", "attributes": null, "type": null, "queryType": "BASIC"}
> 2020-12-14 21:58:00,276 sample-example INFO     
> ---------- Glossary Example -----------
> 2020-12-14 21:58:00,493 glossary-example INFO     Created glossary with name: EmployeeCountry and guid: 0c4b6b1d-2058-4caf-9696-a621e3573224
> 2020-12-14 21:58:00,879 glossary-example INFO     Created Term for Employee Salary: EmpSalaryTerm with guid: b740f8ce-1e1e-4698-b241-a1a714e2ba17
> 2020-12-14 21:58:00,917 glossary-example INFO     Glossary extended info: 0c4b6b1d-2058-4caf-9696-a621e3573224; name: EmployeeCountry; language: None
> 2020-12-14 21:58:01,215 glossary-example INFO     Created Category for Employee Category: EmpSalaryCategory with guid: 336cdbe2-e0f6-4a64-ac31-f5c65f852c56
> 2020-12-14 21:58:01,430 glossary-example INFO     Delete is complete for Glossary!
> 2020-12-14 21:58:01,434 sample-example INFO     
> ---------- Deleting Entities -----------
> 2020-12-14 21:58:02,619 entity-example INFO     Purged entities
> ```
> 
> 
> Thanks,
> 
> Madhan Neethiraj
> 
>