Skip to content

Commit

Permalink
Remove blanks from phone numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentAntoine committed Nov 5, 2024
1 parent 2962cb7 commit 0ed37d6
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 26 deletions.
10 changes: 5 additions & 5 deletions datascience/src/pipeline/queries/fmc/vessels_operators.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ SELECT
n.id_nav_flotteur AS id,
a.nom AS operator_name_pos,
a.email AS operator_email_pos,
a.tel_fixe_1 AS operator_phone_1_pos,
a.tel_fixe_2 AS operator_phone_2_pos,
a.tel_fixe_3 AS operator_phone_3_pos,
a.tel_mobile AS operator_mobile_phone_pos,
a.fax AS operator_fax_pos
REPLACE(a.tel_fixe_1, ' ', '') AS operator_phone_1_pos,
REPLACE(a.tel_fixe_2, ' ', '') AS operator_phone_2_pos,
REPLACE(a.tel_fixe_3, ' ', '') AS operator_phone_3_pos,
REPLACE(a.tel_mobile, ' ', '') AS operator_mobile_phone_pos,
REPLACE(a.fax, ' ', '') AS operator_fax_pos
FROM FMC2.FMC_NAVIRE n
LEFT JOIN FMC2.FMC_ARMATEUR a
ON a.id_fmc_armateur = n.id_fmc_armateur
Expand Down
24 changes: 12 additions & 12 deletions datascience/src/pipeline/queries/ocan/french_vessels.sql
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@ e AS (
id_adm_entreprise AS id_adm,
raison_sociale AS name,
email,
telephone AS phone,
tel_mobile AS mobile_phone,
fax
REPLACE(telephone, ' ', '') AS phone,
REPLACE(tel_mobile, ' ', '') AS mobile_phone,
REPLACE(fax, ' ', '') AS fax
FROM ADM.ADM_ENTREPRISE
),

a AS (
SELECT
id_adm_administre AS id_adm,
nom || DECODE(prenom, NULL, '', ' ') || prenom as name,
email,
telephone AS phone,
tel_mobile AS mobile_phone,
fax
email,
REPLACE(telephone, ' ', '') AS phone,
REPLACE(tel_mobile, ' ', '') AS mobile_phone,
REPLACE(fax, ' ', '') AS fax
FROM ADM.ADM_ADMINISTRE
),

Expand Down Expand Up @@ -74,11 +74,11 @@ SELECT
nf.largeur AS width,
nf.jauge_londres AS gauge,
nf.puissance_propulsive AS power,
nf.num_telephone AS vessel_phone_1,
nf.tel_fixe_2_contact_navire AS vessel_phone_2,
nf.tel_fixe_3_contact_navire AS vessel_phone_3,
nf.tel_mobile_contact_navire AS vessel_mobile_phone,
nf.fax AS vessel_fax,
REPLACE(nf.num_telephone, ' ', '') AS vessel_phone_1,
REPLACE(nf.tel_fixe_2_contact_navire, ' ', '') AS vessel_phone_2,
REPLACE(nf.tel_fixe_3_contact_navire, ' ', '') AS vessel_phone_3,
REPLACE(nf.tel_mobile_contact_navire, ' ', '') AS vessel_mobile_phone,
REPLACE(nf.fax, ' ', '') AS vessel_fax,
nf.telex AS vessel_telex,
LOWER(nf.email1) AS vessel_email_1,
LOWER(nf.email2) AS vessel_email_2,
Expand Down
18 changes: 9 additions & 9 deletions datascience/src/pipeline/queries/ocan/non_eu_vessels.sql
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ SELECT
ne.longueur_hors_tout AS length,
nep.jauge_ums AS gauge,
nep.puissance_propulsion AS power,
ne.tel_fixe_1_contact_navire AS vessel_phone_1,
ne.tel_fixe_2_contact_navire AS vessel_phone_2,
ne.tel_fixe_3_contact_navire AS vessel_phone_3,
ne.tel_mobile_contact_navire AS vessel_mobile_phone,
ne.fax_contact_navire AS vessel_fax,
REPLACE(ne.tel_fixe_1_contact_navire, ' ', '') AS vessel_phone_1,
REPLACE(ne.tel_fixe_2_contact_navire, ' ', '') AS vessel_phone_2,
REPLACE(ne.tel_fixe_3_contact_navire, ' ', '') AS vessel_phone_3,
REPLACE(ne.tel_mobile_contact_navire, ' ', '') AS vessel_mobile_phone,
REPLACE(ne.fax_contact_navire, ' ', '') AS vessel_fax,
ne.telex_contact_navire AS vessel_telex,
LOWER(ne.courriel_1_contact_navire) AS vessel_email_1,
LOWER(ne.courriel_2_contact_navire) AS vessel_email_2,
INITCAP(ne.nom_raison_sociale_armateur) AS operator_name,
LOWER(ne.courriel_1_armateur) AS operator_email_1,
LOWER(ne.courriel_2_armateur) AS operator_email_2,
ne.tel_fixe_1_armateur AS operator_phone_1,
ne.tel_fixe_2_armateur AS operator_phone_2,
ne.tel_mobile_armateur AS operator_mobile_phone,
ne.fax_armateur AS operator_fax,
REPLACE(ne.tel_fixe_1_armateur, ' ', '') AS operator_phone_1,
REPLACE(ne.tel_fixe_2_armateur, ' ', '') AS operator_phone_2,
REPLACE(ne.tel_mobile_armateur, ' ', '') AS operator_mobile_phone,
REPLACE(ne.fax_armateur, ' ', '') AS operator_fax,
INITCAP(ne.nom_proprietaire) AS proprietor_name,
eng_1.code as fishing_gear_main,
eng_2.code as fishing_gear_secondary
Expand Down

0 comments on commit 0ed37d6

Please sign in to comment.