SlideShare une entreprise Scribd logo
1  sur  38
Pan-European infrastructure for Ocean & Marine Data management
An EU Integrated research Infrastructure Initiative (I3)
How to implement CDI ?
M. Fichaut, V. Tosello
Training course - June 2007, Oostende, Belgium
15/08/13
How to proceed with the files for training
In the shared directory :
With 2 files
 CDI_implementation.ppt : this presentation
 training2_programme.doc : programme sent by email
And 5 directories :
 CDI documentation
Detailed documentation on CDI and mapping
 Example database
3 directories for ACCESS, MySQL and EXCEL database
 Exercises
 Mikado
Mikado software and configuration files
 Solutions
Solution of the exercises, empty now, will be filled during the training after
each exercises session
Now : Copy the common directory on your computer
15/08/13
Example database (1)
10 tables describing : the stations of datasets collected during cruises
 5 cruises on 2 ships, 10 datasets, 1399 stations
 the datasets are either CTD or Bottle stations (mikado_dataset.database_id)
 Measured parameters are linked to the datasets (mikado_dataset_parameter)
 Mapping with common vocabularies is made through mapping tables
(mikado_map_…)
Document : example_databaseexample_database_description.rtf
15/08/13
Example database (1)
One database in several environments
On Microsoft ACCESS
 accesscdi_training_course_2.mdb
On MySQL
 Name of the database : mikado, user : mikado, password :
mikado
On EXCEL
 excel cdi_training_course_2.xls
15/08/13
First set of Exercises
Manipulate the example database in different
environments
 Exercise 1 : MySQL database
 Exercise 2 : ACCESS database
 Exercise 3 : Excel file
15/08/13
CDI implementation progress
USER
LOCAL
DATABASE
ACCESS
MYSQL
EXCEL
EXCEL FILES
STATION METADATA
(CTDs, Bottles, Current meters, …)
15/08/13
Generating the CDI - First STEP
MAP YOUR DATABASE to THE CDI FIELDS
15/08/13
Database mapping to XML schema (1)
Using the documents :
 CDI documentation CDI_XML_V0_documentation_3_00_June2007.doc:
Metadata Format and full description of XML schema version 2.04 – as
prepared in Sea-Search
 CDI documentation CDI_V1_04_mapping.xls :
Excel file describing the mapping between the CDI fields, ISO-19115 and the
local database
 example_databaseexample_database_description.rtf :
Description of the tables of the example database
15/08/13
On the right hand side : local database reference
 Table_name.field_name
Database mapping to XML schema (2)
Level 2 Level 3 Level 4 …
WHERE Latitude1 (var1) <dataIdInfo> (15) <geoBox> (42) <southBL> (346)
WHERE Longitude1 (var2) <dataIdInfo> (15) <geoBox> (42) <westBL> (344)
WHERE Latitude2 (var3) <dataIdInfo> (15) <geoBox> (42) <northBL> (347)
WHERE Longitude2 (var4) <dataIdInfo> (15) <geoBox> (42) <eastBL> (345)
WHERE Measuring area type (var5) <spatRepInfo> (12) <VectSpatRep> (176) <geometObjs> (178)
WHERE Data Coordinate system (var6) <refSysInfo> (13) <MdCoRefSys> (189) <datum> (192)
…
WHEN Start date (var12) <dataIdInfo> (15) <dataExt> (45) <tempEle> (337)
WHEN Start time (UT) var(12) see Start date
WHAT Parameters measured (var50) <dataIdInfo> (15) <descKeys> (33) <keyword> (53)
<KeyTyp> (54)
HOW Instrument or gear type (var42) <dataIdInfo> (15) <descKeys> (33) <keyword> (53)
<KeyTyp> (54)
HOW Type of platform (var43) <dataIdInfo> (15) <descKeys> (33) <keyword> (53)
<KeyTyp> (54)
WHO Originator (var16) <dataIdInfo> (15) <idPoc> (29) <rpOrgNameId>
(not ISO)
<role> (379)
PART CDI FIELD XML TAGS LOCAL DATABASE FIELD
(TABLE_NAME.FIELD_NAME)
On the left hand side : CDI reference
 For each : XML tree (XML tags, with ISO-19115 number)
15/08/13
Database mapping to XML schema (3)
WHERE Latitude1 (var1) MIKADO_STATION.STATION_LAT
WHERE Longitude1 (var2) MIKADO_STATION.STATION_LON
WHERE Latitude2 (var3) not relevant
WHERE Longitude2 (var4) not relevant
WHERE Measuring area type (var5)
WHERE Data Coordinate system (var6)
…
WHEN Start date (var12)
WHEN Start time (UT) var(12)
WHAT Parameters measured (var50)
HOW Instrument or gear type (var42)
HOW Type of platform (var43)
WHO Originator (var16)
PART CDI FIELD LOCAL DATABASE FIELD
(TABLE_NAME.FIELD_NAME)
Mandatory CDI fields in bold characters
Example of mapping
15/08/13
Second set of Exercises
Map the local database to the CDI fields
 Exercise 4 : Find all CDI fields mapping with
MIKADO_CRUISE table
 Exercise 5 : Find the mapping for the CDI field Data
Coordinate system and Sampling Interval
 Exercise 6 : Full mapping
 Look at the final mapping file. Questions?
