The CreatorCon Call for Content is officially open! Get started here.

Schedule transformation from import set table to target table

ydai
Mega Contributor

Hi All,

In my scoped application, I have created a table extended from import set row, and one onBefore and one onAfter tranform map script to control the insertion from import set table to the target table. I have an external http client, calling ServiceNow REST API (https://developer.servicenow.com/app.do#!/rest_api_doc?v=helsinki&id=r_TableAPI-GET ) to add record to the import set table, it triggers the transform map scripts immediately, both my import set table and target table shows the record correctly.

Now I don't want the transformation happen immediately when I insert record to import set table. Is there any way I can do it based on schedule or based on number of records I inserted please? For example, once there are 10 new records, start transform or start the transform every 10 minutes.

Thanks,

Yi

1 ACCEPTED SOLUTION

Manoj Jain1
Giga Contributor

Hi Yi Dai



Follow following steps for scedule load:



1. Active "Asynchronous Import Set Transformer" job.


2. Change your import set state to loaded from loading.



If you will follow above steps it will work.


For fast result you can change frequency of job from day to second by running it periodically.


Once your test is done set the schedule as per your requirement.


Please   Mark as Helpful and correct answer, it it works for you so other can take help from your post.



Best Regards,


MJ


View solution in original post

10 REPLIES 10

bernyalvarado
Mega Sage

Hi,



Have you tried using web service import sets with asynchronous mode?



http://wiki.servicenow.com/index.php?title=Web_Service_Import_Sets#gsc.tab=0



Thanks,


Berny


Hi Berny,



It seems web service import sets works with SOAP? I guess my issue should be simpler than that.


By reading the link you provided, I changed the import set to be asynchronous mode, now the records I inserted remains pending state. If I can schedule a run, it should be good. But how can I trigger the Import Set run periodically please?


find_real_file.png


Hi Yi Dai,



By reading your article I think you have the solution for my issue.



My requirement is, I just need to make changes (add/modify) 'cmn_location' table on scheduled basis with my custom application data.



My application has all location value. Using API script I could get all the details.


What I need to do is, my api script should execute in a scheduled basis & get data from my application.


Then this data needs to be inserted into a staging table(intermediate table) & then this has to be transformed to 'cmn_location' table (insert/update).



I tried to create Transform map & tried to transform data manually.


But it is not happening. Wen I tried manual transform, i got the below error,



"No import set available. Create and load an import set first"



I don't know how to accomplish this.


Could you please advice



Thanks


Pirici


ydai
Mega Contributor

Hi prici,



Is your staging table extending the Import Set Row table? Transform map works with import set table.



Thanks,


Yi