Subversion Repositories SmartDukaan

Rev

Rev 4170 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
3747 vikas 1
<?xml version="1.0" encoding="UTF-8"?>
2
<transformation>
3
  <info>
4
    <name>crmLoader</name>
5
    <description/>
6
    <extended_description/>
7
    <trans_version/>
8
    <trans_type>Normal</trans_type>
9
    <trans_status>0</trans_status>
10
    <directory>&#47;</directory>
11
    <parameters>
12
    </parameters>
13
    <log>
14
<trans-log-table><connection/>
15
<schema/>
16
<table/>
17
<size_limit_lines/>
18
<interval/>
19
<timeout_days/>
20
<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>N</enabled><name>CHANNEL_ID</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STATUS</id><enabled>Y</enabled><name>STATUS</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name><subject/></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name><subject/></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name><subject/></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name><subject/></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name><subject/></field><field><id>LINES_REJECTED</id><enabled>N</enabled><name>LINES_REJECTED</name><subject/></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>STARTDATE</id><enabled>Y</enabled><name>STARTDATE</name></field><field><id>ENDDATE</id><enabled>Y</enabled><name>ENDDATE</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>DEPDATE</id><enabled>Y</enabled><name>DEPDATE</name></field><field><id>REPLAYDATE</id><enabled>Y</enabled><name>REPLAYDATE</name></field><field><id>LOG_FIELD</id><enabled>N</enabled><name>LOG_FIELD</name></field></trans-log-table>
21
<perf-log-table><connection/>
22
<schema/>
23
<table/>
24
<interval/>
25
<timeout_days/>
26
<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>SEQ_NR</id><enabled>Y</enabled><name>SEQ_NR</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>INPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>INPUT_BUFFER_ROWS</name></field><field><id>OUTPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>OUTPUT_BUFFER_ROWS</name></field></perf-log-table>
27
<channel-log-table><connection/>
28
<schema/>
29
<table/>
30
<timeout_days/>
31
<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>LOGGING_OBJECT_TYPE</id><enabled>Y</enabled><name>LOGGING_OBJECT_TYPE</name></field><field><id>OBJECT_NAME</id><enabled>Y</enabled><name>OBJECT_NAME</name></field><field><id>OBJECT_COPY</id><enabled>Y</enabled><name>OBJECT_COPY</name></field><field><id>REPOSITORY_DIRECTORY</id><enabled>Y</enabled><name>REPOSITORY_DIRECTORY</name></field><field><id>FILENAME</id><enabled>Y</enabled><name>FILENAME</name></field><field><id>OBJECT_ID</id><enabled>Y</enabled><name>OBJECT_ID</name></field><field><id>OBJECT_REVISION</id><enabled>Y</enabled><name>OBJECT_REVISION</name></field><field><id>PARENT_CHANNEL_ID</id><enabled>Y</enabled><name>PARENT_CHANNEL_ID</name></field><field><id>ROOT_CHANNEL_ID</id><enabled>Y</enabled><name>ROOT_CHANNEL_ID</name></field></channel-log-table>
32
<step-log-table><connection/>
33
<schema/>
34
<table/>
35
<timeout_days/>
36
<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>LOG_FIELD</id><enabled>N</enabled><name>LOG_FIELD</name></field></step-log-table>
37
    </log>
38
    <maxdate>
39
      <connection/>
40
      <table/>
41
      <field/>
42
      <offset>0.0</offset>
43
      <maxdiff>0.0</maxdiff>
44
    </maxdate>
45
    <size_rowset>10000</size_rowset>
46
    <sleep_time_empty>50</sleep_time_empty>
47
    <sleep_time_full>50</sleep_time_full>
48
    <unique_connections>N</unique_connections>
49
    <feedback_shown>Y</feedback_shown>
50
    <feedback_size>50000</feedback_size>
51
    <using_thread_priorities>Y</using_thread_priorities>
52
    <shared_objects_file/>
53
    <capture_step_performance>N</capture_step_performance>
54
    <step_performance_capturing_delay>1000</step_performance_capturing_delay>
55
    <step_performance_capturing_size_limit/>
56
    <dependencies>
57
    </dependencies>
58
    <partitionschemas>
59
    </partitionschemas>
60
    <slaveservers>
61
    </slaveservers>
62
    <clusterschemas>
63
    </clusterschemas>
64
  <created_user/>
65
  <created_date>2011&#47;07&#47;04 19:09:34.486</created_date>
66
  <modified_user>-</modified_user>
67
  <modified_date>2011&#47;06&#47;23 16:22:03.072</modified_date>
68
  </info>
69
  <notepads>
70
  </notepads>
71
  <connection>
72
    <name>crmDC_local</name>
73
    <server>localhost</server>
74
    <type>MYSQL</type>
75
    <access>Native</access>
76
    <database>crm</database>
77
    <port>3306</port>
78
    <username>root</username>
