Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.2.1 - Correction mineures - fct_c_get_or_insert_dataset_from_shortname #8

Open
pierre56 opened this issue Oct 28, 2021 · 0 comments

Comments

@pierre56
Copy link

Bonjour,
En tentant de faire tourner les scripts, ce que je n'ai pas encore réussi en totalité.
Je pense avoir trouvé plusieurs coquilles.

fct_c_get_or_insert_dataset_from_shortname

1 - nb param

Dans 02_metadata, la function prend 3 param alors que dans 09a_init_data_metadata. Il n'y en a que 2, ce qui cause une erreur.

function src_faune.fct_c_get_or_insert_dataset_from_shortname(text, text) does not exist
  Indice : No function matches the given name and argument types. You might need to add explicit type casts.
  Position : 15

2 - Nom function

dans 09a_init_data_metadata, la function appelée est fct_get_or_insert_dataset_from_shortname au lieu de fct_c_get_or_insert_dataset_from_shortname


SELECT
    src_lpodatas.fct_get_or_insert_dataset_from_shortname(
            gn_commons.get_default_parameter('visionature_default_acquisition_framework'),
            gn_commons.get_default_parameter('visionature_default_dataset'));

3 - Insert dans dataset

Il y a une coquille dans 02_metadata, mauvais appel d'une variable définie.

INSERT INTO
            gn_meta.t_datasets ( id_acquisition_framework
                               , dataset_name
                               , dataset_shortname
                               , dataset_desc
                               , marine_domain
                               , terrestrial_domain
                               , additional_data
                               , meta_create_date)
            VALUES
                ( src_lpodatas.fct_c_get_id_acquisition_framework_by_name(gn_commons.get_default_parameter(_default_acquisition_framework))
                , '[' || the_shortname || '] Jeu de données compléter'
                , the_shortname
                , 'A compléter'
                , FALSE
                , TRUE
                , jsonb_build_object('standard_name', the_shortname)
                , now())
            RETURNING id_dataset INTO the_id_dataset;

Correction possible pour être en cohérence avec 09a_init_data_metadata

select gn_commons.get_default_parameter(_default_acquisition_framework);
--devient
select gn_commons.get_default_parameter('visionature_default_acquisition_framework') ;

4 -


 SELECT
        coalesce(_shortname, gn_commons.get_default_parameter(_default_dataset))
        INTO the_shortname;

Même probleme que 3

select gn_commons.get_default_parameter(_default_dataset);
-- devient
select gn_commons.get_default_parameter('visionature_default_dataset');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant