CREATE OR REPLACE VIEW FROM_NAPI_SAS_UNION.ise_customer AS
SELECT
    `id`, `id_partner`, `name`, `updated_at`, `id_default_site`, `key_selfcare`, `statut`, `context_key`, `mq_query`, `last_query`, `last_response`, `action`, `is_created`, `published_at`, `key_wbs`
FROM
    FROM_NAPI_V3_SAS.ise_customer
WHERE
    1
UNION
SELECT
    `id`, `id_partner`, `name`, `updated_at`, `id_default_site`, `key_selfcare`, `statut`, `context_key`, `mq_query`, `last_query`, `last_response`, `action`, `is_created`, `published_at`, `key_wbs`
FROM
    FROM_NAPI_V2_SAS.ise_customer;


CREATE OR REPLACE VIEW FROM_NAPI_SAS_UNION.ise_adress AS
SELECT
    `id`, `partner_id`, `customer_id`, `site_id`, `updated_at`, `siret`, `postal_code`, `city`, `country`, `insee_code`, `zne_code`, `key_selfcare`, `street`, `statut`, `context_key`, `mq_query`, `last_query`, `last_response`, `action`, `is_created`, `published_at`, `key_wbs`
FROM
    FROM_NAPI_V3_SAS.ise_adress
WHERE
    1
UNION
SELECT
    `id`, `partner_id`, `customer_id`, `site_id`, `updated_at`, `siret`, `postal_code`, `city`, `country`, `insee_code`, `zne_code`, `key_selfcare`, `street`, `statut`, `context_key`, `mq_query`, `last_query`, `last_response`, `action`, `is_created`, `published_at`, `key_wbs`
FROM
    FROM_NAPI_V2_SAS.ise_adress;


CREATE OR REPLACE VIEW FROM_NAPI_SAS_UNION.ise_partner AS
SELECT
    `id`, `name`, `updated_at`, `key_selfcare`, `statut`, `context_key`, `mq_query`, `last_query`, `last_response`, `action`, `is_created`, `published_at`, `key_wbs`
FROM
    FROM_NAPI_V2_SAS.ise_partner;


CREATE OR REPLACE VIEW FROM_NAPI_SAS_UNION.ise_sda AS
SELECT
    `id`, `id_site`, `long_number`, `short_number`, `updated_at`, `key_selfcare`, `statut`, `context_key`, `mq_query`, `last_query`, `last_response`, `action`, `is_created`, `published_at`, `key_wbs`
FROM
    FROM_NAPI_V3_SAS.ise_sda
WHERE
    1
UNION
SELECT
    `id`, `id_site`, `long_number`, `short_number`, `updated_at`, `key_selfcare`, `statut`, `context_key`, `mq_query`, `last_query`, `last_response`, `action`, `is_created`, `published_at`, `key_wbs`
FROM
    FROM_NAPI_V2_SAS.ise_sda;


CREATE OR REPLACE VIEW FROM_NAPI_SAS_UNION.ise_site AS
SELECT
    `id`, `id_customer`, `name`, `updated_at`, `key_selfcare`, `statut`, `context_key`, `mq_query`, `last_query`, `last_response`, `action`, `is_created`, `published_at`, `key_wbs`
FROM
    FROM_NAPI_V3_SAS.ise_site
WHERE
    1
UNION
SELECT
    `id`, `id_customer`, `name`, `updated_at`, `key_selfcare`, `statut`, `context_key`, `mq_query`, `last_query`, `last_response`, `action`, `is_created`, `published_at`, `key_wbs`
FROM
    FROM_NAPI_V2_SAS.ise_site;