15/08/13
CDI implementation progress
ISO-19115
XML SCHEMA
defined for the CDI
by SDN – TTT
USER
LOCAL
DATABASE
ORACLE
MSSERVER
MYSQL
…
EXCEL FILES
STATION METADATA
(CTDs, Bottles, Current meters, …)
MAPPING
Common
vocabularies
MAPPING
15/08/13
Principles of the CDI
ISO-19115
XML SCHEMA
defined for the CDI
by SDN – TTT
USER
LOCAL
DATABASE
ORACLE
MSSERVER
MYSQL
…
EXCEL FILES
STATION METADATA
(CTDs, Bottles, Current meters, …)
MAPPING
Central CDI
Common
vocabularies
MAPPING
TOOLS
Mikado
Others
Configuration
Files
Compliant to
XML CDI files
15/08/13
Configure Mikado - Second STEP
MAP YOUR DATABASE to THE CDI FIELDS
MIKADO CONFIGURATION
15/08/13
MIKADO : Reminder
MIKADO has been developed by IFREMER in the framework of the
SEA-SEARCH project.
MIKADO can be used to generate EDMED, CSR and CDI XML files.
MIKADO can be used into 2 different ways :
 One manual way, to input manually information for EDMED,
CSR and CDI fields in order to generate XML files.
 One automatic way, to generate these descriptions automatically
if information is catalogued in a relational database.
15/08/13
MIKADO principle
MIKADO
Java code
JDBC
Java DataBase Connectivity
JVM – Java Virtual Machine
Native Drivers
MYSQL
ORACLE
POSTGRES
SQLServer
Bridge Drivers
using Microsoft ODBC
(ACCESS, EXCEL, SQL SERVER)
DATABASE
Configuration
Files
(*.properties)
Download drivers
from web sites
if not provided with Mikado
15/08/13
List of drivers provided with Mikado
ODBC Bridge (from Java JDK 1.5)
 MS Access 97, 2000, 2003
 MS Excel
JTDS 1.1 (Open Source licence)
 Sybase 10, 11, 12, 15
 SQL Server
MySQL 3.1.10 (GPL licence)
 MySQL 4.1, 5.x
Oracle 14 (Oracle Technology Network Development and Distribution License)
 Oracle 8.1.7, 9i, 10i (with restrictions)
PostgreSQL 8.0.312 (BSD licence)
 PostgreSQL
MS SQL server 2005 driver (Microsoft download)
 SQL Server 2000 with Service Pack 1 or higher
Please note that Mikado source level is JDK 1.5
15/08/13
How to find the appropriate JDBC
driver?
Native drivers must be downloaded from the appropriate vendors
websites
(i.e Oracle, Sybase, MySQL, PostGres, …)
It must fit with the database and the JDBC versions.
This link may help you to find out the native drivers you need :
http://developers.sun.com/product/jdbc/drivers
For Oracle RDBMS , a native driver may be found on
http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html
For Microsoft SQL server, a native driver may be found on Microsoft
MSDN
http://msdn2.microsoft.com/en-us/data/default.aspx
Bridge drivers (using Microsoft-ODBC Open DataBase Connectivity) are
bundled with the Java 2 SDK.
http://java.sun.com/j2se/1.3/docs/guide/jdbc/getstart/bridge.doc.html
Drivers have then to be installed following the given recommendations
The corresponding .jar files must be copied in the mikadodist directory
15/08/13
MIKADO configuration files
See Mikado user manual
mikadosdn_Mikado_Manual_V0.1.doc
Mikado needs 2 configuration files in the
mikadoconf directory
files.properties file which contains
all the information about the name and the location of the
files used by the software
Cdi.properties file which contains:
Database connection parameters
Queries to retrieve data from the database
Mapping between the queries results (SQL variables) and
the CDI fields
15/08/13
Mikado files.properties file
All the information about the name and the location of
the files used by the software
Name of the files containing the list of
values for CDI [and EDMED and CSR] :
Parameters codes, platforms codes, …
##############
# CDI
##############
#cdiPartnerCodes
cdiPartnerCodes.file = ./conf/cdi_partner_codes.csv
#cdiMeasurementAreaTypeCodes
cdiMeasurementAreaTypeCodes.file = ./conf/cdi_measurement_codes.csv
Name of XML schemas used for CDI [and
EDMED and CSR]
#xsd
xsd.cdi = ./conf/CDI_V1_04.xsd
xsd.cdi_multirecords = ./conf/CDI_V2_01_multirecords.xsd
Name of the files used for CDI XML
automatic generation [and EDMED and
CSR]
15/08/13
Mikado cdi.properties file
3 parts in the file
 Database connection parameters
Depending on the DATABASE : ACCESS, MySQL, ORACLE
…
 Queries to extract data from the database
To be written from the mapping
 Mapping between the queries results (SQL variables) and
