We are trying to extract non-network data/information from a GeoDatabase, is there a way to do this from inside of cube?
Hi Daniel
For non-network geodatabase data, use the MATRIX program to output the data file. Below is an example:
RUN PGM=MATRIX FILEI RECI="geodatabse.gdb\TAZ" ;input geodatabse data FILE RECO[1] ="TAZData.dbf" FIELDS=RECI.ALLFIELDS ;output DBF file with all fields WRITE RECO=1 ;write input records to output ENDRUN
Let us know if this works.
Answer Verified By: Daniel Miller
Hi Ahmed,
Thank you for the response and the working solution. Much appreciated.
Two follow ups:
1, How would we include or exclude certain fields?
2. Is there a way to pull the entire polygon shapefile from the geodatabase within the application functions?
Hi Daniel,
My comments below to your follow ups:
An example script is below. This is from the Cubetown.mdb/Zoning dataset. If you did not include the three fields as conditions in the script, then the output record would have 22 fields.
RUN PGM=MATRIX PRNFILE="Inputs\Zoning.PRN" FILEI RECI = "Inputs\Cubetown.mdb\Zoning" FILEO RECO[1] = "Inputs\Zoning.dbf", FIELDS=TAZ(4.0), DISTRICT(4.0), SCHOOLS(4.0)
;===========Only add three fields. This excludes everything else.====================;
RO.TAZ=RI.TAZ RO.DISTRICT=RI.DISTRICT RO.SCHOOLS=RI.SCHOOLS
WRITE RECO=1
ENDRUN
With the script, only three fields from the MDB are included in the DBF.
Currently, this can only be achieved through:
1. Opening the MDB/GDB in the Data Manager,
2. Right-click the polygon dataset > Export,
3. Input is the targeted dataset,
4. Output is "Shapefile(.shp)", give it the right location and name.