{"id":79628,"date":"2020-08-25T09:00:19","date_gmt":"2020-08-25T03:30:19","guid":{"rendered":"https:\/\/techvidvan.com\/tutorials\/?p=79628"},"modified":"2020-08-25T09:00:19","modified_gmt":"2020-08-25T03:30:19","slug":"apache-sqoop-list-databases","status":"publish","type":"post","link":"https:\/\/techvidvan.com\/tutorials\/apache-sqoop-list-databases\/","title":{"rendered":"Apache Sqoop List Databases Command with Examples"},"content":{"rendered":"<p>Welcome to DataFlair Apache Sqoop Tutorial series. This article first provides a short introduction to Sqoop List Databases. Later on, the article will explain the purpose, syntax, arguments, and many more.<\/p>\n<p>The article also covers the example invocation for the Sqoop List Databases tool to make your understanding better.<\/p>\n<p>Let us first see an introduction to Sqoop.<\/p>\n<p>&nbsp;<\/p>\n<h3>What is Sqoop?<\/h3>\n<p>SQOOP is an open-source project of the Apache Software Foundation. It stands for SQL to Hadoop. Sqoop is a tool that is specially designed for transferring data between the Hadoop ecosystem and the RDBMS like MySQL, Oracle, SQL Server, etc.<\/p>\n<p>It is basically a command-based interface where we use Sqoop commands for importing or exporting data from and to the RDBMS and Hadoop ecosystem.<\/p>\n<h3>What is Sqoop List Databases?<\/h3>\n<p>The Sqoop List Databases is a tool that executes and parses the \u201cSHOW DATABASES\u201d query against the database server. This lists out the entire database present in the database server.<\/p>\n<p>The primary purpose of this tool is to list the database schemas present on the server.<\/p>\n<h3>Syntax of Sqoop List Databases<\/h3>\n<p>Syntax for executing this tool is:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">$ sqoop list-databases (generic-args) (list-databases-args)\n$ sqoop-list-databases (generic-args) (list-databases-args)\n<\/pre>\n<p>The Hadoop generic arguments must come before any other list-databases arguments. Although we can pass the list-databases arguments in any order with respect to each other.<\/p>\n<p><strong>Common arguments are:<\/strong><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Argument<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;connect &lt;jdbc-uri&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Specify JDBC connect string<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;connection-manager &lt;class-name&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Specify the connection manager class to be used<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;driver &lt;class-name&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Manually specify JDBC driver class to use<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;hadoop-mapred-home &lt;dir&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Override $HADOOP_MAPRED_HOME<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;help<\/span><\/td>\n<td><span style=\"font-weight: 400\">Print usage instructions<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;password-file<\/span><\/td>\n<td><span style=\"font-weight: 400\">It will set the path for a file containing authentication password<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">-P<\/span><\/td>\n<td><span style=\"font-weight: 400\">Read password from console<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;password &lt;password&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Set authentication password<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;username &lt;username&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Set authentication username<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;verbose<\/span><\/td>\n<td><span style=\"font-weight: 400\">It will print more information while working<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;connection-param-file &lt;filename&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Optional properties file that provides connection parameters<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&#8211;relaxed-isolation<\/span><\/td>\n<td><span style=\"font-weight: 400\">Set connection transaction isolation to read uncommitted for the mappers.<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Sqoop List Databases Example Invocations<\/h3>\n<p>For example, we can list the database schemas available on the MySQL server by using the below command:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">$ sqoop list-databases\n\u2013connect jdbc:mysql:\/\/localhost\/\n\u2013username \u201croot\u201d\n\u2013password \u201croot\u201d\n<\/pre>\n<p><strong>Note:<\/strong> This works only with the HSQLDB, MySQL, and Oracle. When using it with Oracle, then it is necessary that the user who is connecting to the database must have the DBA privileges.<\/p>\n<h3>Summary<\/h3>\n<p>I hope after reading this article, you have understood the Sqoop List Databases tool. You have also seen the List Databases syntax as well as its purpose.<\/p>\n<p>Moreover, the article had covered list databases arguments for the practical uses. We have also provided an example invocation to make you understand it easily.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Welcome to DataFlair Apache Sqoop Tutorial series. This article first provides a short introduction to Sqoop List Databases. Later on, the article will explain the purpose, syntax, arguments, and many more. The article also&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":79671,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3163],"tags":[3189,3190],"class_list":["post-79628","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-sqoop","tag-sqoop-list-databases","tag-syntax-of-sqoop-list-databases"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Apache Sqoop List Databases Command with Examples - TechVidvan<\/title>\n<meta name=\"description\" content=\"Learn everything about Apache sqoop List Databases - Sqoop list-databases tool parses &amp; executes the &#039;SHOW DATABASES&#039; query against database server.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/techvidvan.com\/tutorials\/apache-sqoop-list-databases\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Apache Sqoop List Databases Command with Examples - TechVidvan\" \/>\n<meta property=\"og:description\" content=\"Learn everything about Apache sqoop List Databases - Sqoop list-databases tool parses &amp; executes the &#039;SHOW DATABASES&#039; query against database server.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/techvidvan.com\/tutorials\/apache-sqoop-list-databases\/\" \/>\n<meta property=\"og:site_name\" content=\"TechVidvan\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/TechVidvan\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-08-25T03:30:19+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/08\/sqoop-list-databases-TV.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"TechVidvan Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:site\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"TechVidvan Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Apache Sqoop List Databases Command with Examples - TechVidvan","description":"Learn everything about Apache sqoop List Databases - Sqoop list-databases tool parses & executes the 'SHOW DATABASES' query against database server.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/techvidvan.com\/tutorials\/apache-sqoop-list-databases\/","og_locale":"en_US","og_type":"article","og_title":"Apache Sqoop List Databases Command with Examples - TechVidvan","og_description":"Learn everything about Apache sqoop List Databases - Sqoop list-databases tool parses & executes the 'SHOW DATABASES' query against database server.","og_url":"https:\/\/techvidvan.com\/tutorials\/apache-sqoop-list-databases\/","og_site_name":"TechVidvan","article_publisher":"https:\/\/www.facebook.com\/TechVidvan\/","article_published_time":"2020-08-25T03:30:19+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/08\/sqoop-list-databases-TV.jpg","type":"image\/jpeg"}],"author":"TechVidvan Team","twitter_card":"summary_large_image","twitter_creator":"@vidvantech","twitter_site":"@vidvantech","twitter_misc":{"Written by":"TechVidvan Team","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/techvidvan.com\/tutorials\/apache-sqoop-list-databases\/#article","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/apache-sqoop-list-databases\/"},"author":{"name":"TechVidvan Team","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22"},"headline":"Apache Sqoop List Databases Command with Examples","datePublished":"2020-08-25T03:30:19+00:00","mainEntityOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/apache-sqoop-list-databases\/"},"wordCount":438,"commentCount":0,"publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/apache-sqoop-list-databases\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/08\/sqoop-list-databases-TV.jpg","keywords":["Sqoop List Databases","syntax of Sqoop List Databases"],"articleSection":["Sqoop Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/techvidvan.com\/tutorials\/apache-sqoop-list-databases\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/techvidvan.com\/tutorials\/apache-sqoop-list-databases\/","url":"https:\/\/techvidvan.com\/tutorials\/apache-sqoop-list-databases\/","name":"Apache Sqoop List Databases Command with Examples - TechVidvan","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/apache-sqoop-list-databases\/#primaryimage"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/apache-sqoop-list-databases\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/08\/sqoop-list-databases-TV.jpg","datePublished":"2020-08-25T03:30:19+00:00","description":"Learn everything about Apache sqoop List Databases - Sqoop list-databases tool parses & executes the 'SHOW DATABASES' query against database server.","breadcrumb":{"@id":"https:\/\/techvidvan.com\/tutorials\/apache-sqoop-list-databases\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/techvidvan.com\/tutorials\/apache-sqoop-list-databases\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/apache-sqoop-list-databases\/#primaryimage","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/08\/sqoop-list-databases-TV.jpg","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/08\/sqoop-list-databases-TV.jpg","width":1200,"height":628,"caption":"sqoop list databases"},{"@type":"BreadcrumbList","@id":"https:\/\/techvidvan.com\/tutorials\/apache-sqoop-list-databases\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/techvidvan.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Apache Sqoop List Databases Command with Examples"}]},{"@type":"WebSite","@id":"https:\/\/techvidvan.com\/tutorials\/#website","url":"https:\/\/techvidvan.com\/tutorials\/","name":"TechVidvan Blogs","description":"","publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/techvidvan.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/techvidvan.com\/tutorials\/#organization","name":"TechVidvan","url":"https:\/\/techvidvan.com\/tutorials\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","width":200,"height":50,"caption":"TechVidvan"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/TechVidvan\/","https:\/\/x.com\/vidvantech"]},{"@type":"Person","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22","name":"TechVidvan Team","description":"The TechVidvan Team delivers practical, beginner-friendly tutorials on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our experts are here to help you upskill and excel in today\u2019s tech industry."}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/79628","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/comments?post=79628"}],"version-history":[{"count":0,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/79628\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media\/79671"}],"wp:attachment":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media?parent=79628"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/categories?post=79628"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/tags?post=79628"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}