斯潘8
斯潘4
Intro: Getting Started with Oracleγ Previous Section: Converting to Oracle: Create,Drop or Truncate a Tableγ Next Section: How to Convert Oracle Spatial to Shapefile
注:以上视频已使用FME 2016.1拍摄。
正如我们在之前的教程中看到的那样,FME通常用于从传入数据创建新的数据库表。However,在某些情况下,需要写入已经存在的数据库表。
当写入存在的表时,工作区应反映表架构。This can be accomplished by importing the table schema from the database when adding the feature type writer.添加数据库编写器时,the ‘import from dataset…' type writer.添加数据库编写器时,“从数据集导入…”选项允许用户从已存在的表中选择架构。
Bike Paths - Sample Data & PostGIS load data.zip
此演示将使用包含温哥华自行车路径信息的Oracle表。其他数据将从ESRI形状文件格式加载,数据将写入现有的Oracle表。
(1)添加ESRI shapefile reader
启动FME工作台,and select the New workspace option.
From the Readers menu,选择添加读卡器。Enter Esri Shapefile for the format,并为数据集选择“bike-paths.shp”文件。单击“确定”将自行车路径数据添加到工作区。
(2)添加Oracle空间对象编写器
添加新的编写器,并选择Oracle空间对象格式。对于数据集,select ‘add database connection',并连接到Oracle数据库实例。如果需要有关连接到Oracle数据库的其他详细信息,请参阅查看和检查Oracle数据一文。在取消“添加编写器”对话框之前,make sure that the Add Feature Type(s) Table Definition is set to: ‘Import from Dataset'.单击“确定”接受写入程序参数。
(3)导入要素类型
FME将提示用户定义要通过“导入编写器要素类型”对话框导入的要素类型。单击“参数…”,并选择要用于架构的目标表。For our example,目标表是“自行车道”。
注:随附的自行车路径数据已在下载部分以压缩格式提供。本练习假设在开始步骤3之前,bike_路径数据已加载到Oracle数据库中。
The schema definition for the selected table is now added to the workspace.请注意,编写器功能类型是现有数据库表架构的副本(而不是读卡器功能类型,作为一个标准的工作空间。
(4)设置功能操作和表格处理
打开功能编写器的功能类型属性。Under the Format Parameters tab,验证功能操作参数是否设置为“insert”,并将表处理更改为“使用现有”。
(5)映射模式
把读者和作者联系起来,and expand the attributes available for each.You'll notice that attributes don't map,这是因为Oracle要求属性采用大写格式。要纠正这个问题,右键单击连接并使用自动连接属性。自动连接属性用于替换在Oracle输出中定义为小写到大写的属性名。
(6) Run the Workspace
运行工作区,通过右键单击编写器并选择“检查”来查看结果。Note that if the workspace is run more than once then new data will be added repeatedly!
?2019安全亚搏在线软件公司|合法的