FDO documentation questions

7 messages Options
Embed this post
Permalink
Donald Cameron

FDO documentation questions

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

Hi,

I am working on the FDO documentation: The Essential FDO, The FDO Developers Guide, and the FDO API Reference.

 

I was going to write some sample code that does batch inserts using the OSGeo.FDO.Commands.BatchParameterValueCollection property of the OSGeo.FDO.Commands.Feature.IInsert command but I was told that no providers support batch insertion.

 

I currently believe that the SupportsParameters() method of OSGeo.FDO.Connections.Capabilities.ICommandCapabilities says whether a provider supports batch inserts.

 

According to a program I wrote, three providers support parameters: ArcSDE, KingOracle, and PostGIS.

 

So my question is this: Do they actually support batch insertion?

 

If so, I would be very grateful for some sample code showing how to use BatchParameterValueCollection to do batch insertion.

 

Regards,

Don

Don Cameron

Autodesk Inc.

Developer Publications Specialist

Ottawa, Ontario, Canada

613.233.3758

 


_______________________________________________
fdo-internals mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-internals
Haris Kurtagic

RE: FDO documentation questions

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

King.Oracle is supporting batch insert. I remember testing it in Fdo2Fdo when it makes a speed difference when copying data.

I will look into Fdo2Fdo code and give you and example.

 

Haris

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Donald Cameron
Sent: Thursday, May 01, 2008 3:59 PM
To: '[hidden email]'
Subject: [fdo-internals] FDO documentation questions

 

Hi,

I am working on the FDO documentation: The Essential FDO, The FDO Developers Guide, and the FDO API Reference.

 

I was going to write some sample code that does batch inserts using the OSGeo.FDO.Commands.BatchParameterValueCollection property of the OSGeo.FDO.Commands.Feature.IInsert command but I was told that no providers support batch insertion.

 

I currently believe that the SupportsParameters() method of OSGeo.FDO.Connections.Capabilities.ICommandCapabilities says whether a provider supports batch inserts.

 

According to a program I wrote, three providers support parameters: ArcSDE, KingOracle, and PostGIS.

 

So my question is this: Do they actually support batch insertion?

 

If so, I would be very grateful for some sample code showing how to use BatchParameterValueCollection to do batch insertion.

 

Regards,

Don

Don Cameron

Autodesk Inc.

Developer Publications Specialist

Ottawa, Ontario, Canada

613.233.3758

 

 

No virus found in this incoming message.
Checked by AVG.
Version: 7.5.524 / Virus Database: 269.23.7/1408 - Release Date: 4/30/2008 6:10 PM


_______________________________________________
fdo-internals mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-internals
Jason Birch

RE: FDO documentation questions

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

Speaking of fdo2fdo code… There’s a great place for it here:

 

https://svn.osgeo.org/fdo/trunk/Tools/

 

J

 

Jason

 

From: Haris Kurtagic
Subject: RE: [fdo-internals] FDO documentation questions

 

King.Oracle is supporting batch insert. I remember testing it in Fdo2Fdo when it makes a speed difference when copying data.

I will look into Fdo2Fdo code and give you and example.


_______________________________________________
fdo-internals mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-internals
Dan Stoica

RE: FDO documentation questions

Reply Threaded More More options
Print post
Permalink
In reply to this post by Haris Kurtagic
Some javascript/style in this post has been disabled (why?)

a speed difference “ - What was the magnitude?

 

Thanks,

Dan.

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Haris Kurtagic
Sent: Thursday, May 01, 2008 1:24 PM
To: FDO Internals Mail List
Subject: RE: [fdo-internals] FDO documentation questions

 

King.Oracle is supporting batch insert. I remember testing it in Fdo2Fdo when it makes a speed difference when copying data.

I will look into Fdo2Fdo code and give you and example.

 

Haris

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Donald Cameron
Sent: Thursday, May 01, 2008 3:59 PM
To: '[hidden email]'
Subject: [fdo-internals] FDO documentation questions

 

Hi,

I am working on the FDO documentation: The Essential FDO, The FDO Developers Guide, and the FDO API Reference.

 

I was going to write some sample code that does batch inserts using the OSGeo.FDO.Commands.BatchParameterValueCollection property of the OSGeo.FDO.Commands.Feature.IInsert command but I was told that no providers support batch insertion.

 

I currently believe that the SupportsParameters() method of OSGeo.FDO.Connections.Capabilities.ICommandCapabilities says whether a provider supports batch inserts.

 

According to a program I wrote, three providers support parameters: ArcSDE, KingOracle, and PostGIS.

 

So my question is this: Do they actually support batch insertion?

 