79
    <password>Encrypted 2be98afc86aa7f2e4b811a1608cc2fd8a</password>
80
    <servername/>
81
    <data_tablespace/>
82
    <index_tablespace/>
83
    <attributes>
84
      <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
85
      <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
86
      <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
87
      <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
88
      <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
89
      <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
90
      <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
91
      <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
92
      <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute>
93
      <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
94
    </attributes>
95
  </connection>
96
  <connection>
97
    <name>crmDC_Prod</name>
4044 vikas 98
    <server>192.168.191.71</server>
3747 vikas 99
    <type>MYSQL</type>
100
    <access>Native</access>
101
    <database>crm</database>
102
    <port>3306</port>
103
    <username>pentaho</username>
104
    <password>Encrypted 2be98afc86aa7f2e4cb79ac798cc2fd8a</password>
105
    <servername/>
106
    <data_tablespace/>
107
    <index_tablespace/>
108
    <attributes>
109
      <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
110
      <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
111
      <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
112
      <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
113
      <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
114
      <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
115
      <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
116
      <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
117
      <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute>
118
      <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
119
    </attributes>
120
  </connection>
121
  <connection>
122
    <name>salesDC</name>
123
    <server>localhost</server>
124
    <type>MYSQL</type>
125
    <access>Native</access>
126
    <database>sales</database>
127
    <port>3306</port>
128
    <username>root</username>
129
    <password>Encrypted 2be98afc86aa7f2e4b811a1608cc2fd8a</password>
130
    <servername/>
131
    <data_tablespace/>
132
    <index_tablespace/>
133
    <attributes>
134
      <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
135
      <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
136
      <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
137
      <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
138
      <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
139
      <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
140
      <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
141
      <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
142
      <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute>
143
      <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
144
    </attributes>
145
  </connection>
146
  <order>
147
  <hop> <from>crm</from><to>crm_Mapping</to><enabled>Y</enabled> </hop>  <hop> <from>crm_Mapping</from><to>crm_DW</to><enabled>Y</enabled> </hop>  </order>
148
  <step>
149
    <name>crm</name>
150
    <type>TableInput</type>
151
    <description/>
152
    <distribute>Y</distribute>
153
    <copies>1</copies>
154
         <partitioning>
155
           <method>none</method>
156
           <schema_name/>
157
           </partitioning>
158
    <connection>crmDC_Prod</connection>
159
    <sql>select datediff(rec.creationTimestamp, &apos;20101231&apos;) as date_id, ag.name, rec.ticketId, IFNULL(res.ticketStatus, rec.ticketStatus) status, IFNULL(res.ticketPriority, rec.ticketPriority) priority, rec.ticketCategory category, 
4030 vikas 160
hour(timediff(IFNULL(res.creationTimestamp, now()), rec.creationTimestamp)) response_hours,
161
datediff(IFNULL(t.closeDate, now()), t.openDate) ticket_close_days,
162
reopen.count reopen_count
3747 vikas 163
from activity rec  
5417 anupam.sin 164
left join activity res on (res.ticketId = rec.ticketId and (res.type = &apos;SEND_EMAIL_TO_CUSTOMER&apos; or res.type = &apos;CALLED_CUSTOMER&apos; or res.type = &apos;ESCALATE_TICKET&apos;) and res.creationTimestamp &gt; rec.creationTimestamp)  
165
inner join agent ag on (ag.id = res.creatorId)
166
inner join ticket t on (t.id = rec.ticketId)
167
left join (select a.ticketId, count(*) count from activity a, activity p where a.ticketStatus = &apos;REOPEN&apos; and p.id in (select max(i.id) from activity i where i.ticketId = a.ticketId and i.id &lt; a.id)  and p.ticketStatus != &apos;REOPEN&apos; and p.ticketId = a.ticketId group by a.ticketId) reopen on (reopen.ticketId = rec.ticketId)
168
where (res.type = &apos;SEND_EMAIL_TO_CUSTOMER&apos; or res.type = &apos;CALLED_CUSTOMER&apos; or res.type = &apos;ESCALATE_TICKET&apos; or res.type is null)
169
and (rec.type = &apos;RECEIVED_EMAIL_FROM_CUSTOMER&apos; or rec.type = &apos;RECEIVED_CALL_FROM_CUSTOMER&apos; )
170
and (res.creationTimestamp = (select min(a.creationTimestamp) from activity a where a.ticketId = rec.ticketId and a.creationTimestamp &gt; rec.creationTimestamp and (a.type = &apos;SEND_EMAIL_TO_CUSTOMER&apos; or a.type = &apos;CALLED_CUSTOMER&apos; or a.type = &apos;ESCALATE_TICKET&apos;)) or res.creationTimestamp is null);</sql>
3747 vikas 171
    <limit>0</limit>
172
    <lookup/>
173
    <execute_each_row>N</execute_each_row>
174
    <variables_active>N</variables_active>
175
    <lazy_conversion_active>N</lazy_conversion_active>
