[2/4] incubator-atlas git commit: updated documentation for import API
updated documentation for import API (cherry picked from commit 1c4e8b7ffa34a9194d2a6d060c1f335a52c6dce0) Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/bc3f0ace Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/bc3f0ace Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/bc3f0ace Branch: refs/heads/0.8-incubating Commit: bc3f0ace09a40fd1c287d8f31281ab20ee1e349f Parents: 82ce3d3 Author: ashutoshmAuthored: Fri Jul 7 11:14:41 2017 -0700 Committer: Madhan Neethiraj Committed: Fri Jul 7 16:54:30 2017 -0700 -- docs/src/site/twiki/Import-API-Options.twiki | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/bc3f0ace/docs/src/site/twiki/Import-API-Options.twiki -- diff --git a/docs/src/site/twiki/Import-API-Options.twiki b/docs/src/site/twiki/Import-API-Options.twiki index 9acfee1..8588784 100644 --- a/docs/src/site/twiki/Import-API-Options.twiki +++ b/docs/src/site/twiki/Import-API-Options.twiki @@ -45,15 +45,7 @@ To use the option, set the contents of _importOptions.json_ to: { "options": { - - "transforms": { -"hive_table": { - "qualifiedName": [ - "lowercase", - "replace:@cl1:@cl2" -] - } -} +"transforms": "{ \"hive_table\": { \"qualifiedName\": [ \"replace:@cl1:@cl2\" ] }, \"hive_db\": { \"qualifiedName\": [ \"replace:@cl1:@cl2\" ] } }" } }
[3/4] incubator-atlas git commit: ATLAS-1897 : UI - Render HTML element based on attribute data-type while assigning Tag to entity.
ATLAS-1897 : UI - Render HTML element based on attribute data-type while assigning Tag to entity. (cherry picked from commit c4fd42b86bfe1f4654460ba621714bcea3336fbb) Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/fdfbfb04 Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/fdfbfb04 Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/fdfbfb04 Branch: refs/heads/0.8-incubating Commit: fdfbfb04b200c04cb49f3249e97de7c71fb3f5d9 Parents: bc3f0ac Author: KalyaniAuthored: Wed Jun 28 17:10:12 2017 +0530 Committer: Madhan Neethiraj Committed: Fri Jul 7 16:55:09 2017 -0700 -- .../public/js/views/tag/addTagModalView.js | 42 ++-- 1 file changed, 38 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/fdfbfb04/dashboardv2/public/js/views/tag/addTagModalView.js -- diff --git a/dashboardv2/public/js/views/tag/addTagModalView.js b/dashboardv2/public/js/views/tag/addTagModalView.js index 7eaf23c..97d80bd 100644 --- a/dashboardv2/public/js/views/tag/addTagModalView.js +++ b/dashboardv2/public/js/views/tag/addTagModalView.js @@ -26,6 +26,7 @@ define(['require', 'utils/UrlLinks', 'utils/Enums', 'utils/Messages', +'daterangepicker' ], function(require, AddTagModalViewTmpl, VTagList, VCommonList, Modal, VEntity, Utils, UrlLinks, Enums, Messages) { 'use strict'; @@ -82,7 +83,12 @@ define(['require', }; tagAttributeNames.each(function(i, item) { var selection = $(item).data("key"); -tagAttributes[selection] = $(item).val() || null; +var datatypeSelection = $(item).data("type"); +if (datatypeSelection === "date") { +tagAttributes[selection] = Date.parse($(item).val()) || null; +} else { +tagAttributes[selection] = $(item).val() || null; +} }); if (that.multiple) { @@ -271,16 +277,44 @@ define(['require', _.each(enumValue, function(key, value) { str += '' + key.value + ''; }) -that.ui.tagAttribute.append('' + name + '' + +that.ui.tagAttribute.append('' + name + '' + ' (' + typeName + ')' + '' + str + ''); } else { -that.ui.tagAttribute.append('' + name + '' + -''); +var textElement = that.getElement(name, typeName); +that.ui.tagAttribute.append('' + name + '' + ' (' + typeName + ')' + textElement); +} +}); +that.$('input[data-type="date"]').each(function() { +if (!$(this).data('daterangepicker')) { +var dateObj = { "singleDatePicker": true, "showDropdowns": true }; +if (that.tagModel) { +var formatDate = Number(this.value); +dateObj["startDate"] = new Date(formatDate); +} +$(this).daterangepicker(dateObj); +} +}); +that.$('select[data-type="boolean"]').each(function() { +var labelName = $(this).data('key'); +if (that.tagModel) { +this.value = that.tagModel.attributes[labelName]; } }); this.showAttributeBox(); } }, +getElement: function(labelName, typeName) { +var value = this.tagModel && this.tagModel.attributes ? (this.tagModel.attributes[labelName] || "") : "", +type = (typeName === "int" || typeName === "long" || typeName === "float" || typeName === "byte" || typeName === "double" || typeName === "short") ? "number" : "text"; +if (typeName === "boolean") { +return ' ' + +'--Select true or false--' + +'true' + +'false'; +} else { +return ''; +} +}, saveTagData: function(options) { var that = this; this.entityModel = new VEntity();
[1/4] incubator-atlas git commit: updated documentation for import API
Repository: incubator-atlas Updated Branches: refs/heads/0.8-incubating 7c348b5ec -> 92f30b0e3 updated documentation for import API Signed-off-by: Madhan Neethiraj(cherry picked from commit 958c48c2c1807e68dd8cceda6857ec065c083a4b) Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/82ce3d3f Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/82ce3d3f Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/82ce3d3f Branch: refs/heads/0.8-incubating Commit: 82ce3d3f2033834c6d616172e83f611d4c8ea620 Parents: 7c348b5 Author: ashutoshm Authored: Fri Jun 30 16:54:12 2017 -0700 Committer: Madhan Neethiraj Committed: Fri Jul 7 16:54:05 2017 -0700 -- docs/src/site/twiki/Export-API.twiki | 2 +- docs/src/site/twiki/Export-HDFS-API.twiki| 2 +- docs/src/site/twiki/Import-API-Options.twiki | 121 ++ docs/src/site/twiki/Import-API.twiki | 17 +-- docs/src/site/twiki/Import-Export-API.twiki | 7 +- 5 files changed, 138 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/82ce3d3f/docs/src/site/twiki/Export-API.twiki -- diff --git a/docs/src/site/twiki/Export-API.twiki b/docs/src/site/twiki/Export-API.twiki index 4027f3d..0df6629 100644 --- a/docs/src/site/twiki/Export-API.twiki +++ b/docs/src/site/twiki/Export-API.twiki @@ -138,7 +138,7 @@ The _metrics_ contains the number of types and entities exported as part of the Below are sample CURL calls that demonstrate Export of _!QuickStart_ database. -curl -X POST -u admin:admin -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{ +curl -X POST -u adminuser:password -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{ "itemsToExport": [ { "typeName": "DB", "uniqueAttributes": { "name": "Sales" } { "typeName": "DB", "uniqueAttributes": { "name": "Reporting" } http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/82ce3d3f/docs/src/site/twiki/Export-HDFS-API.twiki -- diff --git a/docs/src/site/twiki/Export-HDFS-API.twiki b/docs/src/site/twiki/Export-HDFS-API.twiki index 64ba123..6c20060 100644 --- a/docs/src/site/twiki/Export-HDFS-API.twiki +++ b/docs/src/site/twiki/Export-HDFS-API.twiki @@ -66,7 +66,7 @@ To export entities that represent HDFS path, use the Export API using the _match Below are sample CURL calls that performs export operation on the _Sample HDFS Setup_ shown above. -curl -X POST -u admin:admin -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{ +curl -X POST -u adminuser:password -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{ "itemsToExport": [ { "typeName": "hdfs_path", "uniqueAttributes": { "name": "FinanceAll" } } http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/82ce3d3f/docs/src/site/twiki/Import-API-Options.twiki -- diff --git a/docs/src/site/twiki/Import-API-Options.twiki b/docs/src/site/twiki/Import-API-Options.twiki new file mode 100644 index 000..9acfee1 --- /dev/null +++ b/docs/src/site/twiki/Import-API-Options.twiki @@ -0,0 +1,121 @@ +---+ Import API Options + +Import API options are specified as _options_ JSON. Since the API accepts multi-part form data, it is possible to sepecify multipls input streams within the CURL call. + +---+++ Examples Using CURL Calls + +curl -g -X POST -u adminuser:password -H "Content-Type: multipart/form-data" +-H "Cache-Control: no-cache" +-F request=@importOptions.json +-F data=@quickStartDB.zip +"http://localhost:21000/api/atlas/admin/import; + + +To use the defaults, set the contents of _importOptions.json_ to: + +{ + "options": { + } +} + + + +---+++ Options +Following options are supported for Import process: + + * Specify transforms during import operation. + * Resume import by specifying starting entity guid. + * Optionally import type definition. + +--- Transforms + +During the import process, the attribute value of the incoming entity can be changed. + +This is possible by specifying entity type and at attribute to be modified and then the manner in which it needs to be modified. + +Right now these are the transforms that can be applied: + * _lowercase_ Converts the attribute value to lower case. + * _replace_ This performs a string find and replace operation. It takes two parameters, the first is the string to search for and the next one is the string to
incubator-atlas git commit: updated documentation for import API
Repository: incubator-atlas Updated Branches: refs/heads/master 497dcc079 -> 1c4e8b7ff updated documentation for import API Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/1c4e8b7f Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/1c4e8b7f Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/1c4e8b7f Branch: refs/heads/master Commit: 1c4e8b7ffa34a9194d2a6d060c1f335a52c6dce0 Parents: 497dcc0 Author: ashutoshmAuthored: Fri Jul 7 11:14:41 2017 -0700 Committer: Madhan Neethiraj Committed: Fri Jul 7 16:49:39 2017 -0700 -- docs/src/site/twiki/Import-API-Options.twiki | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/1c4e8b7f/docs/src/site/twiki/Import-API-Options.twiki -- diff --git a/docs/src/site/twiki/Import-API-Options.twiki b/docs/src/site/twiki/Import-API-Options.twiki index 9acfee1..8588784 100644 --- a/docs/src/site/twiki/Import-API-Options.twiki +++ b/docs/src/site/twiki/Import-API-Options.twiki @@ -45,15 +45,7 @@ To use the option, set the contents of _importOptions.json_ to: { "options": { - - "transforms": { -"hive_table": { - "qualifiedName": [ - "lowercase", - "replace:@cl1:@cl2" -] - } -} +"transforms": "{ \"hive_table\": { \"qualifiedName\": [ \"replace:@cl1:@cl2\" ] }, \"hive_db\": { \"qualifiedName\": [ \"replace:@cl1:@cl2\" ] } }" } }