Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [geomesa-dev] FW: Export command with transform function

Hello,

You're hitting a known bug: https://geomesa.atlassian.net/browse/GEOMESA-997

However, it has been fixed in a PR up for review now: https://github.com/locationtech/geomesa/pull/2274

The fix should be available in our next minor release, 2.4.0.

Thanks,

Emilio

On 6/18/19 7:26 PM, GEBRE, MERON [AG/1000] wrote:

Hi,

 

I am trying to export data using the GeoMesa export command.

 

 

GeoMesa version = 2.0.2

Accumullo = 1.9.2

 

  1. I can successfully export data as long as I am not using a transform function or the transform function is taking a single argument.

Example:

sudo docker exec accumulo-master geomesa-accumulo export -c geomesa.x_catalog -f x_feature -u root -p secret -a uid,'strTrim(name)',date,year -m 10 -o export-data.csv -F csv

 

  1. Export is failing when using a transform function that takes more than one argument. In other words when a comma is introduced. This may be because the comma is confused for the attribute delmitter.

Example cmd failing:

sudo docker exec accumulo-master geomesa-accumulo export -c geomesa.x_catalog -f x_feature -u root -p secret -a uid,'strConcat(name,"POINT")',date,year -m 10 -o export-data.csv -F csv

 

Error:

ERROR Unable to parse _expression_ strConcat(name=strConcat(name org.geotools.filter.text.cql2.CQLException: Encountered "<EOF>" at line 1, column 14.

Was expecting one of:

    ")" ...

    "," ...

    "." ...

    "/" ...

    ":" ...

    "*" ...

    "+" ...

    "-" ...

    <IDENTIFIER> ...

    "(" ...

     Parsing : strConcat(name.

java.lang.IllegalArgumentException: Unable to parse _expression_ strConcat(crop=strConcat(crop org.geotools.filter.text.cql2.CQLException: Encountered "<EOF>" at line 1, column 14.

Was expecting one of:

    ")" ...

    "," ...

    "." ...

    "/" ...

    ":" ...

    "*" ...

    "+" ...

    "-" ...

    <IDENTIFIER> ...

    "(" ...

     Parsing : strConcat(name.

       at org.geotools.process.vector.TransformProcess.toDefinition(TransformProcess.java:185)

       at org.locationtech.geomesa.index.planning.QueryPlanner$.buildTransformSFT(QueryPlanner.scala:197)

       at org.locationtech.geomesa.index.planning.QueryPlanner$.setQueryTransforms(QueryPlanner.scala:189)

       at org.locationtech.geomesa.index.planning.QueryRunner$class.configureQuery(QueryRunner.scala:53)

       at org.locationtech.geomesa.index.planning.QueryPlanner.configureQuery(QueryPlanner.scala:41)

       at org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.getSchema(GeoMesaFeatureSource.scala:127)

       at org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.getSchema(GeoMesaFeatureSource.scala:116)

       at org.locationtech.geomesa.tools.export.ExportCommand$class.export(ExportCommand.scala:74)

       at org.locationtech.geomesa.accumulo.tools.export.AccumuloExportCommand.export(AccumuloExportCommand.scala:17)

       at org.locationtech.geomesa.tools.export.ExportCommand$$anonfun$execute$1$$anonfun$apply$1.apply(ExportCommand.scala:40)

       at org.locationtech.geomesa.tools.export.ExportCommand$$anonfun$execute$1$$anonfun$apply$1.apply(ExportCommand.scala:40)

       at org.locationtech.geomesa.tools.DataStoreCommand$class.withDataStore(Command.scala:59)

       at org.locationtech.geomesa.accumulo.tools.export.AccumuloExportCommand.withDataStore(AccumuloExportCommand.scala:17)

       at org.locationtech.geomesa.tools.export.ExportCommand$$anonfun$execute$1.apply(ExportCommand.scala:40)

       at org.locationtech.geomesa.tools.export.ExportCommand$$anonfun$execute$1.apply(ExportCommand.scala:40)

       at org.locationtech.geomesa.utils.stats.MethodProfiling$class.profile(MethodProfiling.scala:19)

       at org.locationtech.geomesa.accumulo.tools.export.AccumuloExportCommand.profile(AccumuloExportCommand.scala:17)

       at org.locationtech.geomesa.tools.export.ExportCommand$class.execute(ExportCommand.scala:40)

       at org.locationtech.geomesa.accumulo.tools.export.AccumuloExportCommand.execute(AccumuloExportCommand.scala:17)

       at org.locationtech.geomesa.tools.Runner$class.main(Runner.scala:28)

       at org.locationtech.geomesa.accumulo.tools.AccumuloRunner$.main(AccumuloRunner.scala:29)

       at org.locationtech.geomesa.accumulo.tools.AccumuloRunner.main(AccumuloRunner.scala)

Caused by: org.geotools.filter.text.cql2.CQLException: Encountered "<EOF>" at line 1, column 14.

Was expecting one of:

    ")" ...

    "," ...

    "." ...

    "/" ...

    ":" ...

    "*" ...

    "+" ...

    "-" ...

    <IDENTIFIER> ...

    "(" ...

     Parsing : strConcat(name.

       at org.geotools.filter.text.ecql.ECQLCompiler.compileExpression(ECQLCompiler.java:117)

       at org.geotools.filter.text.commons.CompilerUtil.parseExpression(CompilerUtil.java:175)

       at org.geotools.filter.text.ecql.ECQL.toExpression(ECQL.java:157)

       at org.geotools.filter.text.ecql.ECQL.toExpression(ECQL.java:136)

       at org.geotools.process.vector.TransformProcess.toDefinition(TransformProcess.java:183)

       ... 21 more

.

 

      

       An example of using a transform function is given in GeoMesa Doc>

https://www.geomesa.org/documentation/2.0.2/user/cli/export.html

 

                Transforms can be accomplished by specifying transform functions:

         --attributes id,name,name_transform=strConcat(name, 'foo')

 

 

 

       But is tested? What am I doing wrong?

 

Thanks,

MerAGeb

 

 

 

 



The information contained in this e-mail is for the exclusive use of the intended recipient(s) and may be confidential, proprietary, and/or legally privileged.  Inadvertent disclosure of this message does not constitute a waiver of any privilege.  If you receive this message in error, please do not directly or indirectly use, print, copy, forward, or disclose any part of this message.  Please also delete this e-mail and all copies and notify the sender.  Thank you.



_______________________________________________
geomesa-dev mailing list
geomesa-dev@xxxxxxxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.locationtech.org/mailman/listinfo/geomesa-dev


Back to the top