the CDI fields
Must not be modified!!!
15/08/13
cdi.properties file : database connection
(1)
DATABASE ACCESS JDBC (Java Data Base
Connectivity) connection parameters
###############################
JDBC parameters for querying database
###############################
bdd.query.timeout = database connection time out
bdd.className= driver Java Class Name (the *.jar file which
implement this Class Name must exist in the
mikadoconfdist directory)
bdd.connectURL = connect string to the database
bdd.user.name = user name
bdd.user.password = user password
15/08/13
cdi.properties file : database connection
(2)
Examples of ODBC bridge drivers
ACCESS database
bdd.className = sun.jdbc.odbc.JdbcOdbcDriver
bdd.connectURL =jdbc:odbc:Driver={Microsoft Access Driver
(*.mdb)};DBQ=N://example_database/access/cdi_training_course_2.mdb
bdd.user.name =
bdd.user.password =
EXCEL file
bdd.className = sun.jdbc.odbc.JdbcOdbcDriver
bdd.connectURL =jdbc:odbc:Driver={Microsoft Excel Driver
(*.xls)};DBQ=X:/example_database/excel/cdi_training_course_2.xls
bdd.user.name =
bdd.user.password =
MS SERVEUR
Not recommended, use native driver
15/08/13
cdi.properties file : database connection
(3)
Examples of Native drivers
MySQL database
bdd.className = com.mysql.jdbc.Driver
bdd.connectURL = jdbc:mysql://localhost/mikado
bdd.user.name = mikado
bdd.user.password = mikado
ORACLE
bdd.className = oracle.jdbc.OracleDriver
bdd.connectURL = jdbc:oracle:thin:@server:port:instance
User and password must be provided
Example : jdbc:oracle:thin:@josephine.ifremer.fr:1521:btest920
• MS SERVER
bdd.className = com.microsoft. jdbc.sqlserver. SQLServerDriver
bdd.connectURL =
jdbc:sqlserver://serverName;instanceName:portNumber;property=value[;property=valu
e]
User and password must be provided
Example :
jdbc:sqlserveur://www.bkrclass.org:1065;databaseName=io_mikado;
integratedSecurity=false;
15/08/13
cdi.properties file : mapping
Mapping of the query results to the CDI fields
Mapping table : SQL variables = CDI fields
var1 = southLatitude
var2 = westLongitude
var3 = northLatitude
…..
var42 = instrumentOrGearType
var43 = typeOfPlatform
var50 = parametersMeasured.value
WHERE Latitude1 (var1) MIKADO_STATION.STATION_LAT
WHERE Longitude1 (var2) MIKADO_STATION.STATION_LON
WHERE Latitude2 (var3) not relevant
WHERE Longitude2 (var4) not relevant
PART CDI FIELD LOCAL DATABASE FIELD
(TABLE_NAME.FIELD_NAME)
Must not be
changed
15/08/13
cdi.properties file : SQL queries (1)
Main query
 It is the query which identifies all CDI entries that must be exported.
This request must return only one column which is the identifier of
each entry and that will be used for sub-queries.
 SQL syntax must be adapted to your local database
############################
# Main query (station identifier list)
############################
query.=select mikado_station.station_id from mikado_station
15/08/13
cdi.properties file : SQL queries (2)
Sub-queries
 For each row of the main query, it is possible to define single or
multi sub-queries.
Single sub-queries : return one row for each row of the main query
(ex: dataset_id, cruise_name)
Multi sub-queries : return several rows for each row of the main
query (ex: parameters).
 The links between the fields of the database and the variables of
the mapping (var1 to varN) table have to be defined in theses
sub-queries as synonyms of the selected columns
15/08/13
cdi.properties file : SQL queries (3)
Single Sub-queries : return one row
The number of single sub-queries must be
defined
queries.single.number=5
The keyword for single sub-queries is :
queries.single.i=
where i varies from 1 to queries.single.number
Example :
queries.single.1 = select tabA.colX var1 from tabA where
tableA.colY= :$
var1 = synonym for the column name from the mapping table
:$ = the identifier of the row returned by the main query
15/08/13
cdi.properties file : SQL queries (4)
Multiple Sub-queries : return several rows
All the names of the multi sub-queries are
defined and must not be changed
For CDI one multi sub-query is defined
The keyword is :
queries.multi.parametersMeasured =
Example :
queries.multi.parametersMeasured =select tabA.colX var50 from
tabA, tabB where tabB.colX = :$ and tabB.colY = tabA.colZ
var50 = synonym for the column name from the mapping table
:$ = the identifier of the row returned by the main query
15/08/13
Third set of Exercises
Write the cdi.properties files for ACCESS or MY SQL or
EXCEL files
In the exercises only the stations of the Cruise « CITHER2 LEG 1 » will
selected to have a smaller number of stations
 Exercise 7 : Look at the main query. Questions?
 Exercise 8 : Fulfil the missing information in query.single.1.
Query on MIKADO_DATASET table
 Exercise 9 : Fulfil the missing information in query.single.2.
Query on MIKADO_STATION table
 Exercise 10 : Write the query.single.4 to find the
datum coordinate system
 Exercise 11 : Have a look at the final property file,
questions?
15/08/13
ISO date format
Date format must have the following syntax
 YYYY-MM-DD
 YYYY-MM-DDTHH24:MI
 YYYY-MM-DDTHH24:MI:SS
15/08/13
CDI implementation progress
ISO-19115
XML SCHEMA
defined for the CDI
by SDN – TTT
USER
LOCAL
DATABASE
ORACLE
MSSERVER
MYSQL
…
EXCEL FILES
STATION METADATA
(CTDs, Bottles, Current meters, …)
MAPPING
Common
vocabularies
MAPPING
TOOLS
Mikado
Others
Configuration
Files
15/08/13
XML files generation - Third STEP
MAP YOUR DATABASE to THE CDI FIELDS
MIKADO CONFIGURATION
Generate the XML files
15/08/13
XML CDI files generation
Use the Mikado software to create the XML CDI
files
 Make sure that you have the right « properties » files in the
mikadoconf directory files before running the software
 Change the connection to the database in the
CDI.properties file, with the path to your local database
 Run Mikado
 Import the common vocabularies lists for CDI using Mikado
: Menu configuration, library, CDI
 Create and output directory for your XML files
15/08/13
XML files check - Fourth STEP
MAP YOUR DATABASE to THE CDI FIELDS
MIKADO CONFIGURATION
Generate the XML files
Check the XML files
15/08/13
CDI implementation progress
ISO-19115
XML SCHEMA
defined for the CDI
by SDN – TTT
USER
LOCAL
DATABASE
ORACLE
MSSERVER
MYSQL
…
EXCEL FILES
STATION METADATA
(CTDs, Bottles, Current meters, …)
MAPPING
Common
vocabularies
MAPPING
TOOLS
Mikado
Others
Configuration
Files
Compliant to
XML CDI files
15/08/13
Send XML files - Fifth STEP
MAP YOUR DATABASE to THE CDI FIELDS
MIKADO CONFIGURATION
Generate the XML files
Check the XML files
Send the XML files
to central CDI
15/08/13
Fourth set of Exercises
Generate the XML CDI files and check them
 Exercise 12 : Generate the XML files with Mikado
 Exercise 13 : Check the XML files

