Commit 87ba0061 authored by Lucas Fernandes de Oliveira's avatar Lucas Fernandes de Oliveira

Merge branch 'issue/75' into 'develop'

Issue #75: Add scheme from a market example

See merge request !73
parents a4a5047f 60aa0440
Pipeline #17412 passed with stages
in 55 seconds
-
name: "dim:seller:sex"
dataType: "enumtype"
enumType: "enumsex"
description: "Sexual orientation of the seller from market"
-
name: "dim:seller:cpf"
dataType: "string"
description: "CPF of the seller from market"
-
name: "dim:seller:id"
dataType: "integer"
description: "id of the seller from market"
-
name: "dim:product:name"
dataType: "string"
description: "Name of the product from market"
-
name: "dim:product:validity"
dataType: "date"
description: "Validity of the product from market"
-
name: "dim:product:id"
dataType: "integer"
description: "id of the product from market"
-
name: "dim:client:name"
dataType: "string"
description: "Name of the client from market"
-
name: "dim:client:cpf"
dataType: "string"
description: "CPF of the client from market"
-
name: "dim:client:id"
dataType: "integer"
description: "id of the client from market"
-
name: "dim:sell:registered"
dataType: "boolean"
description: "Check if the client is registered"
-
name: "dim:sell:product.id"
dataType: "integer"
description: "id of the product from market"
-
name: "dim:sell:seller.id"
dataType: "integer"
description: "id of the seller from market"
-
name: "dim:sell:client.id"
dataType: "integer"
description: "id of the client from market"
-
name: "dim:sell:datein"
dataType: "date"
description: "Date of the sell was realized"
-
name: "dim:buyout:datein"
dataType: "date"
description: "Date of the buyout was realized"
-
name: "dim:buyout:provider.id"
dataType: "integer"
description: "id of the provider from market"
-
name: "dim:buyout:product.id"
dataType: "integer"
description: "id of the product from market"
-
name: "dim:provider:name"
dataType: "string"
description: "Name of the provider from market"
-
name: "dim:provider:id"
dataType: "integer"
description: "id of the provider from market"
-
name: "dim:distribute:provider.id"
dataType: "string"
description: "id of the provider from market"
-
name: "dim:distribute:product.id"
dataType: "string"
description: "id of the product from market"
-
name: "enumsex"
values:
- "male"
- "female"
- "nonbinary"
- "undecided"
views:
links:
- config/market_views.yaml.example
obj:
-
alias: "Seller"
data: "test/postgres/fixtures/view10.json"
origin: true
dimensions:
- "dim:seller:name"
- "dim:seller:sex"
- "dim:seller:cpf"
- "dim:seller:id"
metrics:
- "met:seller:avg:age"
- "met:seller:max:age"
- "met:seller:min:age"
- "met:seller:count:age"
metrics:
links:
- config/market_metrics.yaml.example
obj:
-
name: "met:seller:avg:age"
dataType: "float"
aggregation: "avg"
description: "The seller average age"
dimensions:
links:
- config/market_dimensions.yaml.example
obj:
-
name: "dim:seller:name"
dataType: "string"
description: "Name of the seller from market"
enumTypes:
links:
- config/market_enum.yaml.example
obj:
- []
sources:
links:
- config/market_sources.yaml.example
obj:
-
name: "Seller"
description: "Market worker"
fields:
-
name: "name"
description: "Seller name"
dataType: "string"
-
name: "age"
description: "Seller age"
dataType: "integer"
-
name: "sex"
description: "Seller sex"
enumType: "enumsex"
dataType: "enumtype"
-
name: "CPF"
description: "Seller CPF"
dataType: "string"
-
name: "id"
description: "Seller id"
dataType: "integer"
-
name: "met:seller:max:age"
dataType: "integer"
aggregation: "max"
description: "The seller highest age"
-
name: "met:seller:min:age"
dataType: "integer"
aggregation: "min"
description: "The seller lowest age"
-
name: "met:seller:count:age"
dataType: "integer"
aggregation: "count"
description: "The number of seller's"
-
name: "met:product:avg:pricein"
dataType: "float"
aggregation: "avg"
description: "The average product pricein"
-
name: "met:product:max:pricein"
dataType: "float"
aggregation: "max"
description: "The highest product pricein"
-
name: "met:product:min:pricein"
dataType: "float"
aggregation: "min"
description: "The lowest product pricein"
-
name: "met:product:avg:priceout"
dataType: "float"
aggregation: "avg"
description: "The average product priceout"
-
name: "met:product:max:priceout"
dataType: "float"
aggregation: "max"
description: "The highest product priceout"
-
name: "met:product:min:priceout"
dataType: "float"
aggregation: "min"
description: "The lowest product priceout"
-
name: "met:sell:sum:quantity"
dataType: "integer"
aggregation: "sum"
description: "The sum of sales quantity"
-
name: "met:sell:avg:quantity"
dataType: "float"
aggregation: "avg"
description: "The average of sales quantity"
-
name: "met:sell:count:quantity"
dataType: "integer"
aggregation: "count"
description: "The total number of sales"
-
name: "met:buyout:avg:quantity"
dataType: "float"
aggregation: "avg"
description: "The average of quantity bought"
-
name: "met:buyout:max:quantity"
dataType: "integer"
aggregation: "max"
description: "The highest quantity bought"
-
name: "met:buyout:min:quantity"
dataType: "integer"
aggregation: "min"
description: "The lowest quantity bought"
-
name: "Product"
description: "Market product"
fields:
-
name: "name"
description: "Product name"
dataType: "string"
-
name: "pricein"
description: "Product purchase price"
dataType: "float"
-
name: "priceout"
description: "Product price"
dataType: "float"
-
name: "validity"
description: "Product validity"
dataType: "date"
-
name: "id"
description: "Product id"
dataType: "integer"
-
name: "Client"
description: "Market client"
fields:
-
name: "name"
description: "Client name"
dataType: "string"
-
name: "CPF"
description: "Client CPF"
dataType: "string"
-
name: "id"
description: "Client id"
dataType: "integer"
-
name: "Sell"
description: "Market sale"
fields:
-
name: "Registered"
description: "Check if client is registered"
dataType: "boolean"
-
name: "Product.id"
description: "id from product"
dataType: "integer"
-
name: "Client.id"
description: "id from seller"
dataType: "integer"
-
name: "Seller.id"
description: "id from seller"
dataType: "integer"
-
name: "Quantity"
description: "How many is being bought"
dataType: "integer"
-
name: "Datein"
description: "Date of buy from Provider"
dataType: "date"
-
name: "Buyout"
description: "Market buyout"
fields:
-
name: "datein"
description: "date of entry"
dataType: "date"
-
name: "quantity"
description: "how many products has been bought"
dataType: "integer"
-
name: "Provider.id"
description: "Provider id"
dataType: "integer"
-
name: "Product.id"
description: "Product id"
dataType: "integer"
-
name: "Provider"
description: "Market provider"
fields:
-
name: "name"
description: "Provider product name"
dataType: "string"
-
name: "id"
description: "Provider id"
dataType: "integer"
-
name: "Distribute"
description: "Relation between Provider and Product"
fields:
-
name: "Provider.id"
description: "Provider id"
dataType: "integer"
-
name: "Product.id"
description: "Product id"
dataType: "integer"
-
alias: "Product"
data: "test/postgres/fixtures/view11.json"
origin: true
dimensions:
- "dim:product:name"
- "dim:product:validity"
- "dim:product:id"
metrics:
- "met:product:avg:pricein"
- "met:product:max:pricein"
- "met:product:min:pricein"
- "met:product:avg:priceout"
- "met:product:max:priceout"
- "met:product:min:priceout"
-
alias: "Client"
data: "test/postgres/fixtures/view12.json"
origin: true
dimensions:
- "dim:client:name"
- "dim:client:cpf"
- "dim:client:id"
-
alias: "Sell"
data: "test/postgres/fixtures/view13.json"
origin: true
dimensions:
- "dim:sell:registered"
- "dim:sell:product.id"
- "dim:sell:seller.id"
- "dim:sell:client.id"
- "dim:sell:datein"
metrics:
- "met:sell:sum:quantity"
- "met:sell:avg:quantity"
- "met:sell:count:quantity"
-
alias: "Buyout"
data: "test/postgres/fixtures/view14.json"
origin: true
dimensions:
- "dim:buyout:datein"
- "dim:buyout:provider.id"
- "dim:buyout:product.id"
metrics:
- "met:buyout:avg:quantity"
- "met:buyout:max:quantity"
- "met:buyout:min:quantity"
-
alias: "Provider"
data: "test/postgres/fixtures/view15.json"
origin: true
dimensions:
- "dim:provider:name"
- "dim:provider:id"
-
alias: "Distribute"
data: "test/postgres/fixtures/view16.json"
origin: true
dimensions:
- "dim:distribute:provider.id"
- "dim:distribute:product.id"
[
{"dim:seller:name": "Ade", "dim:seller:sex": "undecided"
, "dim:seller:cpf":"344.805.128-45", "dim:seller:id": 1, "dim:seller:age": 23
, "met:seller:avg:age": 23, "met:seller:max:age": 23, "met:seller:count:age": 1},
{"dim:seller:name": "Luanne", "dim:seller:sex": "nonbinary"
, "dim:seller:cpf":"977.221.375-39", "dim:seller:id": 2, "dim:seller:age": 24
, "met:seller:avg:age": 24, "met:seller:max:age": 24,"met:seller:count:age": 1},
{"dim:seller:name": "Florinda", "dim:seller:sex": "female"
, "dim:seller:cpf":"885.517.020-17", "dim:seller:id": 3, "dim:seller:age": 25
, "met:seller:avg:age": 25, "met:seller:max:age": 25, "met:seller:count:age": 1},
{"dim:seller:name": "Bryanna", "dim:seller:sex": "female"
, "dim:seller:cpf":"575.657.111-60", "dim:seller:id": 4, "dim:seller:age": 26
, "met:seller:avg:age": 26, "met:seller:max:age": 26, "met:seller:count:age": 1},
{"dim:seller:name": "Salvatore", "dim:seller:sex": "male"
, "dim:seller:cpf":"604.424.718-07", "dim:seller:id": 5, "dim:seller:age": 27
, "met:seller:avg:age": 27, "met:seller:max:age": 27, "met:seller:count:age": 1}
]
[
{"dim:product:name": "Bacon", "dim:product:validity": "2018-03-01", "dim:product:id":53,
"met:product:avg:pricein": 10.20, "met:product:max:pricein": 10.20, "met:product:min:pricein":10.20,
"met:product:avg:priceout": 10.20, "met:product:max:priceout": 10.20, "met:product:min:priceout":10.20},
{"dim:product:name": "Coal", "dim:product:validity": "2018-05-10", "dim:product:id": 54,
"met:product:avg:pricein": 8.20, "met:product:max:pricein": 8.20, "met:product:min:pricein":8.20,
"met:product:avg:priceout": 8.20, "met:product:max:priceout": 8.20, "met:product:min:priceout": 8.20},
{"dim:product:name": "Meat", "dim:product:validity": "2018-02-17", "dim:product:id": 55 ,
"met:product:avg:pricein": 17.50, "met:product:max:pricein": 17.50, "met:product:min:pricein":17.50,
"met:product:avg:priceout": 17.50, "met:product:max:priceout": 17.50, "met:product:min:priceout": 17.50},
{"dim:product:name": "Beer", "dim:product:validity": "2018-06-10", "dim:product:id": 56 ,
"met:product:avg:pricein": 6.50 , "met:product:max:pricein": 6.50, "met:product:min:pricein":6.50,
"met:product:avg:priceout": 6.50, "met:product:max:priceout": 6.50, "met:product:min:priceout":6.50},
{"dim:product:name": "Trento", "dim:product:validity": "2018-08-23" , "dim:product:id": 57 ,
"met:product:avg:pricein": 2.50, "met:product:max:pricein": 2.50, "met:product:min:pricein": 2.50,
"met:product:avg:priceout": 2.50, "met:product:max:priceout": 2.50, "met:product:min:priceout": 2.50}
]
[
{"dim:client:name": "Somboom", "dim:client:cpf": "500.345.583-65","dim:client:id": "7"},
{"dim:client:name": "Laci", "dim:client:cpf": "787.785.521-41","dim:client:id": "8"},
{"dim:client:name": "Rosalin", "dim:client:cpf": "463.478.120-45","dim:client:id": "9"},
{"dim:client:name": "Firoz", "dim:client:cpf": "352.324.206-15","dim:client:id": "10"},
{"dim:client:name": "Ravindra", "dim:client:cpf": "944.189.449-40","dim:client:id": "11"}
]
[
{ "dim:sell:registered": true, "dim:sell:product.id": 53, "dim:sell:seller.id": 1
, "dim:sell:client.id": 7, "dim:sell:datein": "2018-02-17", "met:sell:sum:quantity": 10
, "met:sell:avg:quantity": 10 , "met:sell:count:quantity": 10},
{ "dim:sell:registered": true, "dim:sell:product.id": 54, "dim:sell:seller.id": 2
, "dim:sell:client.id": 8, "dim:sell:datein": "2018-01-23", "met:sell:sum:quantity": 12
, "met:sell:avg:quantity": 12, "met:sell:count:quantity": 12},
{ "dim:sell:registered": false, "dim:sell:product.id": 55, "dim:sell:seller.id": 3
, "dim:sell:client.id": 0, "dim:sell:datein": "2018-01-25", "met:sell:sum:quantity": 5
, "met:sell:avg:quantity": 5, "met:sell:count:quantity": 5},
{ "dim:sell:registered": true, "dim:sell:product.id": 56, "dim:sell:seller.id": 4
, "dim:sell:client.id": 9, "dim:sell:datein": "2018-03-22", "met:sell:sum:quantity": 2
, "met:sell:avg:quantity": 2, "met:sell:count:quantity": 2},
{ "dim:sell:registered": true, "dim:sell:product.id": 57, "dim:sell:seller.id": 5
, "dim:sell:client.id": 10, "dim:sell:datein": "2018-02-21", "met:sell:sum:quantity": 10
, "met:sell:avg:quantity": 10, "met:sell:count:quantity": 10}
]
[
{ "dim:buyout:datein": "2018-01-01", "dim:buyout:provider.id": 20, "dim:buyout:product.id": 53
, "met:buyout:avg:quantity": 100,"met:buyout:max:quantity": 100,"met:buyout:min:quantity": 100},
{ "dim:buyout:datein": "2018-01-01", "dim:buyout:provider.id": 21, "dim:buyout:product.id": 54
, "met:buyout:avg:quantity": 120,"met:buyout:max:quantity": 120,"met:buyout:min:quantity": 120},
{ "dim:buyout:datein": "2018-01-01", "dim:buyout:provider.id": 22, "dim:buyout:product.id": 55
, "met:buyout:avg:quantity": 130,"met:buyout:max:quantity": 130,"met:buyout:min:quantity": 130},
{ "dim:buyout:datein": "2018-01-01", "dim:buyout:provider.id": 23, "dim:buyout:product.id": 56
, "met:buyout:avg:quantity": 140,"met:buyout:max:quantity": 140,"met:buyout:min:quantity": 140},
{ "dim:buyout:datein": "2018-01-01", "dim:buyout:provider.id": 24, "dim:buyout:product.id": 57
, "met:buyout:avg:quantity": 200,"met:buyout:max:quantity": 200,"met:buyout:min:quantity": 200}
]
[
{"dim:provider:name": "ProviderA","dim:provider:id": 1 },
{"dim:provider:name": "ProviderB","dim:provider:id": 2 },
{"dim:provider:name": "ProviderC","dim:provider:id": 3 },
{"dim:provider:name": "ProviderD","dim:provider:id": 4 },
{"dim:provider:name": "ProviderE","dim:provider:id": 5 }
]
[
{"dim:distribute:provider.id": 1,"dim:distribute:product.id": 53},
{"dim:distribute:provider.id": 2,"dim:distribute:product.id": 54},
{"dim:distribute:provider.id": 3,"dim:distribute:product.id": 55},
{"dim:distribute:provider.id": 4,"dim:distribute:product.id": 56},
{"dim:distribute:provider.id": 5,"dim:distribute:product.id": 57}
]
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment