-- Fetch all the Items belonging to the Dynamics 365
-- Business Central company of a particular user.
SELECT *
FROM fiber.d_365_business_central_item
WHERE company_id = '{user.company_id}'
-- Fetch all the Items belonging to the Dynamics 365
-- Business Central company of a particular user.
SELECT *
FROM fiber.d_365_business_central_item
WHERE company_id = '{user.company_id}'
Code
CREATE TABLE fiber.d_365_business_central_item (
id TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE,
updated_at TIMESTAMP WITH TIME ZONE,
company_id TEXT,
number TEXT,
display_name TEXT,
display_name_2 TEXT,
type TEXT,
item_category_id TEXT,
item_category_code TEXT,
blocked BOOLEAN,
gtin TEXT,
inventory DOUBLE PRECISION,
unit_price DOUBLE PRECISION,
price_includes_tax BOOLEAN,
unit_cost DOUBLE PRECISION,
tax_group_id TEXT,
tax_group_code TEXT,
base_unit_of_measure_id TEXT,
base_unit_of_measure_code TEXT,
general_product_posting_group_id TEXT,
general_product_posting_group_code TEXT,
inventory_posting_group_id TEXT,
inventory_posting_group_code TEXT,
last_modified_date_time TIMESTAMP WITH TIME ZONE
)
CREATE TABLE fiber.d_365_business_central_item (
id TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE,
updated_at TIMESTAMP WITH TIME ZONE,
company_id TEXT,
number TEXT,
display_name TEXT,
display_name_2 TEXT,
type TEXT,
item_category_id TEXT,
item_category_code TEXT,
blocked BOOLEAN,
gtin TEXT,
inventory DOUBLE PRECISION,
unit_price DOUBLE PRECISION,
price_includes_tax BOOLEAN,
unit_cost DOUBLE PRECISION,
tax_group_id TEXT,
tax_group_code TEXT,
base_unit_of_measure_id TEXT,
base_unit_of_measure_code TEXT,
general_product_posting_group_id TEXT,
general_product_posting_group_code TEXT,
inventory_posting_group_id TEXT,
inventory_posting_group_code TEXT,
last_modified_date_time TIMESTAMP WITH TIME ZONE
)
Model definition