Last active
July 12, 2019 14:57
-
-
Save galanteh/37960163c5c339719f7e1f9024fc04be to your computer and use it in GitHub Desktop.
Installing CSV Faker on a CFM (Cloudera NiFi) node
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
sudo yum install -y epel-release | |
sudo yum install -y python36 | |
sudo yum install -y python36-devel | |
sudo yum install -y python36-pip | |
sudo yum install -y python36-setuptools | |
sudo easy_install-3.6 pip | |
sudo python3.6 -m pip install --upgrade pip setuptools wheel | |
sudo python3 -m pip install faker | |
sudo python3 -m pip install ipaddress | |
sudo python3 -m pip install csvfaker | |
# Creating directories | |
sudo mkdir -p /opt/csvgen | |
sudo chown -R cloudera-scm:cloudera-scm /opt/csvgen | |
# Create bash to generate csv | |
sudo bash -c "cat << EOF > /opt/csvgen/csvgen.sh | |
#!/bin/bash | |
python3 -m csvfaker -r=1000 --locale=es_ES last_name first_name phone_number ssn credit_card_number credit_card_expire date_of_birth email street_address city latitude longitude | |
EOF" | |
sudo bash -c "chmod +x /opt/csvgen/csvgen.sh" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment