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
input { | |
stdin { | |
type => "stdin-type" | |
} | |
file { | |
path => ["/PATH/bank-account-files/*"] | |
start_position => "beginning" | |
sincedb_path => "/dev/null" | |
codec => plain { charset => 'Windows-1252' } |
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 | |
DESTINATION_PATH="/PATH_TO_DESTINATION" | |
for SOURCE_FILE in `find "/PATH_SOURCE" -name *.csv`; do | |
FILE_NAME=$(basename "$SOURCE_FILE") | |
FILE_NAME_EXTENSION="${FILE_NAME##*.}" | |
FILE_NAME_PART="${FILE_NAME%.*}" | |
DESTINATION_FILE_NAME="${FILE_NAME_PART}-${RANDOM}.${FILE_NAME_EXTENSION}" |
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 | |
full_file_path="/PATH/test.csv" | |
# complete file name without path | |
file_name="${full_file_path##*/}" | |
# file name without extension | |
file_name_part="${full_file_path%.*}" |
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
%spark | |
data.write | |
.format("jdbc") | |
.option("url", "jdbc:postgresql://SERVER:5432/DATABASE") | |
.option("dbtable", "public.account") | |
.option("user", "zeppelin") | |
.option("password", "PASSWORD") | |
.option("driver", "org.postgresql.Driver") | |
.mode("overwrite") | |
.save |
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
%spark | |
val account = df.withColumn("Betrag", regexp_replace( regexp_replace( df("Betrag"), "\\.","" ) , "\\,",".").cast(DecimalType(10,2))) | |
.withColumn("Buchung", to_date( unix_timestamp( col("Buchung") , "dd.MM.yyyy" ).cast("timestamp") ) ) | |
.withColumn("Wert", to_date( unix_timestamp( col("Wert") , "dd.MM.yyyy" ).cast("timestamp") ) ) |
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
%spark | |
val filesPath = "/PATH/*.csv" | |
import org.apache.spark.sql.types.{StructType, StructField, StringType, DecimalType}; | |
val customSchema = StructType( Array( StructField("Buchung", StringType, true), | |
StructField("Wert", StringType, true), | |
StructField("Verwendungszweck", StringType, true), | |
StructField("Betrag", StringType, true) )) |
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
cat ~/.ssh/*.pub | ssh user@remote-system 'umask 077; cat >>.ssh/authorized_keys' |
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 | |
wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add - | |
sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list' | |
sudo apt-get update | |
sudo apt-get install -y jenkins |
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
FROM traefik:camembert | |
ADD traefik.toml . | |
EXPOSE 80 | |
EXPOSE 8080 | |
EXPOSE 443 |
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
Host * | |
AddKeysToAgent yes | |
UseKeychain yes | |
IdentityFile ~/.ssh/id_rsa |