I have csv files in lzo format in HDFS I would like to load these files in to s3 and then to snowflake, as snowflake does not provides lzo compression for csv file format, I am required to convert it on the fly while loading these files to s3.
How to uncompress file while loading from HDFS to S3?
262 views Asked by Vishrant At
2
There are 2 answers
0
Vishrant
On
This answer helped me to convert from .lzo_deflate to required snowflake compatible output format:
hadoop jar $HADOOP_HOME/contrib/streaming/hadoop-streaming-0.20.2-cdh3u2.jar \
-Dmapred.output.compress=true \
-Dmapred.compress.map.output=true \
-Dmapred.output.compression.codec=org.apache.hadoop.io.compress.GzipCodec \
-Dmapred.reduce.tasks=0 \
-input <input-path> \
-output $OUTPUT \
-mapper "cut -f 2"
Related Questions in HADOOP
- Can anyoone help me with this problem while trying to install hadoop on ubuntu?
- Hadoop No appenders could be found for logger (org.apache.hadoop.mapreduce.v2.app.MRAppMaster)
- Top-N using Python, MapReduce
- Spark Driver vs MapReduce Driver on YARN
- ERROR: org.apache.hadoop.fs.UnsupportedFileSystemException: No FileSystem for scheme "maprfs"
- can't write pyspark dataframe to parquet file on windows
- How to optimize writing to a large table in Hive/HDFS using Spark
- Can't replicate block xxx because the block file doesn't exist, or is not accessible
- HDFS too many bad blocks due to "Operation category WRITE is not supported in state standby" - Understanding why datanode can't find Active NameNode
- distcp throws java.io.IOException when copying files
- Hadoop MapReduce WordPairsCount produces inconsistent results
- If my data is not partitioned can that be why I’m getting maxResultSize error for my PySpark job?
- resource manager and nodemanager connectivity issues
- ERROR flume.SinkRunner: Unable to deliver event
- converting varchar(7) to decimal (7,5) in hive
Related Questions in SNOWFLAKE-CLOUD-DATA-PLATFORM
- Are there poor practices in this use of python cryptography package to generate RSA keypair?
- snowflake cost management page limited warehouse access to role
- How to make FLATTEN function in Snowflake return PATH in Dot Notation instead of Brackets Notation
- How to overwrite a single partition in Snowflake when using Spark connector
- snowflake enforce unsorted json into variant column
- Spark connectors from Azure Databricks to Snowflake using AzureAD login
- Load data from csv in airflow docker container to snowflake DB
- Snowflake ODBC xdg-open Missing X server or $DISPLAY
- How can I reduce table scan time in snowflake
- API INTEGRATION for azure devops git on snowflake
- When will "create or alter" be available to all accounts?
- Event_date reference in CTE
- Problem decorating Python stored procedure handler with @functools.cache
- How to add a 1 to a phone number and remove the dashes?
- DBT - Merge - Only update condition
Related Questions in DISTCP
- distcp throws java.io.IOException when copying files
- How to copy data from an old Hive cluster to a new Hive cluster and keep all Hive metastore meta data?
- s3-dist-cp groupby Regex Capture
- Fastest way to copy large data from HDFS location to GCP bucket using command
- GCS Connector on EMR failing with java.lang.ClassNotFoundException
- How to specify a filter to exclude hdfs file of a partition when calling distcp -update?
- requested yarn user xxx not found when running distcp from hadoop to GCS
- Hadoop distcp does not skip CRC checks
- Hadoop distcp to S3
- distcp one table to another table with different name
- distcp - copy data from cloudera hdfs to cloud storage
- Hadoop distcp: what ports are used?
- DistCP - Even simple copies result in CRC Exceptions
- How should I move files/folders from one Hadoop cluster to another and delete the source contents after moving?
- One single distcp command to upload several files to s3 (NO DIRECTORY)
Related Questions in S3DISTCP
- s3-dist-cp groupby Regex Capture
- outputManifest to s3 bucket error : No such file or directory
- GCS Connector on EMR failing with java.lang.ClassNotFoundException
- Running s3distcp from EMR to Kerberized Hadoop cluster
- One single distcp command to upload several files to s3 (NO DIRECTORY)
- How do I reproduce checksum of gzip files copied with s3DistCp (from Google Cloud Storage to AWS S3)
- How to grab all hive files after a certain date for s3 upload (python)
- How does speculative execution impact s3-dist-cp job?
- Does s3-dist-cp on EMR uses EMR consistent view metadata?
- Running distcp java job using hadoop yarn
- How to read and repartition a large dataset from one s3 location to another using spark, s3Distcp & aws EMR
- How to copy files from s3 to s3 same folder?
- Overwrite an existing file in S3 using S3DistCp
- Performance issue with AWS EMR S3DistCp
- How to copy large number of smaller files from EMR (Hdfs) to S3 bucket?
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
You can consider using a Lambda function that decompresses the files upon landing on s3, here is a link that gets you there:
https://medium.com/@johnpaulhayes/how-extract-a-huge-zip-file-in-an-amazon-s3-bucket-by-using-aws-lambda-and-python-e32c6cf58f06