Project

General

Profile

« Previous | Next » 

Revision 5031

input.Makefile: Staging tables installation: `%/install: %/create.sql`: Don't add a row number column to the created table because it is now added automatically to the temp table by column-based import (row-based import now also does not require a pkey for DB inputs)

View differences:

inputs/VegBank/plot_/VegBIEN.csv
56 56
reference_id,,** No join mapping for *reference_id ** 
57 57
revisions,,** No join mapping for *revisions ** 
58 58
rocktype,,** No join mapping for *rocktype ** 
59
row_num,,** No join mapping for *row_num ** 
60 59
standsize,,** No join mapping for *standsize ** 
61 60
submitter_email,,** No join mapping for *submitter_email ** 
62 61
submitter_givenname,,** No join mapping for *submitter_givenname ** 
inputs/REMIB/Specimen/header.csv
1
acronym,accession_number,family,genus,specificEpithet,country,state,county,locality,long_deg,long_min,long_sec,lat_deg,lat_min,lat_sec,coll_day,coll_month,coll_year,collector,habitat,preparation,row_num
1
acronym,accession_number,family,genus,specificEpithet,country,state,county,locality,long_deg,long_min,long_sec,lat_deg,lat_min,lat_sec,coll_day,coll_month,coll_year,collector,habitat,preparation
inputs/CTFS/StemObservation/header.csv
1
FamilyID,GenusID,SpeciesID,SubSpeciesID,TreeID,StemID,MeasureID,CensusID,DBH,HOM,PrimaryStem,ExactDate,StemTag,StemDescription,QuadratID,PlotID,Tag,x,y,SubSpeciesCurrentTaxonFlag,SubSpeciesObsoleteTaxonFlag,SubSpeciesName,SubSpeciesMnemonic,SubSpeciesAuthority,InfraSpecificLevel,SpeciesCurrentTaxonFlag,SpeciesObsoleteTaxonFlag,SpeciesReferenceID,SpeciesName,SpeciesMnemonic,SpeciesAuthority,IDLevel,FieldFamily,Description,Genus,GenusReferenceID,GenusAuthority,Family,ReferenceID,row_num
1
FamilyID,GenusID,SpeciesID,SubSpeciesID,TreeID,StemID,MeasureID,CensusID,DBH,HOM,PrimaryStem,ExactDate,StemTag,StemDescription,QuadratID,PlotID,Tag,x,y,SubSpeciesCurrentTaxonFlag,SubSpeciesObsoleteTaxonFlag,SubSpeciesName,SubSpeciesMnemonic,SubSpeciesAuthority,InfraSpecificLevel,SpeciesCurrentTaxonFlag,SpeciesObsoleteTaxonFlag,SpeciesReferenceID,SpeciesName,SpeciesMnemonic,SpeciesAuthority,IDLevel,FieldFamily,Description,Genus,GenusReferenceID,GenusAuthority,Family,ReferenceID
inputs/CTFS/StemObservation/map.csv
38 38
GenusAuthority,*GenusAuthority,,
39 39
Family,family,,
40 40
ReferenceID,*ReferenceID,,
41
row_num,*row_num,,
inputs/CTFS/StemObservation/VegBIEN.csv
54 54
SubSpeciesMnemonic,,** No join mapping for *SubSpeciesMnemonic ** 
55 55
SubSpeciesObsoleteTaxonFlag,,** No join mapping for *SubSpeciesObsoleteTaxonFlag ** 
56 56
TreeID,,** No join mapping for *TreeID ** 
57
row_num,,** No join mapping for *row_num ** 
inputs/CTFS/StemObservation/unmapped_terms.csv
22 22
*GenusReferenceID
23 23
*GenusAuthority
24 24
*ReferenceID
25
*row_num
inputs/CTFS/TaxonOccurrence/header.csv
1
FamilyID,GenusID,SpeciesID,SubSpeciesID,SpeciesInvID,CensusID,PlotID,SubSpeciesCurrentTaxonFlag,SubSpeciesObsoleteTaxonFlag,SubSpeciesName,SubSpeciesMnemonic,SubSpeciesAuthority,InfraSpecificLevel,SpeciesCurrentTaxonFlag,SpeciesObsoleteTaxonFlag,SpeciesReferenceID,SpeciesName,SpeciesMnemonic,SpeciesAuthority,IDLevel,FieldFamily,Description,Genus,GenusReferenceID,GenusAuthority,Family,ReferenceID,row_num
1
FamilyID,GenusID,SpeciesID,SubSpeciesID,SpeciesInvID,CensusID,PlotID,SubSpeciesCurrentTaxonFlag,SubSpeciesObsoleteTaxonFlag,SubSpeciesName,SubSpeciesMnemonic,SubSpeciesAuthority,InfraSpecificLevel,SpeciesCurrentTaxonFlag,SpeciesObsoleteTaxonFlag,SpeciesReferenceID,SpeciesName,SpeciesMnemonic,SpeciesAuthority,IDLevel,FieldFamily,Description,Genus,GenusReferenceID,GenusAuthority,Family,ReferenceID
inputs/CTFS/TaxonOccurrence/map.csv
26 26
GenusAuthority,*GenusAuthority,,
27 27
Family,family,,
28 28
ReferenceID,*ReferenceID,,
29
row_num,*row_num,,
inputs/CTFS/TaxonOccurrence/VegBIEN.csv
36 36
SubSpeciesID,,** No join mapping for *SubSpeciesID ** 
37 37
SubSpeciesMnemonic,,** No join mapping for *SubSpeciesMnemonic ** 
38 38
SubSpeciesObsoleteTaxonFlag,,** No join mapping for *SubSpeciesObsoleteTaxonFlag ** 
39
row_num,,** No join mapping for *row_num ** 
inputs/CTFS/TaxonOccurrence/unmapped_terms.csv
17 17
*GenusReferenceID
18 18
*GenusAuthority
19 19
*ReferenceID
20
*row_num
inputs/CTFS/Plot/header.csv
1
CountryID,PlotID,PlotName,LocationName,Latitude,Longitude,Elevation,ReferenceX,ReferenceY,SizeOfSite,ShapeOfSite,DescriptionOfSite,CountryName,row_num
1
CountryID,PlotID,PlotName,LocationName,Latitude,Longitude,Elevation,ReferenceX,ReferenceY,SizeOfSite,ShapeOfSite,DescriptionOfSite,CountryName
inputs/CTFS/Plot/map.csv
20 20
ShapeOfSite,footprintWKT,,
21 21
DescriptionOfSite,locality,,
22 22
CountryName,country,,
23
row_num,*row_num,,
inputs/CTFS/Plot/VegBIEN.csv
27 27
CountryID,,** No join mapping for *CountryID ** 
28 28
ReferenceX,,** No join mapping for *ReferenceX ** Rarely used
29 29
ReferenceY,,** No join mapping for *ReferenceY ** Rarely used
30
row_num,,** No join mapping for *row_num ** 
inputs/CTFS/Plot/unmapped_terms.csv
1 1
*CountryID
2 2
*ReferenceX
3 3
*ReferenceY
4
*row_num
inputs/input.Makefile
222 222
%/install %/header.csv: %/create.sql _always
223 223
	($(inDatasrc); echo 'CREATE TABLE "$*" AS'; cat $<; echo ';')|"time" \
