TheDeveloperBlog.com

Home | Contact Us

C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML

Sqoop Where Clause

Apache Sqoop where for beginners and professionals with examples on sqoop, Sqoop features, Sqoop Installation, Starting Sqoop, Sqoop Import, Sqoop where clause, Sqoop Export, Sqoop Integration with Hadoop ecosystem etc.

<< Back to SQOOP

Sqoop Where

You can place restrictions on data imported by using "where" clause. Let's import cityByCountry table where state ( 6th column is restricted to "Alaska").

Sqoop MySQL where clause

The Sqoop statement is written below

sqoop import \ --connect "jdbc:mysql://localhost/training" \ --username training -P \ --table cityByCountry \ --target-dir /user/where_clause \ --where "state = 'Alaska'" \ -m 1

Output is shown below

Sqoop MySQL where output

Let's list all databases present on a mysql server using a "list-databases" tool.

Note : for more information on list-databases, type "$ sqoop help list-databases".

$ sqoop list-databases --connect "jdbc:mysql://localhost" --username cloudera --password cloudera

Similarly for listing tables

$ sqoop list-tables --connect "jdbc:mysql://localhost/training" --username cloudera -P
Next TopicSqoop Export




Related Links:


Related Links

Adjectives Ado Ai Android Angular Antonyms Apache Articles Asp Autocad Automata Aws Azure Basic Binary Bitcoin Blockchain C Cassandra Change Coa Computer Control Cpp Create Creating C-Sharp Cyber Daa Data Dbms Deletion Devops Difference Discrete Es6 Ethical Examples Features Firebase Flutter Fs Git Go Hbase History Hive Hiveql How Html Idioms Insertion Installing Ios Java Joomla Js Kafka Kali Laravel Logical Machine Matlab Matrix Mongodb Mysql One Opencv Oracle Ordering Os Pandas Php Pig Pl Postgresql Powershell Prepositions Program Python React Ruby Scala Selecting Selenium Sentence Seo Sharepoint Software Spellings Spotting Spring Sql Sqlite Sqoop Svn Swift Synonyms Talend Testng Types Uml Unity Vbnet Verbal Webdriver What Wpf