Skip to main content
Question

How to serial primary key in Oracle spatial object writer using with user attributes part?

  • December 31, 2021
  • 5 replies
  • 43 views

Forum|alt.badge.img

resim_2021-12-31_114518As you see, value is null so it gets ORA-01449(null).So, How can I setting value collumn ?

5 replies

Forum|alt.badge.img
  • Author
  • December 31, 2021

when I tried UUID() but is does not work.

In addition, when I select postgre writer, it gets serial parameter like this;

resim_2021-12-31_115444

BUT, when I choose oracle writer, it does not have any serial parameter for primary key?

 


nampreetatsafe
Safer
Forum|alt.badge.img+12

Hi @ikubra800​. The data types for each format is based on the specific format. PostgreSQL supports the "serial" data type, where Oracle doesn't, therefore it isn't available in the Oracle Writer. Hope that makes sense.

I see from your screenshot above that you had SEQ_ID datatype set to "number." If you're using the UUID() function in the text editor from the writer feature type as shown below, ensure you have set a Data Type that supports the UUID values (i.e. clob).

If the UUID() function doesn't work for some other reason, try adding the UUIDGenerator transformer prior to writing and set the "New UUID Attribute" to SEQ_ID.

Hope this helps!


Forum|alt.badge.img
  • Author
  • January 3, 2022

Thanks @nampreetatsafe it works, ı choose varchar because oracle dont support LOB type as primary key. So, it create pk with string in FME.

works


Forum|alt.badge.img+2
  • January 4, 2022

@ikubra800​ Just for completeness... Oracle sequences are analogous to the postgres serial data type.

The sequence must be an integer data type on the Oracle writer. It can also be the primary key. To use a sequence you can set the Sequenced Table Columns parameter on the Oracle Writer Feature Type Advanced disclosure group:

dialogA bit more on using Oracle sequences in this article: Making use of Oracle Sequences when working with Oracle Tables


Forum|alt.badge.img
  • Author
  • January 5, 2022

Thanks @Mark Stoakes​  for the response.​ 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings