Changes between Initial Version and Version 1 of ImportContent


Ignore:
Timestamp:
Feb 3, 2010, 12:53:52 PM (15 years ago)
Author:
fknauft
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ImportContent

    v1 v1  
     1back to  - [[https://it-dev.mpiwg-berlin.mpg.de/tracs/GIS/wiki/SystInst System Installation]]
     2== Import of Content-Data into PostGis ==
     3=== FrameMaker-Tables ===
     4  * Export the table with FrameMaker to *.csv with "UTF-16"
     5  * Open the *.csv in TextWrangler, save with "UTF-8"
     6  * copy the following sql-Script to pgAdmin3 and run it there [[BR]]
     7 or [[BR]]
     8 save the script as <*.sql>, open the directory in a terminal and run it with:
     9{{{
     10  Developer/usr/local/pgsql/bin/psql -f <*.sql> -d <databasename>
     11}}}
     12
     13 !! All the attributes will be of type "text" (for now), as in some datasets the dates
     14 are empty and PostgreSQL does not like this !! [[BR]]
     15
     16{{{
     17-- Table: craftsmanlabels
     18
     19DROP TABLE craftsmanlabels;
     20
     21CREATE TABLE craftsmanlabels
     22(
     23  id SERIAL,
     24  "callno" text,
     25  "object" text,
     26  "kind" text,
     27  "title" text,
     28  "dynasty" text,
     29  "reign period" text,
     30  "production begin year" text,
     31  "production end year" text,
     32  "found place" text,
     33  "found province" text,
     34  "found date" text,
     35  "production place" text,
     36  "production place GIS id" text,
     37  "accuracy of gis id" text,
     38  "production institution" text,
     39  "inscription chinese" text,
     40  "inscription pinyin" text,
     41  "inscription translation" text,
     42  "position" text,
     43  "remark" text,
     44  "inscription type" text,
     45  CONSTRAINT id PRIMARY KEY (id)
     46)
     47WITH (OIDS=FALSE);
     48ALTER TABLE craftsmanlabels OWNER TO postgres;
     49
     50COPY craftsmanlabels(
     51            "callno", "object", "kind", "title", "dynasty", "reign period", "production begin year",
     52            "production end year", "found place", "found province", "found date",
     53            "production place", "production place GIS id", "accuracy of gis id",
     54            "production institution", "inscription chinese", "inscription pinyin",
     55            "inscription translation", "position", "remark", "inscription type")
     56    FROM '/Users/fknauft/Projekt/RawData/craftsmanlabels1.csv' WITH CSV
     57    FORCE NOT NULL "production begin year", "production end year", "found date";
     58}}}
     59
     60==== Single Datasets via WebBrowser-based Entry-Mask ====
     61[[http://culhis.mpiwg-berlin.mpg.de/doku.php/gis/craftman_labels_project:craftsman_label_project Craftsman labels]]