Problem: Members who are working on Windows OS with Hadoop sandbox or Hadoop not able to view or move the files from Windows OS to Hadoop Sandbox.
Solution:
1.You can use HUE interface to upload files from windows to Hadoop.
2. You can install HDFS Explorer on windows and explorer the files. This will help you to identify where the files are present in Hadoop sandbox.
3. you can use the following Hadoop commands
Hadoop fs -ls /<<folderpath>>
Install HDFS Explorer from the following link.
http://bigdata.red-gate.com/
http://hadoop.drawbackz.com/stack/12821/how-to-transfer-files-from-windows-to-hortonworks-sandbox.html
http://bigdata.red-gate.com/connecting-to-sandboxes.html
Search This Blog
January 18, 2015
November 13, 2014
How to retreive random number of rows from a table
USE THE TABLESAMPLE KEYWORD AFTER THE TABLE NAME.
Following queries retrieve random number of rows each time
SELECT * FROM TABLE_NAME TABLESAMPLE(100 ROWS)
SELECT * FROM TABLE_NAME TABLESAMPLE(10 PERCENT)
Following queries retrieve random number of rows each time
SELECT * FROM TABLE_NAME TABLESAMPLE(100 ROWS)
SELECT * FROM TABLE_NAME TABLESAMPLE(10 PERCENT)
November 12, 2014
How to get all tables row count in a database
The more effective way of getting all tables row count in a database is using sysindexes table. This will not do any table scans to get the values.
Following is the code to get the table name and row counts
Following is the code to get the table name and row counts
select so.name,si.rows from sysindexes si
inner join sysobjects so
on si.id = so.id
where si.indid=0 and so.type='u'
order by so.name
November 01, 2014
SSIS 2014 New Features
There are no new features introduced in SSIS 2014.
There are no changes to the existing features.
For more information check the MSDN link at http://msdn.microsoft.com/en-us/library/bb522534.aspx
October 21, 2014
How to bring database in SQL Server from Restore mode to normal
Change the database_name to the database name having issues.
USE master
GO
ALTER DATABASE database_name SET OFFLINE WITH ROLLBACK IMMEDIATE
GO
ALTER DATABASE database_name ONLINE
GO
Subscribe to:
Posts (Atom)