<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Kill Schema Load using CLI in Data &amp; Schema Discussions</title>
    <link>https://community.incorta.com/t5/data-schema-discussions/kill-schema-load-using-cli/m-p/1578#M54</link>
    <description>&lt;DIV class=""&gt;Hello Community!!&lt;/DIV&gt;&lt;DIV class=""&gt;Can you please provide any info on how to kill any particular running schema load jobs using CLI? Our ultimate goal is for&amp;nbsp;automating&amp;nbsp;to kill any loading jobs for particular schema if it exceeds the threshold time while extraction or enriching states without having any manual intervention.&lt;/DIV&gt;&lt;DIV class=""&gt;Thanks,&lt;/DIV&gt;&lt;DIV class=""&gt;Srinivas Chava&lt;/DIV&gt;</description>
    <pubDate>Tue, 17 May 2022 19:22:47 GMT</pubDate>
    <dc:creator>srini_ch</dc:creator>
    <dc:date>2022-05-17T19:22:47Z</dc:date>
    <item>
      <title>Kill Schema Load using CLI</title>
      <link>https://community.incorta.com/t5/data-schema-discussions/kill-schema-load-using-cli/m-p/1578#M54</link>
      <description>&lt;DIV class=""&gt;Hello Community!!&lt;/DIV&gt;&lt;DIV class=""&gt;Can you please provide any info on how to kill any particular running schema load jobs using CLI? Our ultimate goal is for&amp;nbsp;automating&amp;nbsp;to kill any loading jobs for particular schema if it exceeds the threshold time while extraction or enriching states without having any manual intervention.&lt;/DIV&gt;&lt;DIV class=""&gt;Thanks,&lt;/DIV&gt;&lt;DIV class=""&gt;Srinivas Chava&lt;/DIV&gt;</description>
      <pubDate>Tue, 17 May 2022 19:22:47 GMT</pubDate>
      <guid>https://community.incorta.com/t5/data-schema-discussions/kill-schema-load-using-cli/m-p/1578#M54</guid>
      <dc:creator>srini_ch</dc:creator>
      <dc:date>2022-05-17T19:22:47Z</dc:date>
    </item>
    <item>
      <title>Re: Kill Schema Load using CLI</title>
      <link>https://community.incorta.com/t5/data-schema-discussions/kill-schema-load-using-cli/m-p/1579#M55</link>
      <description>&lt;DIV class="topic-reply__text formatted"&gt;
&lt;P&gt;You should be able to see a sample CLI with the name "force_stop_schema_load_sample.sh" in the&amp;lt;Incorta Home&amp;gt;/IncortaNode/bin.&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It was introduced since 4.7.5&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 17 May 2022 19:24:03 GMT</pubDate>
      <guid>https://community.incorta.com/t5/data-schema-discussions/kill-schema-load-using-cli/m-p/1579#M55</guid>
      <dc:creator>dylanwan</dc:creator>
      <dc:date>2022-05-17T19:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: Kill Schema Load using CLI</title>
      <link>https://community.incorta.com/t5/data-schema-discussions/kill-schema-load-using-cli/m-p/1580#M56</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thanks for the response!! Above script is very helpful, but it still solves only one aspect of intended sol&lt;/SPAN&gt;&lt;SPAN&gt;ution. I couldn't find any similar scripts to get the active schema load jobs running and the time elapsed since job start. Can you please help me with this?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2022 19:25:05 GMT</pubDate>
      <guid>https://community.incorta.com/t5/data-schema-discussions/kill-schema-load-using-cli/m-p/1580#M56</guid>
      <dc:creator>srini_ch</dc:creator>
      <dc:date>2022-05-17T19:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: Kill Schema Load using CLI</title>
      <link>https://community.incorta.com/t5/data-schema-discussions/kill-schema-load-using-cli/m-p/1581#M57</link>
      <description>&lt;P&gt;As mentioned by Senthil, you can get the active schema load jobs running and the time elapsed by querying the Incorta Metadata tables.&amp;nbsp; Please note that the incorta metadata table schema changed a&amp;nbsp; lot during Incorta 4.9.&amp;nbsp; In an earlier release, you can use LDR_JOBS (Schema Level) and LDR_JOB_DETAILS (Table level).&amp;nbsp; Since the Incorta 4.9, we shared IncortaMetadata Dashboards and it uses the business view that access the table&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;called JOB.&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;The new JOB table include both job history and current running job and include both schema and table level in one table. Querying IncortaMetadata database is not a supported feature unless you go through&amp;nbsp;the incorta business schema _incorta, as shipped in community.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;A&amp;nbsp;non-published API&amp;nbsp;getSchemaStatus is available but we cannot guarantee that it will be supported in the future, either.&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class="prettyprint prettyprinted"&gt;&lt;SPAN class="kwd"&gt;def&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; getSchemaStatus&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;session&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; schemaId&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;
    resp &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt; &lt;SPAN class="kwd"&gt;get&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;session&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt; &lt;SPAN class="str"&gt;"/service/schema/getSchemaStatus?schemaId="&lt;/SPAN&gt; &lt;SPAN class="pun"&gt;+&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; str&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;schemaId&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;))&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;
    check_result&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;resp&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt; &lt;SPAN class="lit"&gt;200&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt; &lt;SPAN class="kwd"&gt;None&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;)&lt;/SPAN&gt;
    &lt;SPAN class="kwd"&gt;return&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; resp&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;json&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;()&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;The meaning of the status value also changed in 4.9.&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2022 19:26:04 GMT</pubDate>
      <guid>https://community.incorta.com/t5/data-schema-discussions/kill-schema-load-using-cli/m-p/1581#M57</guid>
      <dc:creator>dylanwan</dc:creator>
      <dc:date>2022-05-17T19:26:04Z</dc:date>
    </item>
    <item>
      <title>Re: Kill Schema Load using CLI</title>
      <link>https://community.incorta.com/t5/data-schema-discussions/kill-schema-load-using-cli/m-p/1582#M58</link>
      <description>&lt;P&gt;Dylan,&lt;/P&gt;&lt;P&gt;We are using 4.8.1 version.&amp;nbsp; I don't find this script under IncortaNode/bin directory.&amp;nbsp; Can you please share this script?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Srinivas,&lt;/P&gt;&lt;P&gt;We have built custom scripts&amp;nbsp;by retrieving details from&amp;nbsp;&amp;nbsp;Incorta metadb (oracle) table -&amp;gt; LDR_JOB_DETAILS&amp;nbsp;&amp;nbsp;to find active schema load jobs.&amp;nbsp; Our requirement is to alert the support team rather than killing the active job.&amp;nbsp; This&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;approach is very effective and we are able to get the duration of the active schema job and act accordingly.&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2022 19:27:14 GMT</pubDate>
      <guid>https://community.incorta.com/t5/data-schema-discussions/kill-schema-load-using-cli/m-p/1582#M58</guid>
      <dc:creator>srini_ch</dc:creator>
      <dc:date>2022-05-17T19:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: Kill Schema Load using CLI</title>
      <link>https://community.incorta.com/t5/data-schema-discussions/kill-schema-load-using-cli/m-p/1583#M59</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class="prettyprint prettyprinted"&gt;&lt;SPAN class="com"&gt;# ************************************************************************&lt;/SPAN&gt;