If so, I would be very grateful for some sample code showing how to use BatchParameterValueCollection to do batch insertion.

 

Regards,

Don

Don Cameron

Autodesk Inc.

Developer Publications Specialist

Ottawa, Ontario, Canada

613.233.3758

 

 

No virus found in this incoming message.
Checked by AVG.
Version: 7.5.524 / Virus Database: 269.23.7/1408 - Release Date: 4/30/2008 6:10 PM


_______________________________________________
fdo-internals mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-internals
Donald Cameron

RE: FDO documentation questions

Reply Threaded More More options
Print post
Permalink
In reply to this post by Haris Kurtagic
Some javascript/style in this post has been disabled (why?)

Thanks Haris,

I apologize for the delay in replying. I forgot I was funneling fdo-internals into another email box.

I look forward to seeing the sample code.

Don

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Haris Kurtagic
Sent: Thursday, May 01, 2008 1:24 PM
To: FDO Internals Mail List
Subject: RE: [fdo-internals] FDO documentation questions

 

King.Oracle is supporting batch insert. I remember testing it in Fdo2Fdo when it makes a speed difference when copying data.

I will look into Fdo2Fdo code and give you and example.

 

Haris

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Donald Cameron
Sent: Thursday, May 01, 2008 3:59 PM
To: '[hidden email]'
Subject: [fdo-internals] FDO documentation questions

 

Hi,

I am working on the FDO documentation: The Essential FDO, The FDO Developers Guide, and the FDO API Reference.

 

I was going to write some sample code that does batch inserts using the OSGeo.FDO.Commands.BatchParameterValueCollection property of the OSGeo.FDO.Commands.Feature.IInsert command but I was told that no providers support batch insertion.

 

I currently believe that the SupportsParameters() method of OSGeo.FDO.Connections.Capabilities.ICommandCapabilities says whether a provider supports batch inserts.

 

According to a program I wrote, three providers support parameters: ArcSDE, KingOracle, and PostGIS.

 

So my question is this: Do they actually support batch insertion?

 

If so, I would be very grateful for some sample code showing how to use BatchParameterValueCollection to do batch insertion.

 

Regards,

Don

Don Cameron

Autodesk Inc.

Developer Publications Specialist

Ottawa, Ontario, Canada

613.233.3758

 

 

No virus found in this incoming message.
Checked by AVG.
Version: 7.5.524 / Virus Database: 269.23.7/1408 - Release Date: 4/30/2008 6:10 PM


_______________________________________________
fdo-internals mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-internals
Haris Kurtagic

RE: FDO documentation questions

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

Sorry for late response. This is code from Fdo2Fdo for batch copy. BatchInsertSize is argument to procedure which is set by user in Fdo2Fdo when he wants to use batch copy.

 

 

