Empty records are getting inserted while inserting multiple records via import set API.

kaduapoorva
Tera Contributor

 

Hello All,

 

I am trying to insert multiple records using import set API but records with empty data or fields values are getting inserted.

I have gone through community answers already but didn't get any exact solution.

Please help with exact root cause and solution.

6 REPLIES 6

Swapnil24
Giga Guru

Hi @kaduapoorva , are the null values getting inserted in the import set table or are they getting inserted in the target table? Also, when you POST data to the import set API endpoint, are you passing in blank values for some and not for others?

Could you provide more details about what you are trying to achieve, it will greatly help get to a solution.

 

Thank you,

Swapnil Deo

Slava Savitsky
Giga Sage

Do you get empty rows in the target table after the transform map runs or also in the import set table before the transformation? Do all rows get inserted as empty or just some of them? Have you tried inserting one record instead of multiple?

Veera6
Tera Contributor

What choice action did you have? if it is create , then it creates new records if it does not find target record. Check import log also for errors.

KevinBellardine
Kilo Sage

More detail would help, but there are a few things that could be causing this.

 

1. Something is going wrong loading the data. Check the transform table. If you're getting records I doubt it's this, but check the table anyway.

2. Your transform is incorrectly configured. I'd bet that this is your problem. Write some log statements in your transform map to output different fields, try to confirm that the source and target are what you expect them to be and work from there.

3. Finally you might have a reference field that's processing values that don't exist in the target table, and you've left the default "create" set on the transform map. It doesn't sound like this is your issue, but I've seen it confuse some people so might as well check it. By default if you're mapping to, lets say, caller, then the transform map is going to try to take the source value and use it to query the user table. By default it'll query name, you can configure the map to use other fields though. If it doesn't find one, and the field entry is set to 'create', it'll create a dummy one using whatever value it's using to query. This creates a mostly empty record that only exists so that the caller field on the record you're creating has something to map to. If this is happening I'd confirm what you're using to query and maybe set the field transform to ignore.