Contenu connexe

Tendances

Optimized index structures for querying rdf from the web
Optimized index structures for querying rdf from the webOptimized index structures for querying rdf from the web
Optimized index structures for querying rdf from the webMahdi Atawneh
 
Linux training in Chandigarh
Linux training in ChandigarhLinux training in Chandigarh
Linux training in Chandigarhashish34a
 
Vsam interview questions and answers.
Vsam interview questions and answers.Vsam interview questions and answers.
Vsam interview questions and answers.Sweta Singh
 
Database application and design
Database application and designDatabase application and design
Database application and designsieedah
 
Database Performance
Database PerformanceDatabase Performance
Database PerformanceBoris Hristov
 
Oracle dba interview
Oracle dba interviewOracle dba interview
Oracle dba interviewNaveen P
 
Implementation Issue with ORDBMS
Implementation Issue with ORDBMSImplementation Issue with ORDBMS
Implementation Issue with ORDBMSSandeep Poudel
 
Apache Hive Table Partition and HQL
Apache Hive Table Partition and HQLApache Hive Table Partition and HQL
Apache Hive Table Partition and HQLRupak Roy
 
Introduction to Data Mining with R and Data Import/Export in R
Introduction to Data Mining with R and Data Import/Export in RIntroduction to Data Mining with R and Data Import/Export in R
Introduction to Data Mining with R and Data Import/Export in RYanchang Zhao
 
Recipe 5 of Data Warehouse and Business Intelligence - The null values manage...
Recipe 5 of Data Warehouse and Business Intelligence - The null values manage...Recipe 5 of Data Warehouse and Business Intelligence - The null values manage...
Recipe 5 of Data Warehouse and Business Intelligence - The null values manage...Massimo Cenci
 

Tendances (17)

Databases
DatabasesDatabases
Databases
 
Optimized index structures for querying rdf from the web
Optimized index structures for querying rdf from the webOptimized index structures for querying rdf from the web
Optimized index structures for querying rdf from the web
 
Linux training in Chandigarh
Linux training in ChandigarhLinux training in Chandigarh
Linux training in Chandigarh
 
Vsam interview questions and answers.
Vsam interview questions and answers.Vsam interview questions and answers.
Vsam interview questions and answers.
 
Sql ppt
Sql pptSql ppt
Sql ppt
 
Database application and design
Database application and designDatabase application and design
Database application and design
 
Database Performance
Database PerformanceDatabase Performance
Database Performance
 
Oracle dba interview
Oracle dba interviewOracle dba interview
Oracle dba interview
 
Unit4
Unit4Unit4
Unit4
 
ADO CONTROLS - Database usage
ADO CONTROLS - Database usageADO CONTROLS - Database usage
ADO CONTROLS - Database usage
 
Unit 08 dbms
Unit 08 dbmsUnit 08 dbms
Unit 08 dbms
 
Sqlldr examples
Sqlldr examplesSqlldr examples
Sqlldr examples
 
Implementation Issue with ORDBMS
Implementation Issue with ORDBMSImplementation Issue with ORDBMS
Implementation Issue with ORDBMS
 
Apache Hive Table Partition and HQL
Apache Hive Table Partition and HQLApache Hive Table Partition and HQL
Apache Hive Table Partition and HQL
 
Introduction to Data Mining with R and Data Import/Export in R
Introduction to Data Mining with R and Data Import/Export in RIntroduction to Data Mining with R and Data Import/Export in R
Introduction to Data Mining with R and Data Import/Export in R
 
Recipe 5 of Data Warehouse and Business Intelligence - The null values manage...
Recipe 5 of Data Warehouse and Business Intelligence - The null values manage...Recipe 5 of Data Warehouse and Business Intelligence - The null values manage...
Recipe 5 of Data Warehouse and Business Intelligence - The null values manage...
 
Intake 38 10
Intake 38 10Intake 38 10
Intake 38 10
 

Similaire à Cdi implementation

Mainframe Technology Overview
Mainframe Technology OverviewMainframe Technology Overview
Mainframe Technology OverviewHaim Ben Zagmi
 
PyModESt: A Python Framework for Staging of Geo-referenced Data on the Coll...
PyModESt: A Python Framework for Staging of Geo-referenced Data on the Coll...PyModESt: A Python Framework for Staging of Geo-referenced Data on the Coll...
PyModESt: A Python Framework for Staging of Geo-referenced Data on the Coll...Andreas Schreiber
 
Reporting Summary Information of Spatial Datasets and Non-Compliance Issues U...
Reporting Summary Information of Spatial Datasets and Non-Compliance Issues U...Reporting Summary Information of Spatial Datasets and Non-Compliance Issues U...
Reporting Summary Information of Spatial Datasets and Non-Compliance Issues U...Safe Software
 
Oracle RI ETL process overview.
Oracle RI ETL process overview.Oracle RI ETL process overview.
Oracle RI ETL process overview.Puneet Kala
 
[PLCUG] Splunk - complete Citrix environment monitoring
[PLCUG] Splunk - complete Citrix environment monitoring[PLCUG] Splunk - complete Citrix environment monitoring
[PLCUG] Splunk - complete Citrix environment monitoringJaroslaw Sobel
 
Spark & Cassandra at DataStax Meetup on Jan 29, 2015
Spark & Cassandra at DataStax Meetup on Jan 29, 2015 Spark & Cassandra at DataStax Meetup on Jan 29, 2015
Spark & Cassandra at DataStax Meetup on Jan 29, 2015 Sameer Farooqui
 