FdoPtr<FdoBatchParameterValueCollection> batch_paramval_col = inscomm->GetBatchParameterValues();

 

  if( (BatchInsertSize > 1) && batch_paramval_col.p )

  {

  // prepare parameters values in property v

    int propcount = insprop_col->GetCount();

    for(int ind=0; ind<propcount;ind++)

    {

      FdoPtr<FdoPropertyValue> propval = insprop_col->GetItem(ind);

     

      FdoPropertyDefinition* source_prop = source_insprop_vector.at(ind);

      FdoPropertyDefinition* dest_prop = dest_insprop_vector.at(ind);

     

     

      FdoPtr<FdoParameter> param = FdoParameter::Create( dest_prop->GetName() );

      propval->SetValue(param.p);                     

    }   

  // now read source features and add to parameter values 

    int batchrownum=0;

    while(freader->ReadNext())

    {

     // read properties of source classdef

      FdoPtr<FdoParameterValueCollection> paramval_col = FdoParameterValueCollection::Create();

      for(int ind=0; ind<propcount;ind++)

      {

        FdoPtr<FdoPropertyValue> propval = insprop_col->GetItem(ind);

       

        FdoPropertyDefinition* source_prop = source_insprop_vector.at(ind);

        FdoPropertyDefinition* dest_prop = dest_insprop_vector.at(ind);

                

        switch( dest_prop->GetPropertyType() )

        {

          case FdoPropertyType_GeometricProperty:

          {

           

            FdoPtr<FdoGeometryValue> geomval = FdoGeometryValue::Create( freader->GetGeometry(source_prop->GetName()) );

                      

            paramval_col->Add( FdoParameterValue::Create(dest_prop->GetName(),geomval) );

        

          }

          break;

          case FdoPropertyType_DataProperty:

          {

            FdoDataPropertyDefinition* dest_dataprop = (FdoDataPropertyDefinition*)dest_prop;

            FdoDataPropertyDefinition* source_dataprop = (FdoDataPropertyDefinition*)source_prop;

          

            FdoPtr<FdoDataValue> dval = c_FDO_Api::ReaderGetDataPropertyValue(freader,source_prop->GetName(),source_dataprop->GetDataType(),dest_dataprop->GetDataType());

           

            paramval_col->Add( FdoParameterValue::Create(dest_dataprop->GetName(),dval) );

           

          }

          break;

        }     

      }

      batch_paramval_col->Add(paramval_col);

     

      batchrownum++;

     

      if( batchrownum >= BatchInsertSize )

      {

      // start execute

       

        inscomm->Execute();

        numcopied += batchrownum;

        batch_paramval_col->Clear();

        batchrownum = 0;

       

      }

    }

    // check if soem features are left beacuse reader finished and some are still in batch collection

    if( batchrownum > 0 )

    {

    // now insert the last one records

      inscomm->Execute();

      numcopied += batchrownum;       

      batch_paramval_col->Clear();

      batchrownum = 0;

    }

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Donald Cameron
Sent: Friday, May 02, 2008 8:32 PM
To: 'FDO Internals Mail List'
Subject: RE: [fdo-internals] FDO documentation questions

 

Thanks Haris,

I apologize for the delay in replying. I forgot I was funneling fdo-internals into another email box.

I look forward to seeing the sample code.

Don

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Haris Kurtagic
Sent: Thursday, May 01, 2008 1:24 PM
To: FDO Internals Mail List
Subject: RE: [fdo-internals] FDO documentation questions

 

King.Oracle is supporting batch insert. I remember testing it in Fdo2Fdo when it makes a speed difference when copying data.

I will look into Fdo2Fdo code and give you and example.

 

Haris

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Donald Cameron
Sent: Thursday, May 01, 2008 3:59 PM
To: '[hidden email]'
Subject: [fdo-internals] FDO documentation questions

 

Hi,

I am working on the FDO documentation: The Essential FDO, The FDO Developers Guide, and the FDO API Reference.

 

I was going to write some sample code that does batch inserts using the OSGeo.FDO.Commands.BatchParameterValueCollection property of the OSGeo.FDO.Commands.Feature.IInsert command but I was told that no providers support batch insertion.

 

I currently believe that the SupportsParameters() method of OSGeo.FDO.Connections.Capabilities.ICommandCapabilities says whether a provider supports batch inserts.

 

According to a program I wrote, three providers support parameters: ArcSDE, KingOracle, and PostGIS.

 

So my question is this: Do they actually support batch insertion?

 

If so, I would be very grateful for some sample code showing how to use BatchParameterValueCollection to do batch insertion.

 

Regards,

Don

Don Cameron

Autodesk Inc.

Developer Publications Specialist

Ottawa, Ontario, Canada

613.233.3758

 

 

No virus found in this incoming message.
Checked by AVG.
Version: 7.5.524 / Virus Database: 269.23.7/1408 - Release Date: 4/30/2008 6:10 PM

 

No virus found in this incoming message.
Checked by AVG.
Version: 7.5.524 / Virus Database: 269.23.7/1410 - Release Date: 5/1/2008 5:30 PM


_______________________________________________
fdo-internals mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-internals
Jackie Ng

Re: FDO documentation questions

Reply Threaded More More options
Print post
Permalink
In reply to this post by Donald Cameron
Sorry to necro this thread, but has this been confirmed that support for parameters implies support for batch insertion?

There is currently no actual capability API to test for batch insert support, and all known batch insert code samples (including my implementation in FDO Toolbox) assumes parameters are supported to do the batch insert.

Is this the case?

- Jackie

Donald Cameron wrote:
Hi,
I am working on the FDO documentation: The Essential FDO, The FDO Developers Guide, and the FDO API Reference.

I was going to write some sample code that does batch inserts using the OSGeo.FDO.Commands.BatchParameterValueCollection property of the OSGeo.FDO.Commands.Feature.IInsert command but I was told that no providers support batch insertion.

I currently believe that the SupportsParameters() method of OSGeo.FDO.Connections.Capabilities.ICommandCapabilities says whether a provider supports batch inserts.

According to a program I wrote, three providers support parameters: ArcSDE, KingOracle, and PostGIS.

So my question is this: Do they actually support batch insertion?

If so, I would be very grateful for some sample code showing how to use BatchParameterValueCollection to do batch insertion.

Regards,
Don
Don Cameron
Autodesk Inc.
Developer Publications Specialist
Ottawa, Ontario, Canada
613.233.3758


_______________________________________________
fdo-internals mailing list
fdo-internals@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/fdo-internals