Update notes for 2017-02-28

This commit is contained in:
2017-02-28 22:58:29 +02:00
parent a3f0d88945
commit 56a24bf456
5 changed files with 59 additions and 9 deletions

View File

@ -372,8 +372,18 @@ COPY 1968
</code></pre>
<ul>
<li>And then using awk or uniq to either remove or print the lines that have a duplicate <code>resource_id</code> (meaning they belong to the same item in DSpace and are therefore duplicates), and then using the <code>metadata_value_id</code> to delete them</li>
&lt;/ul&gt;</description>
&lt;li&gt;And then use awk to print the duplicate lines to a separate file:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ awk -F&#39;,&#39; &#39;seen[$1]++&#39; /tmp/ciat.csv &amp;gt; /tmp/ciat-dupes.csv
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;From that file I can create a list of 279 deletes and put them in a batch script like:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;delete from metadatavalue where resource_type_id=2 and metadata_field_id=3 and metadata_value_id=2742061;
&lt;/code&gt;&lt;/pre&gt;</description>
</item>
<item>