224 224
$(psqlAsBien) --echo-all --set=table='"$*"' $(logInstall*)
225
	-$(addRowNum)
226 225
	$(exportHeader)
227
# ignore errors if create.sql already added a primary key
228
addRowNum = echo 'ALTER TABLE "$(datasrc)"."$*"\
229
ADD COLUMN row_num serial NOT NULL PRIMARY KEY;'|$(psqlAsBien) $(logInstall*Add)
230 226

  
231 227
%/install: _always
232 228
	$(if $(isRef),$(exportHeader),$(if $(nonXml),$(import_install_)))
inputs/VegBank/taxonobservation_/header.csv
1
plantconcept_id,taxonobservation_id,observation_id,authorplantname,taxonobservation_reference_id,taxoninferencearea,emb_taxonobservation,int_origplantconcept_id,int_origplantscifull,int_origplantscinamenoauth,int_origplantcommon,int_origplantcode,int_currplantconcept_id,int_currplantscifull,int_currplantscinamenoauth,int_currplantcommon,int_currplantcode,taxonobservation_accessioncode,taxoninterpretation_id,stemlocation_id,taxoninterpretation_plantname_id,party_id,role_id,interpretationtype,reference_id,originalinterpretation,currentinterpretation,taxonfit,taxonconfidence,collector_id,collectionnumber,museum_id,museumaccessionnumber,grouptype,notes,notespublic,notesmgt,revisions,interpretationdate,collectiondate,emb_taxoninterpretation,taxoninterpretation_accessioncode,plantname_id,plantconcept_reference_id,plantname,plantcode,plantdescription,d_obscount,d_currentaccepted,plantconcept_accessioncode,Kingdom,Subkingdom,Superdivision,Division,Subdivision,Class,Subclass,Order,Family,Genus,Species,Subspecies,Variety,Forma,row_num
1
plantconcept_id,taxonobservation_id,observation_id,authorplantname,taxonobservation_reference_id,taxoninferencearea,emb_taxonobservation,int_origplantconcept_id,int_origplantscifull,int_origplantscinamenoauth,int_origplantcommon,int_origplantcode,int_currplantconcept_id,int_currplantscifull,int_currplantscinamenoauth,int_currplantcommon,int_currplantcode,taxonobservation_accessioncode,taxoninterpretation_id,stemlocation_id,taxoninterpretation_plantname_id,party_id,role_id,interpretationtype,reference_id,originalinterpretation,currentinterpretation,taxonfit,taxonconfidence,collector_id,collectionnumber,museum_id,museumaccessionnumber,grouptype,notes,notespublic,notesmgt,revisions,interpretationdate,collectiondate,emb_taxoninterpretation,taxoninterpretation_accessioncode,plantname_id,plantconcept_reference_id,plantname,plantcode,plantdescription,d_obscount,d_currentaccepted,plantconcept_accessioncode,Kingdom,Subkingdom,Superdivision,Division,Subdivision,Class,Subclass,Order,Family,Genus,Species,Subspecies,Variety,Forma
inputs/VegBank/taxonobservation_/map.csv
63 63
Subspecies,subspecies,,
64 64
Variety,variety,,
65 65
Forma,forma,,
66
row_num,*row_num,,
inputs/VegBank/taxonobservation_/VegBIEN.csv
67 67
reference_id,,** No join mapping for *reference_id ** 
68 68
revisions,,** No join mapping for *revisions ** 
69 69
role_id,,** No join mapping for *role_id ** 
70
row_num,,** No join mapping for *row_num ** 
71 70
stemlocation_id,,** No join mapping for *stemlocation_id ** 
72 71
taxonconfidence,,** No join mapping for *taxonconfidence ** 
73 72
taxoninferencearea,,** No join mapping for *taxoninferencearea ** 
inputs/VegBank/taxonobservation_/unmapped_terms.csv
45 45
*Division
46 46
*Subdivision
47 47
*Subclass
48
*row_num
inputs/VegBank/plantconcept_/header.csv
1
plantconcept_id,plantname_id,plantconcept_reference_id,plantname,plantcode,plantdescription,d_obscount,d_currentaccepted,plantconcept_accessioncode,Kingdom,Subkingdom,Superdivision,Division,Subdivision,Class,Subclass,Order,Family,Genus,Species,Subspecies,Variety,Forma,row_num
1
plantconcept_id,plantname_id,plantconcept_reference_id,plantname,plantcode,plantdescription,d_obscount,d_currentaccepted,plantconcept_accessioncode,Kingdom,Subkingdom,Superdivision,Division,Subdivision,Class,Subclass,Order,Family,Genus,Species,Subspecies,Variety,Forma
inputs/VegBank/observation_/header.csv
1
observation_id,previousobs_id,plot_id,project_id,authorobscode,dateaccuracy,covermethod_id,coverdispersion,autotaxoncover,stratummethod_id,methodnarrative,taxonobservationarea,stemsizelimit,stemobservationarea,stemsamplemethod,originaldata,effortlevel,plotvalidationlevel,floristicquality,bryophytequality,lichenquality,observationnarrative,landscapenarrative,homogeneity,phenologicaspect,representativeness,standmaturity,successionalstatus,basalarea,hydrologicregime,soilmoistureregime,soildrainage,watersalinity,waterdepth,shoredistance,soildepth,organicdepth,soiltaxon_id,soiltaxonsrc,percentbedrock,percentrockgravel,percentwood,percentlitter,percentbaresoil,percentwater,percentother,nameother,treeht,shrubht,fieldht,nonvascularht,submergedht,treecover,shrubcover,fieldcover,nonvascularcover,floatingcover,submergedcover,dominantstratum,growthform1type,growthform2type,growthform3type,growthform1cover,growthform2cover,growthform3cover,totalcover,notespublic,notesmgt,revisions,obsstartdate,obsenddate,dateentered,emb_observation,interp_orig_ci_id,interp_orig_cc_id,interp_orig_sciname,interp_orig_code,interp_orig_party_id,interp_orig_partyname,interp_current_ci_id,interp_current_cc_id,interp_current_sciname,interp_current_code,interp_current_party_id,interp_current_partyname,interp_bestfit_ci_id,interp_bestfit_cc_id,interp_bestfit_sciname,interp_bestfit_code,interp_bestfit_party_id,interp_bestfit_partyname,toptaxon1name,toptaxon2name,toptaxon3name,toptaxon4name,toptaxon5name,numberoftaxa,accessioncode,soilobs_id,soilhorizon,soildepthtop,soildepthbottom,soilcolor,soilorganic,soiltexture,soilsand,soilsilt,soilclay,soilcoarse,soilph,exchangecapacity,basesaturation,soildescription,emb_soilobs,row_num
1
observation_id,previousobs_id,plot_id,project_id,authorobscode,dateaccuracy,covermethod_id,coverdispersion,autotaxoncover,stratummethod_id,methodnarrative,taxonobservationarea,stemsizelimit,stemobservationarea,stemsamplemethod,originaldata,effortlevel,plotvalidationlevel,floristicquality,bryophytequality,lichenquality,observationnarrative,landscapenarrative,homogeneity,phenologicaspect,representativeness,standmaturity,successionalstatus,basalarea,hydrologicregime,soilmoistureregime,soildrainage,watersalinity,waterdepth,shoredistance,soildepth,organicdepth,soiltaxon_id,soiltaxonsrc,percentbedrock,percentrockgravel,percentwood,percentlitter,percentbaresoil,percentwater,percentother,nameother,treeht,shrubht,fieldht,nonvascularht,submergedht,treecover,shrubcover,fieldcover,nonvascularcover,floatingcover,submergedcover,dominantstratum,growthform1type,growthform2type,growthform3type,growthform1cover,growthform2cover,growthform3cover,totalcover,notespublic,notesmgt,revisions,obsstartdate,obsenddate,dateentered,emb_observation,interp_orig_ci_id,interp_orig_cc_id,interp_orig_sciname,interp_orig_code,interp_orig_party_id,interp_orig_partyname,interp_current_ci_id,interp_current_cc_id,interp_current_sciname,interp_current_code,interp_current_party_id,interp_current_partyname,interp_bestfit_ci_id,interp_bestfit_cc_id,interp_bestfit_sciname,interp_bestfit_code,interp_bestfit_party_id,interp_bestfit_partyname,toptaxon1name,toptaxon2name,toptaxon3name,toptaxon4name,toptaxon5name,numberoftaxa,accessioncode,soilobs_id,soilhorizon,soildepthtop,soildepthbottom,soilcolor,soilorganic,soiltexture,soilsand,soilsilt,soilclay,soilcoarse,soilph,exchangecapacity,basesaturation,soildescription,emb_soilobs
inputs/VegBank/observation_/map.csv
113 113
basesaturation,baseSaturation_percent,,"""Percent base saturation"" (baseSaturation definition at <http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=soilobs&entity=dba_tabledescription&where=where_tablename>)"
114 114
soildescription,*soildescription,,
115 115
emb_soilobs,*emb_soilobs,,
116
row_num,*row_num,,
inputs/VegBank/observation_/VegBIEN.csv
88 88
previousobs_id,,** No join mapping for *previousobs_id ** 
89 89
representativeness,,** No join mapping for *representativeness ** 
90 90
revisions,,** No join mapping for *revisions ** 
91
row_num,,** No join mapping for *row_num ** 
92 91
shoredistance,,** No join mapping for *shoredistance ** 
93 92
shrubcover,,** No join mapping for *shrubcover ** 
94 93
shrubht,,** No join mapping for *shrubht ** 
inputs/VegBank/observation_/unmapped_terms.csv
97 97
*soilcoarse
98 98
*soildescription
99 99
*emb_soilobs
100
*row_num
inputs/VegBank/plot_/header.csv
1
plot_id,authorplotcode,reference_id,parent_id,reallatitude,reallongitude,locationaccuracy,confidentialitystatus,confidentialityreason,latitude,longitude,authore,authorn,authorzone,authordatum,authorlocation,locationnarrative,azimuth,dsgpoly,shape,area,standsize,placementmethod,permanence,layoutnarrative,elevation,elevationaccuracy,elevationrange,slopeaspect,minslopeaspect,maxslopeaspect,slopegradient,minslopegradient,maxslopegradient,topoposition,landform,surficialdeposits,rocktype,stateprovince,country,submitter_surname,submitter_givenname,submitter_email,notespublic,notesmgt,revisions,dateentered,emb_plot,plotrationalenarrative,accessioncode,continent,area|country|territory,region|state|province,county,quadrangle,Geographic Name,row_num
1
plot_id,authorplotcode,reference_id,parent_id,reallatitude,reallongitude,locationaccuracy,confidentialitystatus,confidentialityreason,latitude,longitude,authore,authorn,authorzone,authordatum,authorlocation,locationnarrative,azimuth,dsgpoly,shape,area,standsize,placementmethod,permanence,layoutnarrative,elevation,elevationaccuracy,elevationrange,slopeaspect,minslopeaspect,maxslopeaspect,slopegradient,minslopegradient,maxslopegradient,topoposition,landform,surficialdeposits,rocktype,stateprovince,country,submitter_surname,submitter_givenname,submitter_email,notespublic,notesmgt,revisions,dateentered,emb_plot,plotrationalenarrative,accessioncode,continent,area|country|territory,region|state|province,county,quadrangle,Geographic Name
inputs/VegBank/plot_/map.csv
55 55
county,county,,
56 56
quadrangle,*quadrangle,,
57 57
Geographic Name,*Geographic Name,,
58
row_num,*row_num,,
inputs/VegBank/plot_/unmapped_terms.csv
28 28
*accessioncode
29 29
*quadrangle
30 30
*Geographic Name
31
*row_num

Also available in: Unified diff