Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ configure_local_rake_tasks = ->(tasks) do
FactoryBot.build(:widget, components: widget_components, inventor: Faker::Base.sample(inventors))
end)

batch.concat(Array.new(10) { FactoryBot.build(:online_store) })
batch.concat(Array.new(10) { FactoryBot.build(:physical_store) })
batch.concat(Array.new(5) { FactoryBot.build(:direct_wholesaler) })
batch.concat(Array.new(5) { FactoryBot.build(:broker_wholesaler) })

batch.concat(sponsors = Array.new(10) { FactoryBot.build(:sponsor) })
batch.concat(Array.new(10) { FactoryBot.build(:team, sponsors: sponsors.sample(rand(3))) })
batch
Expand Down
21 changes: 8 additions & 13 deletions config/schema/artifacts/data_warehouse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@ tables:
shapes ARRAY<STRUCT<type STRING, coordinates ARRAY<FLOAT>>>,
manufacturer_id STRING
)
companies:
table_schema: |-
CREATE TABLE IF NOT EXISTS companies (
id STRING,
name STRING,
stock_ticker STRING
)
components:
table_schema: |-
CREATE TABLE IF NOT EXISTS components (
Expand Down Expand Up @@ -62,7 +55,7 @@ tables:
id STRING,
name STRING,
created_at TIMESTAMP,
ceo STRUCT<id STRING, name STRING, nationality STRING>
ceo STRUCT<id STRING, name STRING, nationality STRING, __typename STRING>
)
mechanical_parts:
table_schema: |-
Expand All @@ -73,12 +66,14 @@ tables:
material STRING,
manufacturer_id STRING
)
people:
named_inventors:
table_schema: |-
CREATE TABLE IF NOT EXISTS people (
CREATE TABLE IF NOT EXISTS named_inventors (
id STRING,
name STRING,
nationality STRING
nationality STRING,
__typename STRING,
stock_ticker STRING
)
physical_stores:
table_schema: |-
Expand Down Expand Up @@ -158,8 +153,8 @@ tables:
internal_details STRUCT<name STRING>,
internal_highlightable_details STRUCT<name STRING>,
the_opts STRUCT<size STRING, the_sighs STRING, color STRING, is_draft BOOLEAN>,
inventor STRUCT<id STRING, name STRING, nationality STRING, stock_ticker STRING, __typename STRING>,
named_inventor STRUCT<id STRING, name STRING, nationality STRING, stock_ticker STRING, __typename STRING>,
inventor STRUCT<id STRING, name STRING, nationality STRING, __typename STRING, stock_ticker STRING>,
named_inventor STRUCT<id STRING, name STRING, nationality STRING, __typename STRING, stock_ticker STRING>,
weight_in_ng_str BIGINT,
weight_in_ng BIGINT,
tags ARRAY<STRING>,
Expand Down
30 changes: 5 additions & 25 deletions config/schema/artifacts/datastore_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1531,30 +1531,6 @@ indices:
index.number_of_replicas: 1
index.number_of_shards: 1
index.max_result_window: 10000
companies:
aliases: {}
mappings:
dynamic: strict
properties:
id:
type: keyword
name:
type: keyword
stock_ticker:
type: keyword
__sources:
type: keyword
__versions:
type: object
dynamic: 'false'
_size:
enabled: true
settings:
index.mapping.ignore_malformed: false
index.mapping.coerce: false
index.number_of_replicas: 1
index.number_of_shards: 1
index.max_result_window: 10000
components:
aliases: {}
mappings:
Expand Down Expand Up @@ -1738,7 +1714,7 @@ indices:
index.number_of_replicas: 1
index.number_of_shards: 1
index.max_result_window: 10000
people:
named_inventors:
aliases: {}
mappings:
dynamic: strict
Expand All @@ -1749,6 +1725,10 @@ indices:
type: keyword
nationality:
type: keyword
stock_ticker:
type: keyword
__typename:
type: keyword
__sources:
type: keyword
__versions:
Expand Down
Loading
Loading