Introduction to Apache Spark
Introduction to Apache SparkIntroduction to Apache Spark
Introduction to Apache SparkVincent Poncet
 
2017 10-oow-fma-application-containers-v01-final
2017 10-oow-fma-application-containers-v01-final2017 10-oow-fma-application-containers-v01-final
2017 10-oow-fma-application-containers-v01-finalMarkus Flechtner
 
Building a modern Application with DataFrames
Building a modern Application with DataFramesBuilding a modern Application with DataFrames
Building a modern Application with DataFramesDatabricks
 
Building a modern Application with DataFrames
Building a modern Application with DataFramesBuilding a modern Application with DataFrames
Building a modern Application with DataFramesSpark Summit
 
Jump Start into Apache® Spark™ and Databricks
Jump Start into Apache® Spark™ and DatabricksJump Start into Apache® Spark™ and Databricks
Jump Start into Apache® Spark™ and DatabricksDatabricks
 
Apache Spark Data Source V2 with Wenchen Fan and Gengliang Wang
Apache Spark Data Source V2 with Wenchen Fan and Gengliang WangApache Spark Data Source V2 with Wenchen Fan and Gengliang Wang
Apache Spark Data Source V2 with Wenchen Fan and Gengliang WangDatabricks
 
Global Azure Bootcamp 2017 - Why I love S2D for MSSQL on Azure
Global Azure Bootcamp 2017 - Why I love S2D for MSSQL on AzureGlobal Azure Bootcamp 2017 - Why I love S2D for MSSQL on Azure
Global Azure Bootcamp 2017 - Why I love S2D for MSSQL on AzureKarim Vaes
 
Diagnose RIDPool Failures
Diagnose RIDPool FailuresDiagnose RIDPool Failures
Diagnose RIDPool FailuresCuneyt Goksu
 
Database_Tuning.ppt
Database_Tuning.pptDatabase_Tuning.ppt
Database_Tuning.pptAsimEisa2
 

Similaire à Cdi implementation (20)

User Group3009
User Group3009User Group3009
User Group3009
 
Mainframe Technology Overview
Mainframe Technology OverviewMainframe Technology Overview
Mainframe Technology Overview
 
PyModESt: A Python Framework for Staging of Geo-referenced Data on the Coll...
PyModESt: A Python Framework for Staging of Geo-referenced Data on the Coll...PyModESt: A Python Framework for Staging of Geo-referenced Data on the Coll...
PyModESt: A Python Framework for Staging of Geo-referenced Data on the Coll...
 
Reporting Summary Information of Spatial Datasets and Non-Compliance Issues U...
Reporting Summary Information of Spatial Datasets and Non-Compliance Issues U...Reporting Summary Information of Spatial Datasets and Non-Compliance Issues U...
Reporting Summary Information of Spatial Datasets and Non-Compliance Issues U...
 
Oracle RI ETL process overview.
Oracle RI ETL process overview.Oracle RI ETL process overview.
Oracle RI ETL process overview.
 
[PLCUG] Splunk - complete Citrix environment monitoring
[PLCUG] Splunk - complete Citrix environment monitoring[PLCUG] Splunk - complete Citrix environment monitoring
[PLCUG] Splunk - complete Citrix environment monitoring
 
Database driven web pages
Database driven web pagesDatabase driven web pages
Database driven web pages
 
Spark & Cassandra at DataStax Meetup on Jan 29, 2015
Spark & Cassandra at DataStax Meetup on Jan 29, 2015 Spark & Cassandra at DataStax Meetup on Jan 29, 2015
Spark & Cassandra at DataStax Meetup on Jan 29, 2015
 
Introduction to Apache Spark
Introduction to Apache SparkIntroduction to Apache Spark
Introduction to Apache Spark
 
2017 10-oow-fma-application-containers-v01-final
2017 10-oow-fma-application-containers-v01-final2017 10-oow-fma-application-containers-v01-final
2017 10-oow-fma-application-containers-v01-final
 
Jacob Keecheril
Jacob KeecherilJacob Keecheril
Jacob Keecheril
 
Building a modern Application with DataFrames
Building a modern Application with DataFramesBuilding a modern Application with DataFrames
Building a modern Application with DataFrames
 
Building a modern Application with DataFrames
Building a modern Application with DataFramesBuilding a modern Application with DataFrames
Building a modern Application with DataFrames
 
Jump Start into Apache® Spark™ and Databricks
Jump Start into Apache® Spark™ and DatabricksJump Start into Apache® Spark™ and Databricks
Jump Start into Apache® Spark™ and Databricks
 
Apache Spark Data Source V2 with Wenchen Fan and Gengliang Wang
Apache Spark Data Source V2 with Wenchen Fan and Gengliang WangApache Spark Data Source V2 with Wenchen Fan and Gengliang Wang
Apache Spark Data Source V2 with Wenchen Fan and Gengliang Wang
 
Global Azure Bootcamp 2017 - Why I love S2D for MSSQL on Azure
Global Azure Bootcamp 2017 - Why I love S2D for MSSQL on AzureGlobal Azure Bootcamp 2017 - Why I love S2D for MSSQL on Azure
Global Azure Bootcamp 2017 - Why I love S2D for MSSQL on Azure
 
Diagnose RIDPool Failures
Diagnose RIDPool FailuresDiagnose RIDPool Failures
Diagnose RIDPool Failures
 
Informatica slides
Informatica slidesInformatica slides
Informatica slides
 
Windows server Interview question and answers
Windows server Interview question and answersWindows server Interview question and answers
Windows server Interview question and answers
 
Database_Tuning.ppt
Database_Tuning.pptDatabase_Tuning.ppt
Database_Tuning.ppt
 

Dernier

Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 

Dernier (20)

Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 

