The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

For the 1st time i am using MACROS. I want to set the macro dynamically while reading data.

Somnath_DasSomnath_Das Member Posts: 31 Maven
<?xml version="1.0" encoding="UTF-8"?><process version="9.9.000">
  <context>
    <input/>
    <output/>
    <macros/>
  </context>
  <operator activated="true" class="process" compatibility="9.4.000" expanded="true" name="Process" origin="GENERATED_TUTORIAL">
    <parameter key="logverbosity" value="init"/>
    <parameter key="random_seed" value="2001"/>
    <parameter key="send_mail" value="never"/>
    <parameter key="notification_email" value=""/>
    <parameter key="process_duration_for_mail" value="30"/>
    <parameter key="encoding" value="SYSTEM"/>
    <process expanded="true">
      <operator activated="true" class="retrieve" compatibility="9.9.000" expanded="true" height="68" name="Retrieve card_fraud_txns" width="90" x="45" y="34">
        <parameter key="repository_entry" value="../data/card/card_fraud_txns"/>
      </operator>
      <operator activated="true" class="extract_macro" compatibility="9.9.000" expanded="true" height="68" name="Extract Macro" width="90" x="179" y="34">
        <parameter key="macro" value="acct"/>
        <parameter key="macro_type" value="data_value"/>
        <parameter key="statistics" value="average"/>
        <parameter key="attribute_name" value="DR_ACCOUNT_ID"/>
        <parameter key="example_index" value="1"/>
        <list key="additional_macros"/>
      </operator>
      <operator activated="true" class="jdbc_connectors:read_database" compatibility="9.9.000" expanded="true" height="82" name="Read Database (2)" width="90" x="179" y="136">
        <parameter key="define_connection" value="repository"/>
        <parameter key="connection_entry" value="/Connections/ML_UAT_DB"/>
        <parameter key="database_system" value="MySQL"/>
        <parameter key="define_query" value="query"/>
        <parameter key="query" value="select * from cust_account where 'hostAcctId' in %{acct}"/>
        <parameter key="use_default_schema" value="true"/>
        <parameter key="prepare_statement" value="false"/>
        <enumeration key="parameters"/>
        <parameter key="datamanagement" value="double_array"/>
        <parameter key="data_management" value="auto"/>
      </operator>
      <connect from_op="Retrieve card_fraud_txns" from_port="output" to_op="Extract Macro" to_port="example set"/>
      <connect from_op="Read Database (2)" from_port="output" to_port="result 1"/>
      <portSpacing port="source_input 1" spacing="0"/>
      <portSpacing port="sink_result 1" spacing="0"/>
      <portSpacing port="sink_result 2" spacing="0"/>
      <background height="232" location="//Samples/Tutorials/Basics/01/tutorial1" width="1502" x="26" y="47"/>
    </process>
  </operator>
</process>

Best Answer

Sign In or Register to comment.