Changes between Version 4 and Version 5 of DatabaseBasedAnalysis/table2sql


Ignore:
Timestamp:
08/07/18 16:42:59 (6 years ago)
Author:
tbretz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DatabaseBasedAnalysis/table2sql

    v4 v5  
    182182A specialty of FITS-extensions is that they can contains fixed-size arrays of numbers. If the array is called ARR and has 3 fields, the SQL columns will be called ARR[0], ARR[1] and ARR[2]. All modifier options working on columns always alter all corresponding columns at once.
    183183
    184 
    185 
     184== Example ==
     185
     186For example, my resource file to convert ''ganymed'' files to SQL tables looks like this:
     187
     188{{{
     189# Database uri and credentials
     190#uri=...
     191
     192# Regular expression to match columns which shell be ignored
     193ignore=ThetaSquared\..*     
     194ignore=Ghostbuster\..*
     195ignore=MHillasSrc\..*
     196ignore=MHillasSrcAnti\..*
     197ignore=MSrcPosCam\..*
     198ignore=MSrcPosAnti\..*
     199ignore=DataType\..*
     200ignore=.*\.fUniqueID
     201ignore=.*\.fBits
     202ignore=MPointingPos\.fHa
     203
     204# Regular expressions to simplify column names in table
     205map=\.fVal/
     206map=MHillas\.f/
     207map=MHillasExt\.f/
     208map=MPointingPos\.f/
     209map=MImagePar\.f/
     210map=MNewImagePar\.f/
     211map=MTime\.fTime\.f/
     212map=MTime\.f/
     213
     214# Overwrites the SQL data type for some columns
     215sql-type=FileId/INT UNSIGNED
     216sql-type=EvtNumber/INT UNSIGNED
     217
     218# Columsn to be setup as primary keys
     219primary=FileId
     220primary=EvtNumber
     221}}}
     222
     223
     224