176
     <cluster_schema/>
177
 <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
4044 vikas 178
      <xloc>146</xloc>
179
      <yloc>167</yloc>
3747 vikas 180
      <draw>Y</draw>
181
      </GUI>
182
    </step>
183
 
184
  <step>
185
    <name>crm_DW</name>
186
    <type>TableOutput</type>
187
    <description/>
188
    <distribute>Y</distribute>
189
    <copies>1</copies>
190
         <partitioning>
191
           <method>none</method>
192
           <schema_name/>
193
           </partitioning>
194
    <connection>salesDC</connection>
195
    <schema/>
196
    <table>crm</table>
197
    <commit>1000</commit>
198
    <truncate>Y</truncate>
199
    <ignore_errors>N</ignore_errors>
200
    <use_batch>Y</use_batch>
201
    <specify_fields>N</specify_fields>
202
    <partitioning_enabled>N</partitioning_enabled>
203
    <partitioning_field/>
204
    <partitioning_daily>N</partitioning_daily>
205
    <partitioning_monthly>Y</partitioning_monthly>
206
    <tablename_in_field>N</tablename_in_field>
207
    <tablename_field/>
208
    <tablename_in_table>Y</tablename_in_table>
209
    <return_keys>N</return_keys>
210
    <return_field/>
211
    <fields>
212
        <field>
213
          <column_name>id</column_name>
214
          <stream_name>id</stream_name>
215
        </field>
216
        <field>
217
          <column_name>product_group</column_name>
218
          <stream_name>product_group</stream_name>
219
        </field>
220
        <field>
221
          <column_name>brand</column_name>
222
          <stream_name>brand</stream_name>
223
        </field>
224
        <field>
225
          <column_name>model_number</column_name>
226
          <stream_name>model_number</stream_name>
227
        </field>
228
        <field>
229
          <column_name>model_name</column_name>
230
          <stream_name>model_name</stream_name>
231
        </field>
232
        <field>
233
          <column_name>color</column_name>
234
          <stream_name>color</stream_name>
235
        </field>
236
        <field>
237
          <column_name>category</column_name>
238
          <stream_name>category</stream_name>
239
        </field>
240
    </fields>
241
     <cluster_schema/>
242
 <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
243
      <xloc>435</xloc>
244
      <yloc>166</yloc>
245
      <draw>Y</draw>
246
      </GUI>
247
    </step>
248
 
249
  <step>
250
    <name>crm_Mapping</name>
251
    <type>SelectValues</type>
252
    <description/>
253
    <distribute>Y</distribute>
254
    <copies>1</copies>
255
         <partitioning>
256
           <method>none</method>
257
           <schema_name/>
258
           </partitioning>
259
    <fields>      <field>        <name>date_id</name>
4030 vikas 260
        <rename>date_id</rename>
3747 vikas 261
        <length>-2</length>
262
        <precision>-2</precision>
263
      </field>      <field>        <name>name</name>
4030 vikas 264
        <rename>name</rename>
3747 vikas 265
        <length>-2</length>
266
        <precision>-2</precision>
267
      </field>      <field>        <name>ticketId</name>
4030 vikas 268
        <rename>ticketId</rename>
3747 vikas 269
        <length>-2</length>
270
        <precision>-2</precision>
271
      </field>      <field>        <name>status</name>
4030 vikas 272
        <rename>status</rename>
3747 vikas 273
        <length>-2</length>
274
        <precision>-2</precision>
275
      </field>      <field>        <name>priority</name>
4030 vikas 276
        <rename>priority</rename>
3747 vikas 277
        <length>-2</length>
278
        <precision>-2</precision>
279
      </field>      <field>        <name>category</name>
4030 vikas 280
        <rename>category</rename>
3747 vikas 281
        <length>-2</length>
282
        <precision>-2</precision>
283
      </field>      <field>        <name>response_hours</name>
4030 vikas 284
        <rename>response_hours</rename>
3747 vikas 285
        <length>-2</length>
286
        <precision>-2</precision>
4030 vikas 287
      </field>      <field>        <name>ticket_close_days</name>
288
        <rename>ticket_close_days</rename>
289
        <length>-2</length>
290
        <precision>-2</precision>
291
      </field>      <field>        <name>reopen_count</name>
292
        <rename>reopen_count</rename>
293
        <length>-2</length>
294
        <precision>-2</precision>
3747 vikas 295
      </field>        <select_unspecified>N</select_unspecified>
296
    </fields>     <cluster_schema/>
297
 <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
298
      <xloc>303</xloc>
299
      <yloc>167</yloc>
300
      <draw>Y</draw>
301
      </GUI>
302
    </step>
303
 
304
  <step_error_handling>
305
  </step_error_handling>
306
   <slave-step-copy-partition-distribution>
307
</slave-step-copy-partition-distribution>
308
   <slave_transformation>N</slave_transformation>
309
</transformation>