&lt;SPAN class="com"&gt;# Incorta bash api sample force stop schema load job&lt;/SPAN&gt;
&lt;SPAN class="com"&gt;# ************************************************************************&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;

cur_dir&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;$&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; cd &lt;/SPAN&gt;&lt;SPAN class="str"&gt;"$( dirname "&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;$&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;{&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;BASH_SOURCE&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;[&lt;/SPAN&gt;&lt;SPAN class="lit"&gt;0&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;]}&lt;/SPAN&gt;&lt;SPAN class="str"&gt;" )"&lt;/SPAN&gt; &lt;SPAN class="pun"&gt;&amp;amp;&amp;amp;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; pwd &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;
incorta_cmd&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="str"&gt;"python $cur_dir/incorta.py"&lt;/SPAN&gt;

&lt;SPAN class="com"&gt;# login to incorta&lt;/SPAN&gt;
&lt;SPAN class="com"&gt;# you have to save the session to be used in every other call&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;
session&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="str"&gt;`$incorta_cmd login &amp;lt;INCORTA_URL&amp;gt; &amp;lt;TENANT_NAME&amp;gt; &amp;lt;SUPER_USER&amp;gt; &amp;lt;SUPER_PASSWORD&amp;gt; &amp;lt;VERIFY_CERTIFICATE&amp;gt;`&lt;/SPAN&gt;
&lt;SPAN class="com"&gt;# e.g. session=`$incorta_cmd login http://localhost:8080/incorta demo super super`&lt;/SPAN&gt;

&lt;SPAN class="com"&gt;# Stop if login failed&lt;/SPAN&gt;
&lt;SPAN class="kwd"&gt;if&lt;/SPAN&gt; &lt;SPAN class="pun"&gt;[&lt;/SPAN&gt; &lt;SPAN class="pun"&gt;-&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;z &lt;/SPAN&gt;&lt;SPAN class="str"&gt;"$session"&lt;/SPAN&gt; &lt;SPAN class="pun"&gt;];&lt;/SPAN&gt; &lt;SPAN class="kwd"&gt;then&lt;/SPAN&gt;
    &lt;SPAN class="kwd"&gt;exit&lt;/SPAN&gt; &lt;SPAN class="lit"&gt;1&lt;/SPAN&gt;
&lt;SPAN class="kwd"&gt;fi&lt;/SPAN&gt;

&lt;SPAN class="com"&gt;#force stop loading job for specified schema&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;
$incorta_cmd force_stop_schema_load $session schema_name
&lt;/SPAN&gt;&lt;SPAN class="com"&gt;# e.g. $incorta_cmd force_stop_schema_load $session 'SALES'&lt;/SPAN&gt;

&lt;SPAN class="com"&gt;# log out from the server&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;
$incorta_cmd logout $session&lt;/SPAN&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 17 May 2022 19:28:18 GMT</pubDate>
      <guid>https://community.incorta.com/t5/data-schema-discussions/kill-schema-load-using-cli/m-p/1583#M59</guid>
      <dc:creator>dylanwan</dc:creator>
      <dc:date>2022-05-17T19:28:18Z</dc:date>
    </item>
  </channel>
</rss>

