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




common/src/main/java/org/apache/atlas/repository/Constants.java
Lines 205 (patched)
<https://reviews.apache.org/r/71482/#comment307986>

    Please provide comments which will be useful to get some more context or 
remove the comment. In this case the variable name is more informative than the 
comment.



common/src/main/java/org/apache/atlas/repository/Constants.java
Lines 207 (patched)
<https://reviews.apache.org/r/71482/#comment307985>

    Please consider renaming GlossaryImportSupportedFileFormats to 
GlossaryImportSupportedFileExtensions as you have used extensions at other 
places and comments



dashboardv2/public/js/views/glossary/ImportGlossaryLayoutView.js
Lines 53 (patched)
<https://reviews.apache.org/r/71482/#comment307987>

    This comment is not adding any useful information as the initialize block 
is self explanatory.


- Sidharth Mishra


On March 4, 2020, 10:07 a.m., mayank jain wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71482/
> -----------------------------------------------------------
> 
> (Updated March 4, 2020, 10:07 a.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, Nixon Rodrigues, 
> and Sarath Subramanian.
> 
> 
> Bugs: ATLAS-3423
>     https://issues.apache.org/jira/browse/ATLAS-3423
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> This patch consists implementation for 2 end points first for template 
> download and other for csv file upload with term details also the Unit Test 
> cases for both the end points.
> 
> * The 1st endpoint {glossary/template} return template file this would be 
> type of format of data that shows how the data needs to be populated by user 
> in the file.
> 
> http://localhost:21000/api/atlas/v2/glossary/importHeaderRow
> 
> Template structure:-
> 
> GlossaryName, TermName, ShortDescription, LongDescription, Examples, 
> Abbreviation, Usage, AdditionalAttributes, TranslationTerms, ValidValuesFor, 
> Synonyms, ReplacedBy, ValidValues, ReplacementTerms, SeeAlso, 
> TranslatedTerms, IsA, Antonyms, Classifies, PreferredToTerms, PreferredTerms
> Fruits,Apple5,SD4,LD4,"EXAMPLE","ABBREVIATION","USAGE",,"Footwear:B4","Footwear:B4","Footwear:B4","Footwear:B4","Footwear:B4","Footwear:B4","Footwear:B4","Footwear:B4","Footwear:B4","Footwear:B4","Footwear:B4","Footwear:B4","Footwear:B4"
> 
> 
> * The 2nd endpoint {glossary/importGlossaryData} (file upload) would actually 
> parse the Data into AtlasObjects and further create the AtlasGlossaryTerms 
> inside Glossary.
> 
> curl -v -g POST -u admin:admin -H "Content-Type: multipart/form-data" -H 
> "Cache-Control: no-cache" -F file=@template_6.csv 
> "http://localhost:21000/api/atlas/v2/glossary/import
> 
> 
> Note:-
> 
> While populating the data in the  csv file each record should be maintained 
> in single Line (enter command within the record would result in parsing the 
> second line as a new record).
> 
> The downloaded template needs to be saved as whateverTheFileNameIs.csv 
> explicitly.
> 
> If the file is been succefully uploaded then the AtlasGlossaryTerm would be 
> returned or else List of Errors would returned for user to rectify them 
> further.
> 
> 
> Diffs
> -----
> 
>   common/src/main/java/org/apache/atlas/repository/Constants.java 7c0fd5601 
>   dashboardv2/gruntfile.js fef4e08c3 
>   dashboardv2/package-lock.json 7f25b5752 
>   dashboardv2/package.json e90040edb 
>   dashboardv2/public/css/scss/theme.scss 0589e0920 
>   dashboardv2/public/index.html.tpl a6a999e53 
>   dashboardv2/public/js/main.js 75e16c3aa 
>   dashboardv2/public/js/templates/glossary/GlossaryLayoutView_tmpl.html 
> 1fa1e3540 
>   dashboardv2/public/js/templates/glossary/ImportGlossaryLayoutView_tmpl.html 
> PRE-CREATION 
>   dashboardv2/public/js/utils/UrlLinks.js 6c67e8c37 
>   dashboardv2/public/js/views/glossary/GlossaryLayoutView.js 9b386f326 
>   dashboardv2/public/js/views/glossary/ImportGlossaryLayoutView.js 
> PRE-CREATION 
>   dashboardv3/gruntfile.js f55ff0d5e 
>   dashboardv3/package-lock.json 3918eccaa 
>   dashboardv3/package.json 5dc05104f 
>   dashboardv3/public/css/scss/leftsidebar.scss bbdc5fb26 
>   dashboardv3/public/css/scss/theme.scss 2b0c45d6b 
>   dashboardv3/public/index.html.tpl 2edbb659d 
>   dashboardv3/public/js/main.js 26fd70991 
>   dashboardv3/public/js/templates/glossary/ImportGlossaryLayoutView_tmpl.html 
> PRE-CREATION 
>   
> dashboardv3/public/js/templates/search/tree/GlossaryTreeLayoutView_tmpl.html 
> 83da9c57c 
>   dashboardv3/public/js/utils/UrlLinks.js 2bbe6796f 
>   dashboardv3/public/js/views/glossary/ImportGlossaryLayoutView.js 
> PRE-CREATION 
>   dashboardv3/public/js/views/search/tree/GlossaryTreeLayoutView.js 28c6a9e4a 
>   intg/src/main/java/org/apache/atlas/AtlasConfiguration.java c5bf50dca 
>   intg/src/main/java/org/apache/atlas/AtlasErrorCode.java 04eb4a08e 
>   
> intg/src/main/java/org/apache/atlas/model/glossary/relations/AtlasGlossaryHeader.java
>  660514bc2 
>   pom.xml f76c6a05e 
>   repository/pom.xml 802d587a8 
>   repository/src/main/java/org/apache/atlas/glossary/GlossaryService.java 
> 9229d2d58 
>   repository/src/main/java/org/apache/atlas/glossary/GlossaryTermUtils.java 
> cdc3f073f 
>   repository/src/main/java/org/apache/atlas/glossary/GlossaryUtils.java 
> 9625f9409 
>   repository/src/main/java/org/apache/atlas/util/FileUtils.java PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/glossary/GlossaryServiceTest.java 
> 759dcdf42 
>   repository/src/test/resources/csvFiles/empty.csv PRE-CREATION 
>   repository/src/test/resources/csvFiles/incorrectFile.csv PRE-CREATION 
>   repository/src/test/resources/csvFiles/template_1.csv PRE-CREATION 
>   repository/src/test/resources/excelFiles/template_1.xlsx PRE-CREATION 
>   webapp/src/main/java/org/apache/atlas/web/rest/GlossaryREST.java 151aa6bce 
> 
> 
> Diff: https://reviews.apache.org/r/71482/diff/12/
> 
> 
> Testing
> -------
> 
> Tested both the endpoint with curl call.
> 
> Tested upload term csv with around 100 records from curl.
> 
> 
> Thanks,
> 
> mayank jain
> 
>

Reply via email to