Skip to content

Commit

Permalink
Update luigi metabase README and project files.
Browse files Browse the repository at this point in the history
  • Loading branch information
javainthinking committed Sep 3, 2021
1 parent 65b68ff commit 24a277a
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 3 deletions.
20 changes: 20 additions & 0 deletions luigi_metabase/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,30 @@ git clone https://github.com/alibabacloud-howto/opensource_with_apsaradb.git
cd opensource_with_apsaradb/luigi_metabase/
```

```
cd ~/opensource_with_apsaradb/luigi_metabase/metabase
wget https://downloads.metabase.com/v0.40.3.1/metabase.jar
java -jar metabase.jar
```

Admin User: [email protected]
Password: N1cetest
Business Owner user: [email protected]
Password: N1cetest


Execute the command to start luigi daemon. Once it is up and running, navigate to ``http://<ECS_EIP>:8082/``

```
luigid
```

```
cd ~/adbpg_client_package/bin
./psql -hpgm-3nsa364dun8rza5k168190.pg.rds.aliyuncs.com -p1921 -Udemo sales_dw
select tablename from pg_tables where schemaname='public';
```



This tutorial is modified based on [https://github.com/abhishekzambre/data-warehouse](https://github.com/abhishekzambre/data-warehouse) to running on Alibaba Cloud.
4 changes: 2 additions & 2 deletions luigi_metabase/data_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ class Config(luigi.Config):
host = 'localhost'
port = '1921'
database = 'sales_dw'
user = 'abhishekzambre'
password = 'sky'
user = 'demo'
password = 'N1cetest'

customer_info_table = 'customer_info'
invoice_table = 'invoice'
Expand Down
2 changes: 1 addition & 1 deletion luigi_metabase/deployment/terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ resource "alicloud_vswitch" "vswitch_1" {
resource "alicloud_instance" "instance" {
security_groups = alicloud_security_group.group.*.id

instance_type = "ecs.c5.large" # 2core 4GB
instance_type = "ecs.c5.xlarge" # 4core 8GB
system_disk_category = "cloud_ssd"
system_disk_name = "luigi_metabase_system_disk"
system_disk_size = 40
Expand Down
67 changes: 67 additions & 0 deletions luigi_metabase/sales_dw_ddl.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
DROP TABLE IF EXISTS association_rules;
DROP TABLE IF EXISTS product_info;
DROP TABLE IF EXISTS invoice;
DROP TABLE IF EXISTS customer_info;
DROP TABLE IF EXISTS invoice_time;
DROP TABLE IF EXISTS invoice_outliers;


-- Table: Association Rules
CREATE TABLE association_rules (
consequent_support Float,
leverage Float,
antecedent_support Float,
conviction Float,
lift Float,
antecedants Text,
confidence Float,
support Float,
consequents Text
);


-- Table: Product Info
CREATE TABLE product_info (
description Text,
unit_price Float,
stock_code Text
);

-- Table: Invoice
CREATE TABLE invoice (
invoice_no Text,
quantity Integer,
invoice_date Text,
customer_id Integer,
stock_code Text
);

-- Table: Customer Info
CREATE TABLE customer_info (
customer_id Integer,
country Text,
country_code Text
);

-- Table: Invoice Time
CREATE TABLE invoice_time (
minute Integer,
year Integer,
month Text,
hour Integer,
dayofyear Integer,
weekofyear Integer,
dayofweek Integer,
day Integer,
quarter Integer,
invoice_date Text
);

-- Table: Invoice Outliers
CREATE TABLE invoice_outliers (
invoice_no Text,
quantity Integer,
invoice_date Text,
customer_id Integer,
stock_code Text
);

0 comments on commit 24a277a

Please sign in to comment.