-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from data-catering/remove-persist
Add in remove persisted data command
- Loading branch information
Showing
15 changed files
with
282 additions
and
95 deletions.
There are no files selected for viewing
This file contains 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
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env bash | ||
|
||
count=0 | ||
total=0 | ||
|
||
for f in $(ls /tmp/data/*.cql); | ||
do | ||
total=$((total + 1)) | ||
cqlsh -u "${CASSANDRA_USER:-cassandra}" -p "${CASSANDRA_PASSWORD:-cassandra}" -f "${f}" cassandra 9042 | ||
if [[ $? -eq 0 ]]; | ||
then | ||
count=$((count + 1)) | ||
fi; | ||
done; | ||
|
||
echo "Executed ${count} out of ${total} files" |
10 changes: 0 additions & 10 deletions
10
data/clickhouse/docker-entrypoint-initdb.d/1_create_postgres_connection.sh
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env bash | ||
|
||
count=0 | ||
total=0 | ||
|
||
for f in $(ls /tmp/data/*.sql); | ||
do | ||
clickhouse client --host clickhouse-server --multiquery < "$f" | ||
if [[ $? -eq 0 ]]; | ||
then | ||
count=$((count + 1)) | ||
fi; | ||
done; | ||
|
||
echo "Executed ${count} out of ${total} files" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
SET allow_experimental_database_materialized_postgresql=1; | ||
|
||
SET allow_experimental_materialized_postgresql_table=1; | ||
|
||
CREATE DATABASE customer_postgres_db ENGINE = PostgreSQL('postgres:5432', 'customer', 'postgres', 'postgres', 'account', 0); |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env bash | ||
|
||
host="kafka" | ||
# blocks until kafka is reachable | ||
kafka-topics --bootstrap-server ${host}:29092 --list | ||
|
||
if [[ -z "$KAFKA_TOPICS" ]]; then | ||
echo "No Kafka topics provided via KAFKA_TOPICS environment variable" | ||
exit 0 | ||
fi | ||
|
||
echo "Creating kafka topics" | ||
for t in $(echo "$KAFKA_TOPICS" | sed s/,/\\n/g); do | ||
kafka-topics --create --if-not-exists --topic "${t}" --bootstrap-server ${host}:9092 --replication-factor 1 --partitions 1 | ||
done | ||
|
||
echo "Successfully created the following topics:" | ||
kafka-topics --bootstrap-server ${host}:29092 --list |
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env bash | ||
|
||
count=0 | ||
total=0 | ||
|
||
for f in $(ls /tmp/data/*.sql); | ||
do | ||
total=$((total + 1)) | ||
mysql -u root -p"${MYSQL_PASSWORD:-root}" -h "mysql" < "${f}" | ||
if [[ $? -eq 0 ]]; | ||
then | ||
count=$((count + 1)) | ||
fi; | ||
done; | ||
|
||
echo "Executed ${count} out of ${total} files" |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env bash | ||
|
||
count=0 | ||
total=0 | ||
|
||
for f in $(ls /tmp/data/*.sql); | ||
do | ||
total=$((total + 1)) | ||
psql -U${POSTGRES_USER:-postgres} -hpostgres -f "${f}" | ||
if [[ $? -eq 0 ]]; | ||
then | ||
count=$((count + 1)) | ||
fi; | ||
done; | ||
|
||
echo "Executed ${count} out of ${total} files" |
File renamed without changes.
Oops, something went wrong.