You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. To verify that Sqoop can see your database, enter the command below in your open SSH connection. This command returns a list of databases.
49
49
50
50
```bash
51
-
sqoop list-databases --connect $serverConnect
51
+
sqoop list-databases --connect $SERVER_CONNECT
52
52
```
53
53
54
54
1. Enter the following command to see a list of tables for the specified database:
55
55
56
56
```bash
57
-
sqoop list-tables --connect $serverDbConnect
57
+
sqoop list-tables --connect $SERVER_DB_CONNECT
58
58
```
59
59
60
60
1. To export data from the Hive `hivesampletable` table to the `mobiledata` table in your database, enter the command below in your open SSH connection:
61
61
62
62
```bash
63
-
sqoop export --connect $serverDbConnect \
63
+
sqoop export --connect $SERVER_DB_CONNECT \
64
64
-table mobiledata \
65
65
--hcatalog-table hivesampletable
66
66
```
67
67
68
68
1. To verify that data was exported, use the following queries from your SSH connection to view the exported data:
69
69
70
70
```bash
71
-
sqoop eval --connect $serverDbConnect \
71
+
sqoop eval --connect $SERVER_DB_CONNECT \
72
72
--query "SELECT COUNT(*) from dbo.mobiledata WITH (NOLOCK)"
73
73
74
74
75
-
sqoop eval --connect $serverDbConnect \
75
+
sqoop eval --connect $SERVER_DB_CONNECT \
76
76
--query "SELECT TOP(10) * from dbo.mobiledata WITH (NOLOCK)"
77
77
```
78
78
@@ -83,7 +83,7 @@ From SQL to Azure storage.
83
83
1. Enter the command below in your open SSH connection to import data from the `mobiledata` table in SQL, to the `wasbs:///tutorials/usesqoop/importeddata` directory on HDInsight. The fields in the data are separated by a tab character, and the lines are terminated by a new-line character.
0 commit comments