blob: c42495cc081b75f0feba8e19f5d34ab43b78e06f [file] [log] [blame]
{"version":3,"sources":["/home/madhan/Apache/git/atlas/docs/target/src/documents/Import-Export/ImportAPI.md","/home/madhan/Apache/git/atlas/docs/target/theme/styles/styled-colors.js"],"names":["layoutProps","MDXContent","components","props","mdxType","parentName","wrapLines","language","style","theme","isMDXComponent","dark","hljs","color"],"mappings":"klBAWMA,EAAc,GAIL,SAASC,EAAW,GAG/B,IAFFC,EAAU,EAAVA,WACGC,EAAK,iBAER,OAAO,cALS,UAKC,iBAAKH,EAAiBG,EAAK,CAAED,WAAYA,EAAYE,QAAQ,cAE5E,oBACE,GAAM,cAAY,cAEpB,mDACA,wBACE,oBAAIC,WAAW,MAAI,6GACnB,oBAAIA,WAAW,MAAI,oEACnB,oBAAIA,WAAW,MAAI,uDAErB,oBACE,GAAM,8BAA4B,8BAEpC,2BACE,uBAAOA,WAAW,SAChB,oBAAIA,WAAW,SACb,oBAAIA,WAAW,KACb,MAAS,MACR,wBAAQA,WAAW,MAAI,UAC1B,oBAAIA,WAAW,KACb,MAAS,MACR,wBAAQA,WAAW,MAAI,iBAG9B,uBAAOA,WAAW,SAChB,oBAAIA,WAAW,SACb,oBAAIA,WAAW,KACb,MAAS,MACR,oBAAIA,WAAW,MAAI,YACtB,oBAAIA,WAAW,KACb,MAAS,MAAI,iCAGjB,oBAAIA,WAAW,SACb,oBAAIA,WAAW,KACb,MAAS,MACR,oBAAIA,WAAW,MAAI,gBACtB,oBAAIA,WAAW,KACb,MAAS,MAAI,yEAGjB,oBAAIA,WAAW,SACb,oBAAIA,WAAW,KACb,MAAS,MACR,oBAAIA,WAAW,MAAI,QACtB,oBAAIA,WAAW,KACb,MAAS,MACR,oBAAIA,WAAW,MAAI,4BAExB,oBAAIA,WAAW,SACb,oBAAIA,WAAW,KACb,MAAS,MACR,oBAAIA,WAAW,MAAI,WACtB,oBAAIA,WAAW,KACb,MAAS,MACR,oBAAIA,WAAW,MAAI,UAExB,oBAAIA,WAA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oBAAIA,WAAW,MAAI,WAAiB,iHACxD,oBAAIA,WAAW,MAAK,oBAAIA,WAAW,MAAI,sBAA4B,oEACnE,oBAAIA,WAAW,MAAK,oBAAIA,WAAW,MAAI,oBAA0B,iDAAkD,oBAAIA,WAAW,MAAI,WAAiB,YAAa,oBAAIA,WAAW,MAAI,kBAAwB,MAEjN,oBACE,GAAM,6BAA2B,6BAEnC,4DAAyC,oBAAIA,WAAW,KAAG,cAAoB,yBAC/E,cAAC,IAAiB,CAACC,WAAW,EAAMC,SAAS,QAAQC,MAAOC,IAAYL,QAAQ,qBAAmB,0QAOnG,8BAAW,oBAAIC,WAAW,KAAG,WAAiB,4EAC9C,cAAC,IAAiB,CAACC,WAAW,EAAMC,SAAS,QAAQC,MAAOC,IAAYL,QAAQ,qBAAmB,8NAMnG,4DAAyC,oBAAIC,WAAW,KAAG,cAAoB,uDAC/E,cAAC,IAAiB,CAACC,WAAW,EAAMC,SAAS,QAAQC,MAAOC,IAAYL,QAAQ,qBAAmB,kLAInG,uCAAoB,oBAAIC,WAAW,KAAG,qBAA2B,qCAAsC,oBAAIA,WAAW,KAAG,WAAiB,KAC1I,8BAAW,oBAAIA,WAAW,KAAG,qBAA2B,iBAAkB,oBAAIA,WAAW,KAAG,SAAe,kCAC3G,8BAAW,oBAAIA,WAAW,KAAG,WAAiB,2GAA4G,oBAAIA,WAAW,KAAG,WAAiB,OAAQ,oBAAIA,WAAW,KAAG,WAAiB,KACxO,cAAC,IAAiB,CAACC,WAAW,EAAMC,SAAS,OAAOC,MAAOC,IAAYL,QAAQ,qBAAmB,i4BAiCrG,8LAEDH,EAAWS,gBAAiB,G,+DC/R5B,iFAqBAC,IAAKC,KAAKC,MAAQ,UACHF,MAAI","file":"static/js/documents-import-export-import-api.86fa76ae.js","sourcesContent":["\nimport React from 'react'\nimport { mdx } from '@mdx-js/react'\n\n/* @jsxRuntime classic */\n/* @jsx mdx */\nimport themen from 'theme/styles/styled-colors';\nimport * as theme from 'react-syntax-highlighter/dist/esm/styles/hljs';\nimport SyntaxHighlighter from 'react-syntax-highlighter';\n\n\nconst layoutProps = {\n \n};\nconst MDXLayout = \"wrapper\"\nexport default function MDXContent({\n components,\n ...props\n}) {\n return <MDXLayout {...layoutProps} {...props} components={components} mdxType=\"MDXLayout\">\n\n <h1 {...{\n \"id\": \"import-api\"\n }}>{`Import API`}</h1>\n <p>{`The general approach is:`}</p>\n <ul>\n <li parentName=\"ul\">{`Consumer makes a ZIP file available for import operation. See details below for the 2 flavors of the API.`}</li>\n <li parentName=\"ul\">{`The API if successful, will return the results of the operation.`}</li>\n <li parentName=\"ul\">{`Error will be returned on the failure of the call.`}</li>\n </ul>\n <h3 {...{\n \"id\": \"import-zip-file-using-post\"\n }}>{`Import ZIP File Using POST`}</h3>\n <table>\n <thead parentName=\"table\">\n <tr parentName=\"thead\">\n <th parentName=\"tr\" {...{\n \"align\": null\n }}><strong parentName=\"th\">{`Title`}</strong></th>\n <th parentName=\"tr\" {...{\n \"align\": null\n }}><strong parentName=\"th\">{`Import API`}</strong></th>\n </tr>\n </thead>\n <tbody parentName=\"table\">\n <tr parentName=\"tbody\">\n <td parentName=\"tr\" {...{\n \"align\": null\n }}><em parentName=\"td\">{`Example`}</em></td>\n <td parentName=\"tr\" {...{\n \"align\": null\n }}>{`See Examples sections below.`}</td>\n </tr>\n <tr parentName=\"tbody\">\n <td parentName=\"tr\" {...{\n \"align\": null\n }}><em parentName=\"td\">{`Description`}</em></td>\n <td parentName=\"tr\" {...{\n \"align\": null\n }}>{`Provide the contents of the file to be imported in the request body.`}</td>\n </tr>\n <tr parentName=\"tbody\">\n <td parentName=\"tr\" {...{\n \"align\": null\n }}><em parentName=\"td\">{`URL`}</em></td>\n <td parentName=\"tr\" {...{\n \"align\": null\n }}><em parentName=\"td\">{`api/atlas/admin/import`}</em></td>\n </tr>\n <tr parentName=\"tbody\">\n <td parentName=\"tr\" {...{\n \"align\": null\n }}><em parentName=\"td\">{`Method`}</em></td>\n <td parentName=\"tr\" {...{\n \"align\": null\n }}><em parentName=\"td\">{`POST`}</em></td>\n </tr>\n <tr parentName=\"tbody\">\n <td parentName=\"tr\" {...{\n \"align\": null\n }}><em parentName=\"td\">{`URL Parameters`}</em></td>\n <td parentName=\"tr\" {...{\n \"align\": null\n }}><em parentName=\"td\">{`None`}</em></td>\n </tr>\n <tr parentName=\"tbody\">\n <td parentName=\"tr\" {...{\n \"align\": null\n }}><em parentName=\"td\">{`Data Parameters`}</em></td>\n <td parentName=\"tr\" {...{\n \"align\": null\n }}><em parentName=\"td\">{`None`}</em></td>\n </tr>\n <tr parentName=\"tbody\">\n <td parentName=\"tr\" {...{\n \"align\": null\n }}><em parentName=\"td\">{`Success Response`}</em></td>\n <td parentName=\"tr\" {...{\n \"align\": null\n }}><em parentName=\"td\">{`AtlasImporResult`}</em>{` is returned as JSON. See details below.`}</td>\n </tr>\n <tr parentName=\"tbody\">\n <td parentName=\"tr\" {...{\n \"align\": null\n }}><em parentName=\"td\">{`Error Response`}</em></td>\n <td parentName=\"tr\" {...{\n \"align\": null\n }}>{`Errors that are handled within the system will be returned as `}<em parentName=\"td\">{`AtlasBaseException`}</em>{`.`}</td>\n </tr>\n </tbody>\n </table>\n <h3 {...{\n \"id\": \"import-zip-file-available-on-server\"\n }}>{`Import ZIP File Available on Server`}</h3>\n <table>\n <thead parentName=\"table\">\n <tr parentName=\"thead\">\n <th parentName=\"tr\" {...{\n \"align\": null\n }}><strong parentName=\"th\">{`Title`}</strong></th>\n <th parentName=\"tr\" {...{\n \"align\": null\n }}><strong parentName=\"th\">{`Import API`}</strong></th>\n </tr>\n </thead>\n <tbody parentName=\"table\">\n <tr parentName=\"tbody\">\n <td parentName=\"tr\" {...{\n \"align\": null\n }}><em parentName=\"td\">{`Example`}</em></td>\n <td parentName=\"tr\" {...{\n \"align\": null\n }}>{`See Examples sections below.`}</td>\n </tr>\n <tr parentName=\"tbody\">\n <td parentName=\"tr\" {...{\n \"align\": null\n }}><em parentName=\"td\">{`Description`}</em></td>\n <td parentName=\"tr\" {...{\n \"align\": null\n }}>{`Provide the path of the file to be imported.`}</td>\n </tr>\n <tr parentName=\"tbody\">\n <td parentName=\"tr\" {...{\n \"align\": null\n }}><em parentName=\"td\">{`URL`}</em></td>\n <td parentName=\"tr\" {...{\n \"align\": null\n }}><em parentName=\"td\">{`api/atlas/admin/importfile`}</em></td>\n </tr>\n <tr parentName=\"tbody\">\n <td parentName=\"tr\" {...{\n \"align\": null\n }}><em parentName=\"td\">{`Method`}</em></td>\n <td parentName=\"tr\" {...{\n \"align\": null\n }}><em parentName=\"td\">{`POST`}</em></td>\n </tr>\n <tr parentName=\"tbody\">\n <td parentName=\"tr\" {...{\n \"align\": null\n }}><em parentName=\"td\">{`URL Parameters`}</em></td>\n <td parentName=\"tr\" {...{\n \"align\": null\n }}><em parentName=\"td\">{`None`}</em></td>\n </tr>\n <tr parentName=\"tbody\">\n <td parentName=\"tr\" {...{\n \"align\": null\n }}><em parentName=\"td\">{`Data Parameters`}</em></td>\n <td parentName=\"tr\" {...{\n \"align\": null\n }}><em parentName=\"td\">{`None`}</em></td>\n </tr>\n <tr parentName=\"tbody\">\n <td parentName=\"tr\" {...{\n \"align\": null\n }}><em parentName=\"td\">{`Success Response`}</em></td>\n <td parentName=\"tr\" {...{\n \"align\": null\n }}><em parentName=\"td\">{`AtlasImporResult`}</em>{` is returned as JSON. See details below.`}</td>\n </tr>\n <tr parentName=\"tbody\">\n <td parentName=\"tr\" {...{\n \"align\": null\n }}><em parentName=\"td\">{`Error Response`}</em></td>\n <td parentName=\"tr\" {...{\n \"align\": null\n }}>{`Errors that are handled within the system will be returned as `}<em parentName=\"td\">{`AtlasBaseException`}</em>{`.`}</td>\n </tr>\n <tr parentName=\"tbody\">\n <td parentName=\"tr\" {...{\n \"align\": null\n }}><em parentName=\"td\">{`Notes`}</em></td>\n <td parentName=\"tr\" {...{\n \"align\": null\n }}>{`The file to be imported needs to be present on the server at the location specified by the `}<em parentName=\"td\">{`FILENAME`}</em>{` parameter.`}</td>\n </tr>\n </tbody>\n </table>\n <p><strong parentName=\"p\">{`Method Signature for Import`}</strong></p>\n <SyntaxHighlighter wrapLines={true} language=\"shell\" style={theme.dark} mdxType=\"SyntaxHighlighter\">\n {`@POST\n@Path(\"/import\")\n@Produces(\"application/json; charset=UTF-8\")\n@Consumes(\"multipart/form-data\")`}\n </SyntaxHighlighter>\n <p><strong parentName=\"p\">{`Method Signature for Import File`}</strong></p>\n <SyntaxHighlighter wrapLines={true} language=\"shell\" style={theme.dark} mdxType=\"SyntaxHighlighter\">\n {`@POST\n@Path(\"/importfile\")\n@Produces(\"application/json; charset=UTF-8\")\n@Consumes(\"application/json\")`}\n </SyntaxHighlighter>\n <p><strong parentName=\"p\">{`Import Options`}</strong>{`\nPlease see `}<a parentName=\"p\" {...{\n \"href\": \"#/ImportAPIOptions\"\n }}>{`here`}</a>{` for the available options during import process.`}</p>\n <p><strong parentName=\"p\">{`AtlasImportResult Response`}</strong>{`\nThe API will return the results of the import operation in the format defined by the `}<em parentName=\"p\">{`AtlasImportResult`}</em>{`:`}</p>\n <ul>\n <li parentName=\"ul\"><em parentName=\"li\">{`AtlasImportParameters`}</em>{`: This contains a collection of name-value pair of the options that are applied during the import operation.`}</li>\n <li parentName=\"ul\"><em parentName=\"li\">{`Metrics`}</em>{`: Operation metrics. These include details on the number of types imported, number of entities imported, etc.`}</li>\n <li parentName=\"ul\"><em parentName=\"li\">{`Processed Entities`}</em>{`: Contains a list of GUIDs for the entities that were processed.`}</li>\n <li parentName=\"ul\"><em parentName=\"li\">{`Operation Status`}</em>{`: Overall status of the operation. Values are `}<em parentName=\"li\">{`SUCCESS`}</em>{`, PARTIAL`}<em parentName=\"li\">{`SUCCESS, _FAIL`}</em>{`.`}</li>\n </ul>\n <h3 {...{\n \"id\": \"examples-using-curl-calls\"\n }}>{`Examples Using CURL Calls`}</h3>\n <p>{`The call below performs Import of `}<em parentName=\"p\">{`QuickStart`}</em>{` database using POST.`}</p>\n <SyntaxHighlighter wrapLines={true} language=\"shell\" style={theme.dark} mdxType=\"SyntaxHighlighter\">\n {`curl -g -X POST -u adminuser:password -H \"Content-Type: multipart/form-data\"\n -H \"Cache-Control: no-cache\"\n -F request=@importOptions.json\n -F data=@quickStartDB.zip\n \"http://localhost:21000/api/atlas/admin/import\"`}\n </SyntaxHighlighter>\n <p>{`The `}<em parentName=\"p\">{`request`}</em>{` parameter is optional. If import has to be run without any options use:`}</p>\n <SyntaxHighlighter wrapLines={true} language=\"shell\" style={theme.dark} mdxType=\"SyntaxHighlighter\">\n {`curl -g -X POST -u adminuser:password -H \"Content-Type: multipart/form-data\"\n -H \"Cache-Control: no-cache\"\n -F data=@quickStartDB.zip\n \"http://localhost:21000/api/atlas/admin/import\"`}\n </SyntaxHighlighter>\n <p>{`The call below performs Import of `}<em parentName=\"p\">{`QuickStart`}</em>{` database using a ZIP file available on the server.`}</p>\n <SyntaxHighlighter wrapLines={true} language=\"shell\" style={theme.dark} mdxType=\"SyntaxHighlighter\">\n {`curl -X POST -u adminuser:password -H \"Cache-Control: no-cache\" -d ./importOptions.json\n\"http://localhost:21000/api/atlas/admin/importFile\" > quickStartDB-import-result.json`}\n </SyntaxHighlighter>\n <p>{`Below is the `}<em parentName=\"p\">{`AtlasImportResult`}</em>{` JSON for an import that contains `}<em parentName=\"p\">{`hive_db`}</em>{`.`}</p>\n <p>{`The `}<em parentName=\"p\">{`processedEntities`}</em>{` contains the `}<em parentName=\"p\">{`guids`}</em>{` of all the entities imported.`}</p>\n <p>{`The `}<em parentName=\"p\">{`metrics`}</em>{` contain a breakdown of the types and entities imported along with the operation performed on them viz. `}<em parentName=\"p\">{`created`}</em>{` or `}<em parentName=\"p\">{`updated`}</em>{`.`}</p>\n <SyntaxHighlighter wrapLines={true} language=\"json\" style={theme.dark} mdxType=\"SyntaxHighlighter\">\n {`{\n \"request\": {\n \"options\": {}\n },\n \"userName\": \"admin\",\n \"clientIpAddress\": \"10.0.2.2\",\n \"hostName\": \"10.0.2.15\",\n \"timeStamp\": 1491285622823,\n \"metrics\": {\n \"duration\": 9143,\n \"typedef:enum\": 0,\n \"typedef:struct\": 0,\n \"entity:hive_column:created\": 461,\n \"entity:hive_storagedesc:created\": 20,\n \"entity:hive_process:created\": 12,\n \"entity:hive_db:created\": 5,\n \"entity:hive_table:created\": 20,\n \"entity:hdfs_path:created\": 2,\n \"typedef:entitydef\": 0,\n \"typedef:classification\": 3\n },\n \"processedEntities\": [\n \"2c4aa713-030b-4fb3-98b1-1cab23d9ac81\",\n \"e4aa71ed-70fd-4fa7-9dfb-8250a573e293\",\n ...\n \"ea0f9bdb-1dfc-4e48-9848-a006129929f9\",\n \"b5e2cb41-3e7d-4468-84e1-d87c320e75f9\"\n ],\n \"operationStatus\": \"SUCCESS\"\n}`}\n </SyntaxHighlighter>\n </MDXLayout>;\n}\n;\nMDXContent.isMDXComponent = true;","/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { dark } from \"react-syntax-highlighter/dist/esm/styles/hljs\";\n\n//dark[\"powershell\"][\"color\"] = \"#37bb9b\";\ndark.hljs.color = \"#37bb9b\";\nexport default dark;"],"sourceRoot":""}