diff --git a/content/post/2017-03.md b/content/post/2017-03.md index 9ee46f790..30103ffb3 100644 --- a/content/post/2017-03.md +++ b/content/post/2017-03.md @@ -211,8 +211,22 @@ $ ./fix-metadata-values.py -i ccafs-flagships-feb7.csv -f cg.subject.ccafs -t co - Also, I generated a list of all CCAFS flagships because there are a dozen or so more than there should be: ``` -dspacetest=# dspacetest=# \copy (select distinct text_value, count(*) from metadatavalue where resource_type_id=2 and metadata_field_id=210 group by text_value order by count desc) to /tmp/ccafs.csv with csv; +dspace=# \copy (select distinct text_value, count(*) from metadatavalue where resource_type_id=2 and metadata_field_id=210 group by text_value order by count desc) to /tmp/ccafs.csv with csv; ``` - I sent a list to CCAFS people so they can tell me if some should be deleted or moved, etc - Test, squash, and merge Sisay's RTB theme into `5_x-prod`: https://github.com/ilri/DSpace/pull/316 + +## 2017-03-29 + +- Dump a list of fields in the DC and CG schemas to compare with CG Core: + +``` +dspace=# select case when metadata_schema_id=1 then 'dc' else 'cg' end as schema, element, qualifier, scope_note from metadatafieldregistry where metadata_schema_id in (1, 2); +``` + +- Ooh, a better one! + +``` +dspace=# select coalesce(case when metadata_schema_id=1 then 'dc.' else 'cg.' end) || concat_ws('.', element, qualifier) as field, scope_note from metadatafieldregistry where metadata_schema_id in (1, 2); +``` diff --git a/public/2017-03/index.html b/public/2017-03/index.html index 0d16bcc5e..4d6fd326f 100644 --- a/public/2017-03/index.html +++ b/public/2017-03/index.html @@ -37,7 +37,7 @@ $ identify ~/Desktop/alc_contrastes_desafios.jpg - + @@ -94,13 +94,13 @@ $ identify ~/Desktop/alc_contrastes_desafios.jpg "headline": "March, 2017", "url": "https://alanorth.github.io/cgspace-notes/2017-03/", - "wordCount": "1428", + "wordCount": "1494", "datePublished": "2017-03-01T17:08:52+02:00", - "dateModified": "2017-03-24T14:27:31+02:00", + "dateModified": "2017-03-28T18:39:09+03:00", "author": { @@ -418,7 +418,7 @@ $ ./delete-metadata-values.py -i Investors-Delete-121.csv -f dc.description.spon
  • Also, I generated a list of all CCAFS flagships because there are a dozen or so more than there should be:
  • -
    dspacetest=# dspacetest=# \copy (select distinct text_value, count(*) from metadatavalue where resource_type_id=2 and metadata_field_id=210 group by text_value order by count desc) to /tmp/ccafs.csv with csv;
    +
    dspace=# \copy (select distinct text_value, count(*) from metadatavalue where resource_type_id=2 and metadata_field_id=210 group by text_value order by count desc) to /tmp/ccafs.csv with csv;
     
    +

    2017-03-29

    + + + +
    dspace=# select case when metadata_schema_id=1 then 'dc' else 'cg' end as schema, element, qualifier, scope_note from metadatafieldregistry where metadata_schema_id in (1, 2);
    +
    + + + +
    dspace=# select coalesce(case when metadata_schema_id=1 then 'dc.' else 'cg.' end) || concat_ws('.', element, qualifier) as field, scope_note from metadatafieldregistry where metadata_schema_id in (1, 2);
    +
    + diff --git a/public/index.xml b/public/index.xml index 125053a06..1519d99d0 100644 --- a/public/index.xml +++ b/public/index.xml @@ -264,13 +264,29 @@ $ ./delete-metadata-values.py -i Investors-Delete-121.csv -f dc.description.spon <li>Also, I generated a list of all CCAFS flagships because there are a dozen or so more than there should be:</li> </ul> -<pre><code>dspacetest=# dspacetest=# \copy (select distinct text_value, count(*) from metadatavalue where resource_type_id=2 and metadata_field_id=210 group by text_value order by count desc) to /tmp/ccafs.csv with csv; +<pre><code>dspace=# \copy (select distinct text_value, count(*) from metadatavalue where resource_type_id=2 and metadata_field_id=210 group by text_value order by count desc) to /tmp/ccafs.csv with csv; </code></pre> <ul> <li>I sent a list to CCAFS people so they can tell me if some should be deleted or moved, etc</li> <li>Test, squash, and merge Sisay&rsquo;s RTB theme into <code>5_x-prod</code>: <a href="https://github.com/ilri/DSpace/pull/316">https://github.com/ilri/DSpace/pull/316</a></li> -</ul> +</ul> + +<h2 id="2017-03-29">2017-03-29</h2> + +<ul> +<li>Dump a list of fields in the DC and CG schemas to compare with CG Core:</li> +</ul> + +<pre><code>dspace=# select case when metadata_schema_id=1 then 'dc' else 'cg' end as schema, element, qualifier, scope_note from metadatafieldregistry where metadata_schema_id in (1, 2); +</code></pre> + +<ul> +<li>Ooh, a better one!</li> +</ul> + +<pre><code>dspace=# select coalesce(case when metadata_schema_id=1 then 'dc.' else 'cg.' end) || concat_ws('.', element, qualifier) as field, scope_note from metadatafieldregistry where metadata_schema_id in (1, 2); +</code></pre> diff --git a/public/post/index.xml b/public/post/index.xml index e56a728c2..25fac7e16 100644 --- a/public/post/index.xml +++ b/public/post/index.xml @@ -264,13 +264,29 @@ $ ./delete-metadata-values.py -i Investors-Delete-121.csv -f dc.description.spon <li>Also, I generated a list of all CCAFS flagships because there are a dozen or so more than there should be:</li> </ul> -<pre><code>dspacetest=# dspacetest=# \copy (select distinct text_value, count(*) from metadatavalue where resource_type_id=2 and metadata_field_id=210 group by text_value order by count desc) to /tmp/ccafs.csv with csv; +<pre><code>dspace=# \copy (select distinct text_value, count(*) from metadatavalue where resource_type_id=2 and metadata_field_id=210 group by text_value order by count desc) to /tmp/ccafs.csv with csv; </code></pre> <ul> <li>I sent a list to CCAFS people so they can tell me if some should be deleted or moved, etc</li> <li>Test, squash, and merge Sisay&rsquo;s RTB theme into <code>5_x-prod</code>: <a href="https://github.com/ilri/DSpace/pull/316">https://github.com/ilri/DSpace/pull/316</a></li> -</ul> +</ul> + +<h2 id="2017-03-29">2017-03-29</h2> + +<ul> +<li>Dump a list of fields in the DC and CG schemas to compare with CG Core:</li> +</ul> + +<pre><code>dspace=# select case when metadata_schema_id=1 then 'dc' else 'cg' end as schema, element, qualifier, scope_note from metadatafieldregistry where metadata_schema_id in (1, 2); +</code></pre> + +<ul> +<li>Ooh, a better one!</li> +</ul> + +<pre><code>dspace=# select coalesce(case when metadata_schema_id=1 then 'dc.' else 'cg.' end) || concat_ws('.', element, qualifier) as field, scope_note from metadatafieldregistry where metadata_schema_id in (1, 2); +</code></pre> diff --git a/public/sitemap.xml b/public/sitemap.xml index b9ed9bb90..213584ff6 100644 --- a/public/sitemap.xml +++ b/public/sitemap.xml @@ -3,7 +3,7 @@ https://alanorth.github.io/cgspace-notes/2017-03/ - 2017-03-24T14:27:31+02:00 + 2017-03-28T18:39:09+03:00 @@ -88,19 +88,19 @@ https://alanorth.github.io/cgspace-notes/ - 2017-03-24T14:27:31+02:00 + 2017-03-28T18:39:09+03:00 0 https://alanorth.github.io/cgspace-notes/tags/notes/ - 2017-03-24T14:27:31+02:00 + 2017-03-28T18:39:09+03:00 0 https://alanorth.github.io/cgspace-notes/post/ - 2017-03-24T14:27:31+02:00 + 2017-03-28T18:39:09+03:00 0 diff --git a/public/tags/notes/index.xml b/public/tags/notes/index.xml index 6eaa77fcc..9e6a736b0 100644 --- a/public/tags/notes/index.xml +++ b/public/tags/notes/index.xml @@ -263,13 +263,29 @@ $ ./delete-metadata-values.py -i Investors-Delete-121.csv -f dc.description.spon <li>Also, I generated a list of all CCAFS flagships because there are a dozen or so more than there should be:</li> </ul> -<pre><code>dspacetest=# dspacetest=# \copy (select distinct text_value, count(*) from metadatavalue where resource_type_id=2 and metadata_field_id=210 group by text_value order by count desc) to /tmp/ccafs.csv with csv; +<pre><code>dspace=# \copy (select distinct text_value, count(*) from metadatavalue where resource_type_id=2 and metadata_field_id=210 group by text_value order by count desc) to /tmp/ccafs.csv with csv; </code></pre> <ul> <li>I sent a list to CCAFS people so they can tell me if some should be deleted or moved, etc</li> <li>Test, squash, and merge Sisay&rsquo;s RTB theme into <code>5_x-prod</code>: <a href="https://github.com/ilri/DSpace/pull/316">https://github.com/ilri/DSpace/pull/316</a></li> -</ul> +</ul> + +<h2 id="2017-03-29">2017-03-29</h2> + +<ul> +<li>Dump a list of fields in the DC and CG schemas to compare with CG Core:</li> +</ul> + +<pre><code>dspace=# select case when metadata_schema_id=1 then 'dc' else 'cg' end as schema, element, qualifier, scope_note from metadatafieldregistry where metadata_schema_id in (1, 2); +</code></pre> + +<ul> +<li>Ooh, a better one!</li> +</ul> + +<pre><code>dspace=# select coalesce(case when metadata_schema_id=1 then 'dc.' else 'cg.' end) || concat_ws('.', element, qualifier) as field, scope_note from metadatafieldregistry where metadata_schema_id in (1, 2); +</code></pre>