Cdi implementation

  • 1. Pan-European infrastructure for Ocean & Marine Data management An EU Integrated research Infrastructure Initiative (I3) How to implement CDI ? M. Fichaut, V. Tosello Training course - June 2007, Oostende, Belgium
  • 2. 15/08/13 How to proceed with the files for training In the shared directory : With 2 files  CDI_implementation.ppt : this presentation  training2_programme.doc : programme sent by email And 5 directories :  CDI documentation Detailed documentation on CDI and mapping  Example database 3 directories for ACCESS, MySQL and EXCEL database  Exercises  Mikado Mikado software and configuration files  Solutions Solution of the exercises, empty now, will be filled during the training after each exercises session Now : Copy the common directory on your computer
  • 3. 15/08/13 Example database (1) 10 tables describing : the stations of datasets collected during cruises  5 cruises on 2 ships, 10 datasets, 1399 stations  the datasets are either CTD or Bottle stations (mikado_dataset.database_id)  Measured parameters are linked to the datasets (mikado_dataset_parameter)  Mapping with common vocabularies is made through mapping tables (mikado_map_…) Document : example_databaseexample_database_description.rtf
  • 4. 15/08/13 Example database (1) One database in several environments On Microsoft ACCESS  accesscdi_training_course_2.mdb On MySQL  Name of the database : mikado, user : mikado, password : mikado On EXCEL  excel cdi_training_course_2.xls
  • 5. 15/08/13 First set of Exercises Manipulate the example database in different environments  Exercise 1 : MySQL database  Exercise 2 : ACCESS database  Exercise 3 : Excel file
  • 6. 15/08/13 CDI implementation progress USER LOCAL DATABASE ACCESS MYSQL EXCEL EXCEL FILES STATION METADATA (CTDs, Bottles, Current meters, …)
  • 7. 15/08/13 Generating the CDI - First STEP MAP YOUR DATABASE to THE CDI FIELDS
  • 8. 15/08/13 Database mapping to XML schema (1) Using the documents :  CDI documentation CDI_XML_V0_documentation_3_00_June2007.doc: Metadata Format and full description of XML schema version 2.04 – as prepared in Sea-Search  CDI documentation CDI_V1_04_mapping.xls : Excel file describing the mapping between the CDI fields, ISO-19115 and the local database  example_databaseexample_database_description.rtf : Description of the tables of the example database
  • 9. 15/08/13 On the right hand side : local database reference  Table_name.field_name Database mapping to XML schema (2) Level 2 Level 3 Level 4 … WHERE Latitude1 (var1) <dataIdInfo> (15) <geoBox> (42) <southBL> (346) WHERE Longitude1 (var2) <dataIdInfo> (15) <geoBox> (42) <westBL> (344) WHERE Latitude2 (var3) <dataIdInfo> (15) <geoBox> (42) <northBL> (347) WHERE Longitude2 (var4) <dataIdInfo> (15) <geoBox> (42) <eastBL> (345) WHERE Measuring area type (var5) <spatRepInfo> (12) <VectSpatRep> (176) <geometObjs> (178) WHERE Data Coordinate system (var6) <refSysInfo> (13) <MdCoRefSys> (189) <datum> (192) … WHEN Start date (var12) <dataIdInfo> (15) <dataExt> (45) <tempEle> (337) WHEN Start time (UT) var(12) see Start date WHAT Parameters measured (var50) <dataIdInfo> (15) <descKeys> (33) <keyword> (53) <KeyTyp> (54) HOW Instrument or gear type (var42) <dataIdInfo> (15) <descKeys> (33) <keyword> (53) <KeyTyp> (54) HOW Type of platform (var43) <dataIdInfo> (15) <descKeys> (33) <keyword> (53) <KeyTyp> (54) WHO Originator (var16) <dataIdInfo> (15) <idPoc> (29) <rpOrgNameId> (not ISO) <role> (379) PART CDI FIELD XML TAGS LOCAL DATABASE FIELD (TABLE_NAME.FIELD_NAME) On the left hand side : CDI reference  For each : XML tree (XML tags, with ISO-19115 number)
  • 10. 15/08/13 Database mapping to XML schema (3) WHERE Latitude1 (var1) MIKADO_STATION.STATION_LAT WHERE Longitude1 (var2) MIKADO_STATION.STATION_LON WHERE Latitude2 (var3) not relevant WHERE Longitude2 (var4) not relevant WHERE Measuring area type (var5) WHERE Data Coordinate system (var6) … WHEN Start date (var12) WHEN Start time (UT) var(12) WHAT Parameters measured (var50) HOW Instrument or gear type (var42) HOW Type of platform (var43) WHO Originator (var16) PART CDI FIELD LOCAL DATABASE FIELD (TABLE_NAME.FIELD_NAME) Mandatory CDI fields in bold characters Example of mapping
  • 11. 15/08/13 Second set of Exercises Map the local database to the CDI fields  Exercise 4 : Find all CDI fields mapping with MIKADO_CRUISE table  Exercise 5 : Find the mapping for the CDI field Data Coordinate system and Sampling Interval  Exercise 6 : Full mapping  Look at the final mapping file. Questions?
  • 12. 15/08/13 CDI implementation progress ISO-19115 XML SCHEMA defined for the CDI by SDN – TTT USER LOCAL DATABASE ORACLE MSSERVER MYSQL … EXCEL FILES STATION METADATA (CTDs, Bottles, Current meters, …) MAPPING Common vocabularies MAPPING
  • 13. 15/08/13 Principles of the CDI ISO-19115 XML SCHEMA defined for the CDI by SDN – TTT USER LOCAL DATABASE ORACLE MSSERVER MYSQL … EXCEL FILES STATION METADATA (CTDs, Bottles, Current meters, …) MAPPING Central CDI Common vocabularies MAPPING TOOLS Mikado Others Configuration Files Compliant to XML CDI files
  • 14. 15/08/13 Configure Mikado - Second STEP MAP YOUR DATABASE to THE CDI FIELDS MIKADO CONFIGURATION
  • 15. 15/08/13 MIKADO : Reminder MIKADO has been developed by IFREMER in the framework of the SEA-SEARCH project. MIKADO can be used to generate EDMED, CSR and CDI XML files. MIKADO can be used into 2 different ways :  One manual way, to input manually information for EDMED, CSR and CDI fields in order to generate XML files.  One automatic way, to generate these descriptions automatically if information is catalogued in a relational database.
  • 16. 15/08/13 MIKADO principle MIKADO Java code JDBC Java DataBase Connectivity JVM – Java Virtual Machine Native Drivers MYSQL ORACLE POSTGRES SQLServer Bridge Drivers using Microsoft ODBC (ACCESS, EXCEL, SQL SERVER) DATABASE Configuration Files (*.properties) Download drivers from web sites if not provided with Mikado
  • 17. 15/08/13 List of drivers provided with Mikado ODBC Bridge (from Java JDK 1.5)  MS Access 97, 2000, 2003  MS Excel JTDS 1.1 (Open Source licence)  Sybase 10, 11, 12, 15  SQL Server MySQL 3.1.10 (GPL licence)  MySQL 4.1, 5.x Oracle 14 (Oracle Technology Network Development and Distribution License)  Oracle 8.1.7, 9i, 10i (with restrictions) PostgreSQL 8.0.312 (BSD licence)  PostgreSQL MS SQL server 2005 driver (Microsoft download)  SQL Server 2000 with Service Pack 1 or higher Please note that Mikado source level is JDK 1.5
  • 18. 15/08/13 How to find the appropriate JDBC driver? Native drivers must be downloaded from the appropriate vendors websites (i.e Oracle, Sybase, MySQL, PostGres, …) It must fit with the database and the JDBC versions. This link may help you to find out the native drivers you need : http://developers.sun.com/product/jdbc/drivers For Oracle RDBMS , a native driver may be found on http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html For Microsoft SQL server, a native driver may be found on Microsoft MSDN http://msdn2.microsoft.com/en-us/data/default.aspx Bridge drivers (using Microsoft-ODBC Open DataBase Connectivity) are bundled with the Java 2 SDK. http://java.sun.com/j2se/1.3/docs/guide/jdbc/getstart/bridge.doc.html Drivers have then to be installed following the given recommendations The corresponding .jar files must be copied in the mikadodist directory
  • 19. 15/08/13 MIKADO configuration files See Mikado user manual mikadosdn_Mikado_Manual_V0.1.doc Mikado needs 2 configuration files in the mikadoconf directory files.properties file which contains all the information about the name and the location of the files used by the software Cdi.properties file which contains: Database connection parameters Queries to retrieve data from the database Mapping between the queries results (SQL variables) and the CDI fields
  • 20. 15/08/13 Mikado files.properties file All the information about the name and the location of the files used by the software Name of the files containing the list of values for CDI [and EDMED and CSR] : Parameters codes, platforms codes, … ############## # CDI ############## #cdiPartnerCodes cdiPartnerCodes.file = ./conf/cdi_partner_codes.csv #cdiMeasurementAreaTypeCodes cdiMeasurementAreaTypeCodes.file = ./conf/cdi_measurement_codes.csv Name of XML schemas used for CDI [and EDMED and CSR] #xsd xsd.cdi = ./conf/CDI_V1_04.xsd xsd.cdi_multirecords = ./conf/CDI_V2_01_multirecords.xsd Name of the files used for CDI XML automatic generation [and EDMED and CSR]
  • 21. 15/08/13 Mikado cdi.properties file 3 parts in the file  Database connection parameters Depending on the DATABASE : ACCESS, MySQL, ORACLE …  Queries to extract data from the database To be written from the mapping  Mapping between the queries results (SQL variables) and the CDI fields Must not be modified!!!
  • 22. 15/08/13 cdi.properties file : database connection (1) DATABASE ACCESS JDBC (Java Data Base Connectivity) connection parameters ############################### JDBC parameters for querying database ############################### bdd.query.timeout = database connection time out bdd.className= driver Java Class Name (the *.jar file which implement this Class Name must exist in the mikadoconfdist directory) bdd.connectURL = connect string to the database bdd.user.name = user name bdd.user.password = user password
  • 23. 15/08/13 cdi.properties file : database connection (2) Examples of ODBC bridge drivers ACCESS database bdd.className = sun.jdbc.odbc.JdbcOdbcDriver bdd.connectURL =jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=N://example_database/access/cdi_training_course_2.mdb bdd.user.name = bdd.user.password = EXCEL file bdd.className = sun.jdbc.odbc.JdbcOdbcDriver bdd.connectURL =jdbc:odbc:Driver={Microsoft Excel Driver (*.xls)};DBQ=X:/example_database/excel/cdi_training_course_2.xls bdd.user.name = bdd.user.password = MS SERVEUR Not recommended, use native driver
  • 24. 15/08/13 cdi.properties file : database connection (3) Examples of Native drivers MySQL database bdd.className = com.mysql.jdbc.Driver bdd.connectURL = jdbc:mysql://localhost/mikado bdd.user.name = mikado bdd.user.password = mikado ORACLE bdd.className = oracle.jdbc.OracleDriver bdd.connectURL = jdbc:oracle:thin:@server:port:instance User and password must be provided Example : jdbc:oracle:thin:@josephine.ifremer.fr:1521:btest920 • MS SERVER bdd.className = com.microsoft. jdbc.sqlserver. SQLServerDriver bdd.connectURL = jdbc:sqlserver://serverName;instanceName:portNumber;property=value[;property=valu e] User and password must be provided Example : jdbc:sqlserveur://www.bkrclass.org:1065;databaseName=io_mikado; integratedSecurity=false;
  • 25. 15/08/13 cdi.properties file : mapping Mapping of the query results to the CDI fields Mapping table : SQL variables = CDI fields var1 = southLatitude var2 = westLongitude var3 = northLatitude ….. var42 = instrumentOrGearType var43 = typeOfPlatform var50 = parametersMeasured.value WHERE Latitude1 (var1) MIKADO_STATION.STATION_LAT WHERE Longitude1 (var2) MIKADO_STATION.STATION_LON WHERE Latitude2 (var3) not relevant WHERE Longitude2 (var4) not relevant PART CDI FIELD LOCAL DATABASE FIELD (TABLE_NAME.FIELD_NAME) Must not be changed
  • 26. 15/08/13 cdi.properties file : SQL queries (1) Main query  It is the query which identifies all CDI entries that must be exported. This request must return only one column which is the identifier of each entry and that will be used for sub-queries.  SQL syntax must be adapted to your local database ############################ # Main query (station identifier list) ############################ query.=select mikado_station.station_id from mikado_station
  • 27. 15/08/13 cdi.properties file : SQL queries (2) Sub-queries  For each row of the main query, it is possible to define single or multi sub-queries. Single sub-queries : return one row for each row of the main query (ex: dataset_id, cruise_name) Multi sub-queries : return several rows for each row of the main query (ex: parameters).  The links between the fields of the database and the variables of the mapping (var1 to varN) table have to be defined in theses sub-queries as synonyms of the selected columns
  • 28. 15/08/13 cdi.properties file : SQL queries (3) Single Sub-queries : return one row The number of single sub-queries must be defined queries.single.number=5 The keyword for single sub-queries is : queries.single.i= where i varies from 1 to queries.single.number Example : queries.single.1 = select tabA.colX var1 from tabA where tableA.colY= :$ var1 = synonym for the column name from the mapping table :$ = the identifier of the row returned by the main query
  • 29. 15/08/13 cdi.properties file : SQL queries (4) Multiple Sub-queries : return several rows All the names of the multi sub-queries are defined and must not be changed For CDI one multi sub-query is defined The keyword is : queries.multi.parametersMeasured = Example : queries.multi.parametersMeasured =select tabA.colX var50 from tabA, tabB where tabB.colX = :$ and tabB.colY = tabA.colZ var50 = synonym for the column name from the mapping table :$ = the identifier of the row returned by the main query
  • 30. 15/08/13 Third set of Exercises Write the cdi.properties files for ACCESS or MY SQL or EXCEL files In the exercises only the stations of the Cruise « CITHER2 LEG 1 » will selected to have a smaller number of stations  Exercise 7 : Look at the main query. Questions?  Exercise 8 : Fulfil the missing information in query.single.1. Query on MIKADO_DATASET table  Exercise 9 : Fulfil the missing information in query.single.2. Query on MIKADO_STATION table  Exercise 10 : Write the query.single.4 to find the datum coordinate system  Exercise 11 : Have a look at the final property file, questions?
  • 31. 15/08/13 ISO date format Date format must have the following syntax  YYYY-MM-DD  YYYY-MM-DDTHH24:MI  YYYY-MM-DDTHH24:MI:SS
  • 32. 15/08/13 CDI implementation progress ISO-19115 XML SCHEMA defined for the CDI by SDN – TTT USER LOCAL DATABASE ORACLE MSSERVER MYSQL … EXCEL FILES STATION METADATA (CTDs, Bottles, Current meters, …) MAPPING Common vocabularies MAPPING TOOLS Mikado Others Configuration Files
  • 33. 15/08/13 XML files generation - Third STEP MAP YOUR DATABASE to THE CDI FIELDS MIKADO CONFIGURATION Generate the XML files
  • 34. 15/08/13 XML CDI files generation Use the Mikado software to create the XML CDI files  Make sure that you have the right « properties » files in the mikadoconf directory files before running the software  Change the connection to the database in the CDI.properties file, with the path to your local database  Run Mikado  Import the common vocabularies lists for CDI using Mikado : Menu configuration, library, CDI  Create and output directory for your XML files
  • 35. 15/08/13 XML files check - Fourth STEP MAP YOUR DATABASE to THE CDI FIELDS MIKADO CONFIGURATION Generate the XML files Check the XML files
  • 36. 15/08/13 CDI implementation progress ISO-19115 XML SCHEMA defined for the CDI by SDN – TTT USER LOCAL DATABASE ORACLE MSSERVER MYSQL … EXCEL FILES STATION METADATA (CTDs, Bottles, Current meters, …) MAPPING Common vocabularies MAPPING TOOLS Mikado Others Configuration Files Compliant to XML CDI files
  • 37. 15/08/13 Send XML files - Fifth STEP MAP YOUR DATABASE to THE CDI FIELDS MIKADO CONFIGURATION Generate the XML files Check the XML files Send the XML files to central CDI
  • 38. 15/08/13 Fourth set of Exercises Generate the XML CDI files and check them  Exercise 12 : Generate the XML files with Mikado  Exercise 13 : Check the XML files

Notes de l'éditeur

  1. On one hand we have data points that can be described in databases containing only metadata, or metatdata and data, or in flat files like EXCEL files. On the other hand we have the XML SCHEMA defined for the CDI during the SEA-SEARCH project. And we have the common vocabularies that must be used in the frame of SeaDataNet. The first step for implementing a CDI is to map the data point description to the XML schema. Then once the mapping is done, tools can use this mapping to generate XML CDI files which will be delivered to the central CDI in MARIS. During this course we will detail the different steps that are necessary to implement a CDI using the MIKADO tool