{"id":28926798,"url":"https://github.com/dhritimannath/sales-analysis-hive","last_synced_at":"2025-08-27T04:04:47.656Z","repository":{"id":199107370,"uuid":"171753994","full_name":"dhritimannath/sales-analysis-hive","owner":"dhritimannath","description":null,"archived":false,"fork":false,"pushed_at":"2019-03-12T17:37:49.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2023-10-08T17:36:16.244Z","etag":null,"topics":["analysis","hive","hiveql","mysql","sqoop"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dhritimannath.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-02-20T21:43:54.000Z","updated_at":"2023-10-08T17:36:16.899Z","dependencies_parsed_at":null,"dependency_job_id":"3025e1bd-d2cc-4602-b44c-79f1de6817f8","html_url":"https://github.com/dhritimannath/sales-analysis-hive","commit_stats":null,"previous_names":["dhritimannath/sales-analysis-hive"],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/dhritimannath/sales-analysis-hive","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhritimannath%2Fsales-analysis-hive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhritimannath%2Fsales-analysis-hive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhritimannath%2Fsales-analysis-hive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhritimannath%2Fsales-analysis-hive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dhritimannath","download_url":"https://codeload.github.com/dhritimannath/sales-analysis-hive/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhritimannath%2Fsales-analysis-hive/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261289525,"owners_count":23136079,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analysis","hive","hiveql","mysql","sqoop"],"created_at":"2025-06-22T12:12:07.694Z","updated_at":"2025-08-27T04:04:47.630Z","avatar_url":"https://github.com/dhritimannath.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"\n## **Mysql setup** \n\n### User creation ( if required ) \n```\t \nmysql\u003e CREATE USER 'someusername'@'localhost' IDENTIFIED BY 'somepassword';\n \nmysql\u003e GRANT ALL PRIVILEGES ON * . * TO 'someusername'@'localhost';\n\nmysql\u003e FLUSH privileges;\n```\n## **Mysql**\n\n### *Database and table setup*\n\nLogin into mysql shell\n\n* Replace the sql script file location with the desired one and run the following command\n```\nmysql\u003e source /location/to/sql/script/file.sql;\n```\nImport data into the table created from the above sql command\n\n\n* Replace the file path location ith the desired file location and run the following command\n```\n$ mysqlimport --ignore-lines=1 \\\n              --fields-terminated-by=, \\\n              --local -u user_name \\\n              -p black_friday \\\n              file_path_location.csv\n```\nFormat specific fields for data type correction \n\n* Replace the sql script file location with the desired one run the following command\n```\nmysql\u003e source /location/to/sql/format_script/format_file.sql;\n```\n\n## **Hive Setup**\n\n### Create hive database\n\n```\nhive\u003e create database black_friday;\n```\n\n## **Sqoop** \n\n### Sqoop Job  \n\n* Run the following command to create the job : \n\n```\n$ sqoop-job --create import_sales_data_to_hive \\\n            -- import \\\n            --connect \"jdbc:mysql://quickstart.cloudera/black_friday\" \\\n            --table black_friday \\\n            --hive-home /user/hive/warehouse/black_friday.db \\\n            --hive-import \\\n            --hive-overwrite \\\n            --create-hive-table \\\n            --hive-table black_friday.black_friday \n```\n\n* Check if the job is created or not by the folowing command :\n\n```\n$ sqoop-job --list\n```\nYou should be able to see the job created above in the available job output list named ***import_sales_data_to_hive***. \n\n* Execute the job : \n\n```\n$ sqoop-job --exec -- --username db_user_name -p db_user_password\n```\n\nReplace ***db_user_name*** and ***db_user_password*** with your database usename and password.\n\nAfter succesful completion of the job execution you are good to go.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhritimannath%2Fsales-analysis-hive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdhritimannath%2Fsales-analysis-hive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhritimannath%2Fsales-analysis-hive/lists"}