// ============================================================================
//
// Copyright (c) 2006-2015, Talend Inc.
//
// This source code has been automatically generated by_Talend Open Studio for Data Integration
// / Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// 
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package llj_sae_integrationdatawarehouse.dimensiongeography_0_1;

import routines.Numeric;
import routines.DataOperation;
import routines.TalendDataGenerator;
import routines.TalendStringUtil;
import routines.TalendString;
import routines.StringHandling;
import routines.Relational;
import routines.TalendDate;
import routines.Mathematical;
import routines.system.*;
import routines.system.api.*;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.math.BigDecimal;
import java.io.ByteArrayOutputStream;
import java.io.ByteArrayInputStream;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.ObjectOutputStream;
import java.io.ObjectInputStream;
import java.io.IOException;
import java.util.Comparator;

@SuppressWarnings("unused")

/**
 * Job: dimensionGeography Purpose: <br>
 * Description: <br>
 * 
 * @author user@talend.com
 * @version 7.2.1.20190620_1446
 * @status
 */
public class dimensionGeography implements TalendJob {

	protected static void logIgnoredError(String message, Throwable cause) {
		System.err.println(message);
		if (cause != null) {
			cause.printStackTrace();
		}

	}

	public final Object obj = new Object();

	// for transmiting parameters purpose
	private Object valueObject = null;

	public Object getValueObject() {
		return this.valueObject;
	}

	public void setValueObject(Object valueObject) {
		this.valueObject = valueObject;
	}

	private final static String defaultCharset = java.nio.charset.Charset.defaultCharset().name();

	private final static String utf8Charset = "UTF-8";

	// contains type for every context property
	public class PropertiesWithType extends java.util.Properties {
		private static final long serialVersionUID = 1L;
		private java.util.Map<String, String> propertyTypes = new java.util.HashMap<>();

		public PropertiesWithType(java.util.Properties properties) {
			super(properties);
		}

		public PropertiesWithType() {
			super();
		}

		public void setContextType(String key, String type) {
			propertyTypes.put(key, type);
		}

		public String getContextType(String key) {
			return propertyTypes.get(key);
		}
	}

	// create and load default properties
	private java.util.Properties defaultProps = new java.util.Properties();

	// create application properties with default
	public class ContextProperties extends PropertiesWithType {

		private static final long serialVersionUID = 1L;

		public ContextProperties(java.util.Properties properties) {
			super(properties);
		}

		public ContextProperties() {
			super();
		}

		public void synchronizeContext() {

		}

	}

	protected ContextProperties context = new ContextProperties(); // will be instanciated by MS.

	public ContextProperties getContext() {
		return this.context;
	}

	private final String jobVersion = "0.1";
	private final String jobName = "dimensionGeography";
	private final String projectName = "LLJ_SAE_INTEGRATIONDATAWAREHOUSE";
	public Integer errorCode = null;
	private String currentComponent = "";

	private final java.util.Map<String, Object> globalMap = new java.util.HashMap<String, Object>();
	private final static java.util.Map<String, Object> junitGlobalMap = new java.util.HashMap<String, Object>();

	private final java.util.Map<String, Long> start_Hash = new java.util.HashMap<String, Long>();
	private final java.util.Map<String, Long> end_Hash = new java.util.HashMap<String, Long>();
	private final java.util.Map<String, Boolean> ok_Hash = new java.util.HashMap<String, Boolean>();
	public final java.util.List<String[]> globalBuffer = new java.util.ArrayList<String[]>();

	private RunStat runStat = new RunStat();

	// OSGi DataSource
	private final static String KEY_DB_DATASOURCES = "KEY_DB_DATASOURCES";

	private final static String KEY_DB_DATASOURCES_RAW = "KEY_DB_DATASOURCES_RAW";

	public void setDataSources(java.util.Map<String, javax.sql.DataSource> dataSources) {
		java.util.Map<String, routines.system.TalendDataSource> talendDataSources = new java.util.HashMap<String, routines.system.TalendDataSource>();
		for (java.util.Map.Entry<String, javax.sql.DataSource> dataSourceEntry : dataSources.entrySet()) {
			talendDataSources.put(dataSourceEntry.getKey(),
					new routines.system.TalendDataSource(dataSourceEntry.getValue()));
		}
		globalMap.put(KEY_DB_DATASOURCES, talendDataSources);
		globalMap.put(KEY_DB_DATASOURCES_RAW, new java.util.HashMap<String, javax.sql.DataSource>(dataSources));
	}

	private final java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream();
	private final java.io.PrintStream errorMessagePS = new java.io.PrintStream(new java.io.BufferedOutputStream(baos));

	public String getExceptionStackTrace() {
		if ("failure".equals(this.getStatus())) {
			errorMessagePS.flush();
			return baos.toString();
		}
		return null;
	}

	private Exception exception;

	public Exception getException() {
		if ("failure".equals(this.getStatus())) {
			return this.exception;
		}
		return null;
	}

	private class TalendException extends Exception {

		private static final long serialVersionUID = 1L;

		private java.util.Map<String, Object> globalMap = null;
		private Exception e = null;
		private String currentComponent = null;
		private String virtualComponentName = null;

		public void setVirtualComponentName(String virtualComponentName) {
			this.virtualComponentName = virtualComponentName;
		}

		private TalendException(Exception e, String errorComponent, final java.util.Map<String, Object> globalMap) {
			this.currentComponent = errorComponent;
			this.globalMap = globalMap;
			this.e = e;
		}

		public Exception getException() {
			return this.e;
		}

		public String getCurrentComponent() {
			return this.currentComponent;
		}

		public String getExceptionCauseMessage(Exception e) {
			Throwable cause = e;
			String message = null;
			int i = 10;
			while (null != cause && 0 < i--) {
				message = cause.getMessage();
				if (null == message) {
					cause = cause.getCause();
				} else {
					break;
				}
			}
			if (null == message) {
				message = e.getClass().getName();
			}
			return message;
		}

		@Override
		public void printStackTrace() {
			if (!(e instanceof TalendException || e instanceof TDieException)) {
				if (virtualComponentName != null && currentComponent.indexOf(virtualComponentName + "_") == 0) {
					globalMap.put(virtualComponentName + "_ERROR_MESSAGE", getExceptionCauseMessage(e));
				}
				globalMap.put(currentComponent + "_ERROR_MESSAGE", getExceptionCauseMessage(e));
				System.err.println("Exception in component " + currentComponent + " (" + jobName + ")");
			}
			if (!(e instanceof TDieException)) {
				if (e instanceof TalendException) {
					e.printStackTrace();
				} else {
					e.printStackTrace();
					e.printStackTrace(errorMessagePS);
					dimensionGeography.this.exception = e;
				}
			}
			if (!(e instanceof TalendException)) {
				try {
					for (java.lang.reflect.Method m : this.getClass().getEnclosingClass().getMethods()) {
						if (m.getName().compareTo(currentComponent + "_error") == 0) {
							m.invoke(dimensionGeography.this, new Object[] { e, currentComponent, globalMap });
							break;
						}
					}

					if (!(e instanceof TDieException)) {
					}
				} catch (Exception e) {
					this.e.printStackTrace();
				}
			}
		}
	}

	public void tFileInputDelimited_1_error(Exception exception, String errorComponent,
			final java.util.Map<String, Object> globalMap) throws TalendException {

		end_Hash.put(errorComponent, System.currentTimeMillis());

		status = "failure";

		tFileInputDelimited_8_onSubJobError(exception, errorComponent, globalMap);
	}

	public void tMap_1_error(Exception exception, String errorComponent, final java.util.Map<String, Object> globalMap)
			throws TalendException {

		end_Hash.put(errorComponent, System.currentTimeMillis());

		status = "failure";

		tFileInputDelimited_8_onSubJobError(exception, errorComponent, globalMap);
	}

	public void tDBOutput_1_error(Exception exception, String errorComponent,
			final java.util.Map<String, Object> globalMap) throws TalendException {

		end_Hash.put(errorComponent, System.currentTimeMillis());

		status = "failure";

		tFileInputDelimited_8_onSubJobError(exception, errorComponent, globalMap);
	}

	public void tFileInputDelimited_2_error(Exception exception, String errorComponent,
			final java.util.Map<String, Object> globalMap) throws TalendException {

		end_Hash.put(errorComponent, System.currentTimeMillis());

		status = "failure";

		tFileInputDelimited_8_onSubJobError(exception, errorComponent, globalMap);
	}

	public void tFileInputDelimited_3_error(Exception exception, String errorComponent,
			final java.util.Map<String, Object> globalMap) throws TalendException {

		end_Hash.put(errorComponent, System.currentTimeMillis());

		status = "failure";

		tFileInputDelimited_8_onSubJobError(exception, errorComponent, globalMap);
	}

	public void tFileInputDelimited_4_error(Exception exception, String errorComponent,
			final java.util.Map<String, Object> globalMap) throws TalendException {

		end_Hash.put(errorComponent, System.currentTimeMillis());

		status = "failure";

		tFileInputDelimited_8_onSubJobError(exception, errorComponent, globalMap);
	}

	public void tFileInputDelimited_5_error(Exception exception, String errorComponent,
			final java.util.Map<String, Object> globalMap) throws TalendException {

		end_Hash.put(errorComponent, System.currentTimeMillis());

		status = "failure";

		tFileInputDelimited_8_onSubJobError(exception, errorComponent, globalMap);
	}

	public void tFileInputDelimited_6_error(Exception exception, String errorComponent,
			final java.util.Map<String, Object> globalMap) throws TalendException {

		end_Hash.put(errorComponent, System.currentTimeMillis());

		status = "failure";

		tFileInputDelimited_8_onSubJobError(exception, errorComponent, globalMap);
	}

	public void tFileInputDelimited_7_error(Exception exception, String errorComponent,
			final java.util.Map<String, Object> globalMap) throws TalendException {

		end_Hash.put(errorComponent, System.currentTimeMillis());

		status = "failure";

		tFileInputDelimited_8_onSubJobError(exception, errorComponent, globalMap);
	}

	public void tFileInputDelimited_8_error(Exception exception, String errorComponent,
			final java.util.Map<String, Object> globalMap) throws TalendException {

		end_Hash.put(errorComponent, System.currentTimeMillis());

		status = "failure";

		tFileInputDelimited_8_onSubJobError(exception, errorComponent, globalMap);
	}

	public void tFileOutputDelimited_1_error(Exception exception, String errorComponent,
			final java.util.Map<String, Object> globalMap) throws TalendException {

		end_Hash.put(errorComponent, System.currentTimeMillis());

		status = "failure";

		tFileOutputDelimited_1_onSubJobError(exception, errorComponent, globalMap);
	}

	public void tAdvancedHash_row8_error(Exception exception, String errorComponent,
			final java.util.Map<String, Object> globalMap) throws TalendException {

		end_Hash.put(errorComponent, System.currentTimeMillis());

		status = "failure";

		tFileInputDelimited_8_onSubJobError(exception, errorComponent, globalMap);
	}

	public void tAdvancedHash_row2_error(Exception exception, String errorComponent,
			final java.util.Map<String, Object> globalMap) throws TalendException {

		end_Hash.put(errorComponent, System.currentTimeMillis());

		status = "failure";

		tFileInputDelimited_8_onSubJobError(exception, errorComponent, globalMap);
	}

	public void tAdvancedHash_row3_error(Exception exception, String errorComponent,
			final java.util.Map<String, Object> globalMap) throws TalendException {

		end_Hash.put(errorComponent, System.currentTimeMillis());

		status = "failure";

		tFileInputDelimited_8_onSubJobError(exception, errorComponent, globalMap);
	}

	public void tAdvancedHash_row4_error(Exception exception, String errorComponent,
			final java.util.Map<String, Object> globalMap) throws TalendException {

		end_Hash.put(errorComponent, System.currentTimeMillis());

		status = "failure";

		tFileInputDelimited_8_onSubJobError(exception, errorComponent, globalMap);
	}

	public void tAdvancedHash_row5_error(Exception exception, String errorComponent,
			final java.util.Map<String, Object> globalMap) throws TalendException {

		end_Hash.put(errorComponent, System.currentTimeMillis());

		status = "failure";

		tFileInputDelimited_8_onSubJobError(exception, errorComponent, globalMap);
	}

	public void tAdvancedHash_row6_error(Exception exception, String errorComponent,
			final java.util.Map<String, Object> globalMap) throws TalendException {

		end_Hash.put(errorComponent, System.currentTimeMillis());

		status = "failure";

		tFileInputDelimited_8_onSubJobError(exception, errorComponent, globalMap);
	}

	public void tAdvancedHash_row7_error(Exception exception, String errorComponent,
			final java.util.Map<String, Object> globalMap) throws TalendException {

		end_Hash.put(errorComponent, System.currentTimeMillis());

		status = "failure";

		tFileInputDelimited_8_onSubJobError(exception, errorComponent, globalMap);
	}

	public void tFileInputDelimited_8_onSubJobError(Exception exception, String errorComponent,
			final java.util.Map<String, Object> globalMap) throws TalendException {

		resumeUtil.addLog("SYSTEM_LOG", "NODE:" + errorComponent, "", Thread.currentThread().getId() + "", "FATAL", "",
				exception.getMessage(), ResumeUtil.getExceptionStackTrace(exception), "");

	}

	public void tFileOutputDelimited_1_onSubJobError(Exception exception, String errorComponent,
			final java.util.Map<String, Object> globalMap) throws TalendException {

		resumeUtil.addLog("SYSTEM_LOG", "NODE:" + errorComponent, "", Thread.currentThread().getId() + "", "FATAL", "",
				exception.getMessage(), ResumeUtil.getExceptionStackTrace(exception), "");

	}

	public static class row8Struct implements routines.system.IPersistableComparableLookupRow<row8Struct> {
		final static byte[] commonByteArrayLock_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography = new byte[0];
		static byte[] commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography = new byte[0];
		protected static final int DEFAULT_HASHCODE = 1;
		protected static final int PRIME = 31;
		protected int hashCode = DEFAULT_HASHCODE;
		public boolean hashCodeDirty = true;

		public String loopKey;

		public String City_ID;

		public String getCity_ID() {
			return this.City_ID;
		}

		public String City_Name;

		public String getCity_Name() {
			return this.City_Name;
		}

		public String Country;

		public String getCountry() {
			return this.Country;
		}

		@Override
		public int hashCode() {
			if (this.hashCodeDirty) {
				final int prime = PRIME;
				int result = DEFAULT_HASHCODE;

				result = prime * result + ((this.Country == null) ? 0 : this.Country.hashCode());

				this.hashCode = result;
				this.hashCodeDirty = false;
			}
			return this.hashCode;
		}

		@Override
		public boolean equals(Object obj) {
			if (this == obj)
				return true;
			if (obj == null)
				return false;
			if (getClass() != obj.getClass())
				return false;
			final row8Struct other = (row8Struct) obj;

			if (this.Country == null) {
				if (other.Country != null)
					return false;

			} else if (!this.Country.equals(other.Country))

				return false;

			return true;
		}

		public void copyDataTo(row8Struct other) {

			other.City_ID = this.City_ID;
			other.City_Name = this.City_Name;
			other.Country = this.Country;

		}

		public void copyKeysDataTo(row8Struct other) {

			other.Country = this.Country;

		}

		private String readString(DataInputStream dis, ObjectInputStream ois) throws IOException {
			String strReturn = null;
			int length = 0;
			length = dis.readInt();
			if (length == -1) {
				strReturn = null;
			} else {
				byte[] byteArray = new byte[length];
				dis.read(byteArray);
				strReturn = new String(byteArray, utf8Charset);
			}
			return strReturn;
		}

		private void writeString(String str, DataOutputStream dos, ObjectOutputStream oos) throws IOException {
			if (str == null) {
				dos.writeInt(-1);
			} else {
				byte[] byteArray = str.getBytes(utf8Charset);
				dos.writeInt(byteArray.length);
				dos.write(byteArray);
			}
		}

		private String readString(ObjectInputStream dis) throws IOException {
			String strReturn = null;
			int length = 0;
			length = dis.readInt();
			if (length == -1) {
				strReturn = null;
			} else {
				if (length > commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography.length) {
					if (length < 1024
							&& commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography.length == 0) {
						commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography = new byte[1024];
					} else {
						commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography = new byte[2 * length];
					}
				}
				dis.readFully(commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography, 0, length);
				strReturn = new String(commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography, 0, length,
						utf8Charset);
			}
			return strReturn;
		}

		private void writeString(String str, ObjectOutputStream dos) throws IOException {
			if (str == null) {
				dos.writeInt(-1);
			} else {
				byte[] byteArray = str.getBytes(utf8Charset);
				dos.writeInt(byteArray.length);
				dos.write(byteArray);
			}
		}

		public void readKeysData(ObjectInputStream dis) {

			synchronized (commonByteArrayLock_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography) {

				try {

					int length = 0;

					this.Country = readString(dis);

				} catch (IOException e) {
					throw new RuntimeException(e);

				}

			}

		}

		public void writeKeysData(ObjectOutputStream dos) {
			try {

				// String

				writeString(this.Country, dos);

			} catch (IOException e) {
				throw new RuntimeException(e);
			}

		}

		/**
		 * Fill Values data by reading ObjectInputStream.
		 */
		public void readValuesData(DataInputStream dis, ObjectInputStream ois) {
			try {

				int length = 0;

				this.City_ID = readString(dis, ois);

				this.City_Name = readString(dis, ois);

			} catch (IOException e) {
				throw new RuntimeException(e);

			}

		}

		/**
		 * Return a byte array which represents Values data.
		 */
		public void writeValuesData(DataOutputStream dos, ObjectOutputStream oos) {
			try {

				writeString(this.City_ID, dos, oos);

				writeString(this.City_Name, dos, oos);

			} catch (IOException e) {
				throw new RuntimeException(e);
			}

		}

		public String toString() {

			StringBuilder sb = new StringBuilder();
			sb.append(super.toString());
			sb.append("[");
			sb.append("City_ID=" + City_ID);
			sb.append(",City_Name=" + City_Name);
			sb.append(",Country=" + Country);
			sb.append("]");

			return sb.toString();
		}

		/**
		 * Compare keys
		 */
		public int compareTo(row8Struct other) {

			int returnValue = -1;

			returnValue = checkNullsAndCompare(this.Country, other.Country);
			if (returnValue != 0) {
				return returnValue;
			}

			return returnValue;
		}

		private int checkNullsAndCompare(Object object1, Object object2) {
			int returnValue = 0;
			if (object1 instanceof Comparable && object2 instanceof Comparable) {
				returnValue = ((Comparable) object1).compareTo(object2);
			} else if (object1 != null && object2 != null) {
				returnValue = compareStrings(object1.toString(), object2.toString());
			} else if (object1 == null && object2 != null) {
				returnValue = 1;
			} else if (object1 != null && object2 == null) {
				returnValue = -1;
			} else {
				returnValue = 0;
			}

			return returnValue;
		}

		private int compareStrings(String string1, String string2) {
			return string1.compareTo(string2);
		}

	}

	public void tFileInputDelimited_1Process(final java.util.Map<String, Object> globalMap) throws TalendException {
		globalMap.put("tFileInputDelimited_1_SUBPROCESS_STATE", 0);

		final boolean execStat = this.execStat;

		String iterateId = "";

		String currentComponent = "";
		java.util.Map<String, Object> resourceMap = new java.util.HashMap<String, Object>();

		try {
			// TDI-39566 avoid throwing an useless Exception
			boolean resumeIt = true;
			if (globalResumeTicket == false && resumeEntryMethodName != null) {
				String currentMethodName = new java.lang.Exception().getStackTrace()[0].getMethodName();
				resumeIt = resumeEntryMethodName.equals(currentMethodName);
			}
			if (resumeIt || globalResumeTicket) { // start the resume
				globalResumeTicket = true;

				row8Struct row8 = new row8Struct();

				/**
				 * [tAdvancedHash_row8 begin ] start
				 */

				ok_Hash.put("tAdvancedHash_row8", false);
				start_Hash.put("tAdvancedHash_row8", System.currentTimeMillis());

				currentComponent = "tAdvancedHash_row8";

				if (execStat) {
					if (resourceMap.get("inIterateVComp") == null) {

						if (execStat) {
							runStat.updateStatOnConnection("row8" + iterateId, 0, 0);
						}

					}
				}

				int tos_count_tAdvancedHash_row8 = 0;

				// connection name:row8
				// source node:tFileInputDelimited_1 - inputs:(after_tFileInputDelimited_8)
				// outputs:(row8,row8) | target node:tAdvancedHash_row8 - inputs:(row8)
				// outputs:()
				// linked node: tMap_1 - inputs:(row8,row2,row3,row4,row5,row6,row7,row1)
				// outputs:(sortieCsv)

				org.talend.designer.components.lookup.common.ICommonLookup.MATCHING_MODE matchingModeEnum_row8 = org.talend.designer.components.lookup.common.ICommonLookup.MATCHING_MODE.UNIQUE_MATCH;

				org.talend.designer.components.lookup.memory.AdvancedMemoryLookup<row8Struct> tHash_Lookup_row8 = org.talend.designer.components.lookup.memory.AdvancedMemoryLookup
						.<row8Struct>getLookup(matchingModeEnum_row8);

				globalMap.put("tHash_Lookup_row8", tHash_Lookup_row8);

				/**
				 * [tAdvancedHash_row8 begin ] stop
				 */

				/**
				 * [tFileInputDelimited_1 begin ] start
				 */

				ok_Hash.put("tFileInputDelimited_1", false);
				start_Hash.put("tFileInputDelimited_1", System.currentTimeMillis());

				currentComponent = "tFileInputDelimited_1";

				int tos_count_tFileInputDelimited_1 = 0;

				final routines.system.RowState rowstate_tFileInputDelimited_1 = new routines.system.RowState();

				int nb_line_tFileInputDelimited_1 = 0;
				int footer_tFileInputDelimited_1 = 0;
				int totalLinetFileInputDelimited_1 = 0;
				int limittFileInputDelimited_1 = -1;
				int lastLinetFileInputDelimited_1 = -1;

				char fieldSeparator_tFileInputDelimited_1[] = null;

				// support passing value (property: Field Separator) by 'context.fs' or
				// 'globalMap.get("fs")'.
				if (((String) ";").length() > 0) {
					fieldSeparator_tFileInputDelimited_1 = ((String) ";").toCharArray();
				} else {
					throw new IllegalArgumentException("Field Separator must be assigned a char.");
				}

				char rowSeparator_tFileInputDelimited_1[] = null;

				// support passing value (property: Row Separator) by 'context.rs' or
				// 'globalMap.get("rs")'.
				if (((String) "\n").length() > 0) {
					rowSeparator_tFileInputDelimited_1 = ((String) "\n").toCharArray();
				} else {
					throw new IllegalArgumentException("Row Separator must be assigned a char.");
				}

				Object filename_tFileInputDelimited_1 = /** Start field tFileInputDelimited_1:FILENAME */
						"C:/TEMP/TOS_DI-Win32-20190620_1446-V7.2.1/workspace/LLJ_SAE_INTEGRATIONDATAWAREHOUSE/Data/in/txt/1.txt"/**
																																 * End
																																 * field
																																 * tFileInputDelimited_1:FILENAME
																																 */
				;
				com.talend.csv.CSVReader csvReadertFileInputDelimited_1 = null;

				try {

					String[] rowtFileInputDelimited_1 = null;
					int currentLinetFileInputDelimited_1 = 0;
					int outputLinetFileInputDelimited_1 = 0;
					try {// TD110 begin
						if (filename_tFileInputDelimited_1 instanceof java.io.InputStream) {

							int footer_value_tFileInputDelimited_1 = 0;
							if (footer_value_tFileInputDelimited_1 > 0) {
								throw new java.lang.Exception(
										"When the input source is a stream,footer shouldn't be bigger than 0.");
							}

							csvReadertFileInputDelimited_1 = new com.talend.csv.CSVReader(
									(java.io.InputStream) filename_tFileInputDelimited_1,
									fieldSeparator_tFileInputDelimited_1[0], "US-ASCII");
						} else {
							csvReadertFileInputDelimited_1 = new com.talend.csv.CSVReader(
									new java.io.BufferedReader(new java.io.InputStreamReader(
											new java.io.FileInputStream(String.valueOf(filename_tFileInputDelimited_1)),
											"US-ASCII")),
									fieldSeparator_tFileInputDelimited_1[0]);
						}

						csvReadertFileInputDelimited_1.setTrimWhitespace(false);
						if ((rowSeparator_tFileInputDelimited_1[0] != '\n')
								&& (rowSeparator_tFileInputDelimited_1[0] != '\r'))
							csvReadertFileInputDelimited_1.setLineEnd("" + rowSeparator_tFileInputDelimited_1[0]);

						csvReadertFileInputDelimited_1.setQuoteChar('\"');

						// ?????doesn't work for other escapeChar
						// the default escape mode is double escape
						csvReadertFileInputDelimited_1.setEscapeChar(csvReadertFileInputDelimited_1.getQuoteChar());

						if (footer_tFileInputDelimited_1 > 0) {
							for (totalLinetFileInputDelimited_1 = 0; totalLinetFileInputDelimited_1 < 1; totalLinetFileInputDelimited_1++) {
								csvReadertFileInputDelimited_1.readNext();
							}
							csvReadertFileInputDelimited_1.setSkipEmptyRecords(true);
							while (csvReadertFileInputDelimited_1.readNext()) {

								rowtFileInputDelimited_1 = csvReadertFileInputDelimited_1.getValues();
								if (!(rowtFileInputDelimited_1.length == 1
										&& ("\015").equals(rowtFileInputDelimited_1[0]))) {// empty line when row
																							// separator is '\n'

									totalLinetFileInputDelimited_1++;

								}

							}
							int lastLineTemptFileInputDelimited_1 = totalLinetFileInputDelimited_1
									- footer_tFileInputDelimited_1 < 0 ? 0
											: totalLinetFileInputDelimited_1 - footer_tFileInputDelimited_1;
							if (lastLinetFileInputDelimited_1 > 0) {
								lastLinetFileInputDelimited_1 = lastLinetFileInputDelimited_1 < lastLineTemptFileInputDelimited_1
										? lastLinetFileInputDelimited_1
										: lastLineTemptFileInputDelimited_1;
							} else {
								lastLinetFileInputDelimited_1 = lastLineTemptFileInputDelimited_1;
							}

							csvReadertFileInputDelimited_1.close();
							if (filename_tFileInputDelimited_1 instanceof java.io.InputStream) {
								csvReadertFileInputDelimited_1 = new com.talend.csv.CSVReader(
										(java.io.InputStream) filename_tFileInputDelimited_1,
										fieldSeparator_tFileInputDelimited_1[0], "US-ASCII");
							} else {
								csvReadertFileInputDelimited_1 = new com.talend.csv.CSVReader(
										new java.io.BufferedReader(
												new java.io.InputStreamReader(
														new java.io.FileInputStream(
																String.valueOf(filename_tFileInputDelimited_1)),
														"US-ASCII")),
										fieldSeparator_tFileInputDelimited_1[0]);
							}
							csvReadertFileInputDelimited_1.setTrimWhitespace(false);
							if ((rowSeparator_tFileInputDelimited_1[0] != '\n')
									&& (rowSeparator_tFileInputDelimited_1[0] != '\r'))
								csvReadertFileInputDelimited_1.setLineEnd("" + rowSeparator_tFileInputDelimited_1[0]);

							csvReadertFileInputDelimited_1.setQuoteChar('\"');

							// ?????doesn't work for other escapeChar
							// the default escape mode is double escape
							csvReadertFileInputDelimited_1.setEscapeChar(csvReadertFileInputDelimited_1.getQuoteChar());

						}

						if (limittFileInputDelimited_1 != 0) {
							for (currentLinetFileInputDelimited_1 = 0; currentLinetFileInputDelimited_1 < 1; currentLinetFileInputDelimited_1++) {
								csvReadertFileInputDelimited_1.readNext();
							}
						}
						csvReadertFileInputDelimited_1.setSkipEmptyRecords(true);

					} catch (java.lang.Exception e) {

						System.err.println(e.getMessage());

					} // TD110 end

					while (limittFileInputDelimited_1 != 0 && csvReadertFileInputDelimited_1 != null
							&& csvReadertFileInputDelimited_1.readNext()) {
						rowstate_tFileInputDelimited_1.reset();

						rowtFileInputDelimited_1 = csvReadertFileInputDelimited_1.getValues();

						if (rowtFileInputDelimited_1.length == 1 && ("\015").equals(rowtFileInputDelimited_1[0])) {// empty
																													// line
																													// when
																													// row
																													// separator
																													// is
																													// '\n'
							continue;
						}

						currentLinetFileInputDelimited_1++;

						if (lastLinetFileInputDelimited_1 > -1
								&& currentLinetFileInputDelimited_1 > lastLinetFileInputDelimited_1) {
							break;
						}
						outputLinetFileInputDelimited_1++;
						if (limittFileInputDelimited_1 > 0
								&& outputLinetFileInputDelimited_1 > limittFileInputDelimited_1) {
							break;
						}

						row8 = null;

						row8 = null;

						boolean whetherReject_tFileInputDelimited_1 = false;
						row8 = new row8Struct();
						try {

							char fieldSeparator_tFileInputDelimited_1_ListType[] = null;
							// support passing value (property: Field Separator) by 'context.fs' or
							// 'globalMap.get("fs")'.
							if (((String) ";").length() > 0) {
								fieldSeparator_tFileInputDelimited_1_ListType = ((String) ";").toCharArray();
							} else {
								throw new IllegalArgumentException("Field Separator must be assigned a char.");
							}
							if (rowtFileInputDelimited_1.length == 1 && ("\015").equals(rowtFileInputDelimited_1[0])) {// empty
																														// line
																														// when
																														// row
																														// separator
																														// is
																														// '\n'

								row8.City_ID = null;

								row8.City_Name = null;

								row8.Country = null;

							} else {

								int columnIndexWithD_tFileInputDelimited_1 = 0; // Column Index

								columnIndexWithD_tFileInputDelimited_1 = 0;

								if (columnIndexWithD_tFileInputDelimited_1 < rowtFileInputDelimited_1.length) {

									row8.City_ID = rowtFileInputDelimited_1[columnIndexWithD_tFileInputDelimited_1];

								} else {

									row8.City_ID = null;

								}

								columnIndexWithD_tFileInputDelimited_1 = 1;

								if (columnIndexWithD_tFileInputDelimited_1 < rowtFileInputDelimited_1.length) {

									row8.City_Name = rowtFileInputDelimited_1[columnIndexWithD_tFileInputDelimited_1];

								} else {

									row8.City_Name = null;

								}

								columnIndexWithD_tFileInputDelimited_1 = 2;

								if (columnIndexWithD_tFileInputDelimited_1 < rowtFileInputDelimited_1.length) {

									row8.Country = rowtFileInputDelimited_1[columnIndexWithD_tFileInputDelimited_1];

								} else {

									row8.Country = null;

								}

							}

							if (rowstate_tFileInputDelimited_1.getException() != null) {
								throw rowstate_tFileInputDelimited_1.getException();
							}

						} catch (java.lang.Exception e) {
							whetherReject_tFileInputDelimited_1 = true;

							System.err.println(e.getMessage());
							row8 = null;

						}

						/**
						 * [tFileInputDelimited_1 begin ] stop
						 */

						/**
						 * [tFileInputDelimited_1 main ] start
						 */

						currentComponent = "tFileInputDelimited_1";

						tos_count_tFileInputDelimited_1++;

						/**
						 * [tFileInputDelimited_1 main ] stop
						 */

						/**
						 * [tFileInputDelimited_1 process_data_begin ] start
						 */

						currentComponent = "tFileInputDelimited_1";

						/**
						 * [tFileInputDelimited_1 process_data_begin ] stop
						 */
// Start of branch "row8"
						if (row8 != null) {

							/**
							 * [tAdvancedHash_row8 main ] start
							 */

							currentComponent = "tAdvancedHash_row8";

							// row8
							// row8

							if (execStat) {
								runStat.updateStatOnConnection("row8" + iterateId, 1, 1);
							}

							row8Struct row8_HashRow = new row8Struct();

							row8_HashRow.City_ID = row8.City_ID;

							row8_HashRow.City_Name = row8.City_Name;

							row8_HashRow.Country = row8.Country;

							tHash_Lookup_row8.put(row8_HashRow);

							tos_count_tAdvancedHash_row8++;

							/**
							 * [tAdvancedHash_row8 main ] stop
							 */

							/**
							 * [tAdvancedHash_row8 process_data_begin ] start
							 */

							currentComponent = "tAdvancedHash_row8";

							/**
							 * [tAdvancedHash_row8 process_data_begin ] stop
							 */

							/**
							 * [tAdvancedHash_row8 process_data_end ] start
							 */

							currentComponent = "tAdvancedHash_row8";

							/**
							 * [tAdvancedHash_row8 process_data_end ] stop
							 */

						} // End of branch "row8"

						/**
						 * [tFileInputDelimited_1 process_data_end ] start
						 */

						currentComponent = "tFileInputDelimited_1";

						/**
						 * [tFileInputDelimited_1 process_data_end ] stop
						 */

						/**
						 * [tFileInputDelimited_1 end ] start
						 */

						currentComponent = "tFileInputDelimited_1";

						nb_line_tFileInputDelimited_1++;
					}

				} finally {
					if (!(filename_tFileInputDelimited_1 instanceof java.io.InputStream)) {
						if (csvReadertFileInputDelimited_1 != null) {
							csvReadertFileInputDelimited_1.close();
						}
					}
					if (csvReadertFileInputDelimited_1 != null) {
						globalMap.put("tFileInputDelimited_1_NB_LINE", nb_line_tFileInputDelimited_1);
					}

				}

				ok_Hash.put("tFileInputDelimited_1", true);
				end_Hash.put("tFileInputDelimited_1", System.currentTimeMillis());

				/**
				 * [tFileInputDelimited_1 end ] stop
				 */

				/**
				 * [tAdvancedHash_row8 end ] start
				 */

				currentComponent = "tAdvancedHash_row8";

				tHash_Lookup_row8.endPut();

				if (execStat) {
					if (resourceMap.get("inIterateVComp") == null || !((Boolean) resourceMap.get("inIterateVComp"))) {
						runStat.updateStatOnConnection("row8" + iterateId, 2, 0);
					}
				}

				ok_Hash.put("tAdvancedHash_row8", true);
				end_Hash.put("tAdvancedHash_row8", System.currentTimeMillis());

				/**
				 * [tAdvancedHash_row8 end ] stop
				 */

			} // end the resume

		} catch (java.lang.Exception e) {

			TalendException te = new TalendException(e, currentComponent, globalMap);

			throw te;
		} catch (java.lang.Error error) {

			runStat.stopThreadStat();

			throw error;
		} finally {

			try {

				/**
				 * [tFileInputDelimited_1 finally ] start
				 */

				currentComponent = "tFileInputDelimited_1";

				/**
				 * [tFileInputDelimited_1 finally ] stop
				 */

				/**
				 * [tAdvancedHash_row8 finally ] start
				 */

				currentComponent = "tAdvancedHash_row8";

				/**
				 * [tAdvancedHash_row8 finally ] stop
				 */

			} catch (java.lang.Exception e) {
				// ignore
			} catch (java.lang.Error error) {
				// ignore
			}
			resourceMap = null;
		}

		globalMap.put("tFileInputDelimited_1_SUBPROCESS_STATE", 1);
	}

	public static class row2Struct implements routines.system.IPersistableComparableLookupRow<row2Struct> {
		final static byte[] commonByteArrayLock_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography = new byte[0];
		static byte[] commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography = new byte[0];
		protected static final int DEFAULT_HASHCODE = 1;
		protected static final int PRIME = 31;
		protected int hashCode = DEFAULT_HASHCODE;
		public boolean hashCodeDirty = true;

		public String loopKey;

		public String Continent_ID;

		public String getContinent_ID() {
			return this.Continent_ID;
		}

		public String Continent_Name;

		public String getContinent_Name() {
			return this.Continent_Name;
		}

		@Override
		public int hashCode() {
			if (this.hashCodeDirty) {
				final int prime = PRIME;
				int result = DEFAULT_HASHCODE;

				result = prime * result + ((this.Continent_ID == null) ? 0 : this.Continent_ID.hashCode());

				this.hashCode = result;
				this.hashCodeDirty = false;
			}
			return this.hashCode;
		}

		@Override
		public boolean equals(Object obj) {
			if (this == obj)
				return true;
			if (obj == null)
				return false;
			if (getClass() != obj.getClass())
				return false;
			final row2Struct other = (row2Struct) obj;

			if (this.Continent_ID == null) {
				if (other.Continent_ID != null)
					return false;

			} else if (!this.Continent_ID.equals(other.Continent_ID))

				return false;

			return true;
		}

		public void copyDataTo(row2Struct other) {

			other.Continent_ID = this.Continent_ID;
			other.Continent_Name = this.Continent_Name;

		}

		public void copyKeysDataTo(row2Struct other) {

			other.Continent_ID = this.Continent_ID;

		}

		private String readString(ObjectInputStream dis) throws IOException {
			String strReturn = null;
			int length = 0;
			length = dis.readInt();
			if (length == -1) {
				strReturn = null;
			} else {
				if (length > commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography.length) {
					if (length < 1024
							&& commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography.length == 0) {
						commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography = new byte[1024];
					} else {
						commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography = new byte[2 * length];
					}
				}
				dis.readFully(commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography, 0, length);
				strReturn = new String(commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography, 0, length,
						utf8Charset);
			}
			return strReturn;
		}

		private void writeString(String str, ObjectOutputStream dos) throws IOException {
			if (str == null) {
				dos.writeInt(-1);
			} else {
				byte[] byteArray = str.getBytes(utf8Charset);
				dos.writeInt(byteArray.length);
				dos.write(byteArray);
			}
		}

		private String readString(DataInputStream dis, ObjectInputStream ois) throws IOException {
			String strReturn = null;
			int length = 0;
			length = dis.readInt();
			if (length == -1) {
				strReturn = null;
			} else {
				byte[] byteArray = new byte[length];
				dis.read(byteArray);
				strReturn = new String(byteArray, utf8Charset);
			}
			return strReturn;
		}

		private void writeString(String str, DataOutputStream dos, ObjectOutputStream oos) throws IOException {
			if (str == null) {
				dos.writeInt(-1);
			} else {
				byte[] byteArray = str.getBytes(utf8Charset);
				dos.writeInt(byteArray.length);
				dos.write(byteArray);
			}
		}

		public void readKeysData(ObjectInputStream dis) {

			synchronized (commonByteArrayLock_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography) {

				try {

					int length = 0;

					this.Continent_ID = readString(dis);

				} catch (IOException e) {
					throw new RuntimeException(e);

				}

			}

		}

		public void writeKeysData(ObjectOutputStream dos) {
			try {

				// String

				writeString(this.Continent_ID, dos);

			} catch (IOException e) {
				throw new RuntimeException(e);
			}

		}

		/**
		 * Fill Values data by reading ObjectInputStream.
		 */
		public void readValuesData(DataInputStream dis, ObjectInputStream ois) {
			try {

				int length = 0;

				this.Continent_Name = readString(dis, ois);

			} catch (IOException e) {
				throw new RuntimeException(e);

			}

		}

		/**
		 * Return a byte array which represents Values data.
		 */
		public void writeValuesData(DataOutputStream dos, ObjectOutputStream oos) {
			try {

				writeString(this.Continent_Name, dos, oos);

			} catch (IOException e) {
				throw new RuntimeException(e);
			}

		}

		public String toString() {

			StringBuilder sb = new StringBuilder();
			sb.append(super.toString());
			sb.append("[");
			sb.append("Continent_ID=" + Continent_ID);
			sb.append(",Continent_Name=" + Continent_Name);
			sb.append("]");

			return sb.toString();
		}

		/**
		 * Compare keys
		 */
		public int compareTo(row2Struct other) {

			int returnValue = -1;

			returnValue = checkNullsAndCompare(this.Continent_ID, other.Continent_ID);
			if (returnValue != 0) {
				return returnValue;
			}

			return returnValue;
		}

		private int checkNullsAndCompare(Object object1, Object object2) {
			int returnValue = 0;
			if (object1 instanceof Comparable && object2 instanceof Comparable) {
				returnValue = ((Comparable) object1).compareTo(object2);
			} else if (object1 != null && object2 != null) {
				returnValue = compareStrings(object1.toString(), object2.toString());
			} else if (object1 == null && object2 != null) {
				returnValue = 1;
			} else if (object1 != null && object2 == null) {
				returnValue = -1;
			} else {
				returnValue = 0;
			}

			return returnValue;
		}

		private int compareStrings(String string1, String string2) {
			return string1.compareTo(string2);
		}

	}

	public void tFileInputDelimited_2Process(final java.util.Map<String, Object> globalMap) throws TalendException {
		globalMap.put("tFileInputDelimited_2_SUBPROCESS_STATE", 0);

		final boolean execStat = this.execStat;

		String iterateId = "";

		String currentComponent = "";
		java.util.Map<String, Object> resourceMap = new java.util.HashMap<String, Object>();

		try {
			// TDI-39566 avoid throwing an useless Exception
			boolean resumeIt = true;
			if (globalResumeTicket == false && resumeEntryMethodName != null) {
				String currentMethodName = new java.lang.Exception().getStackTrace()[0].getMethodName();
				resumeIt = resumeEntryMethodName.equals(currentMethodName);
			}
			if (resumeIt || globalResumeTicket) { // start the resume
				globalResumeTicket = true;

				row2Struct row2 = new row2Struct();

				/**
				 * [tAdvancedHash_row2 begin ] start
				 */

				ok_Hash.put("tAdvancedHash_row2", false);
				start_Hash.put("tAdvancedHash_row2", System.currentTimeMillis());

				currentComponent = "tAdvancedHash_row2";

				if (execStat) {
					if (resourceMap.get("inIterateVComp") == null) {

						if (execStat) {
							runStat.updateStatOnConnection("row2" + iterateId, 0, 0);
						}

					}
				}

				int tos_count_tAdvancedHash_row2 = 0;

				// connection name:row2
				// source node:tFileInputDelimited_2 - inputs:(after_tFileInputDelimited_8)
				// outputs:(row2,row2) | target node:tAdvancedHash_row2 - inputs:(row2)
				// outputs:()
				// linked node: tMap_1 - inputs:(row8,row2,row3,row4,row5,row6,row7,row1)
				// outputs:(sortieCsv)

				org.talend.designer.components.lookup.common.ICommonLookup.MATCHING_MODE matchingModeEnum_row2 = org.talend.designer.components.lookup.common.ICommonLookup.MATCHING_MODE.UNIQUE_MATCH;

				org.talend.designer.components.lookup.memory.AdvancedMemoryLookup<row2Struct> tHash_Lookup_row2 = org.talend.designer.components.lookup.memory.AdvancedMemoryLookup
						.<row2Struct>getLookup(matchingModeEnum_row2);

				globalMap.put("tHash_Lookup_row2", tHash_Lookup_row2);

				/**
				 * [tAdvancedHash_row2 begin ] stop
				 */

				/**
				 * [tFileInputDelimited_2 begin ] start
				 */

				ok_Hash.put("tFileInputDelimited_2", false);
				start_Hash.put("tFileInputDelimited_2", System.currentTimeMillis());

				currentComponent = "tFileInputDelimited_2";

				int tos_count_tFileInputDelimited_2 = 0;

				final routines.system.RowState rowstate_tFileInputDelimited_2 = new routines.system.RowState();

				int nb_line_tFileInputDelimited_2 = 0;
				int footer_tFileInputDelimited_2 = 0;
				int totalLinetFileInputDelimited_2 = 0;
				int limittFileInputDelimited_2 = -1;
				int lastLinetFileInputDelimited_2 = -1;

				char fieldSeparator_tFileInputDelimited_2[] = null;

				// support passing value (property: Field Separator) by 'context.fs' or
				// 'globalMap.get("fs")'.
				if (((String) ";").length() > 0) {
					fieldSeparator_tFileInputDelimited_2 = ((String) ";").toCharArray();
				} else {
					throw new IllegalArgumentException("Field Separator must be assigned a char.");
				}

				char rowSeparator_tFileInputDelimited_2[] = null;

				// support passing value (property: Row Separator) by 'context.rs' or
				// 'globalMap.get("rs")'.
				if (((String) "\n").length() > 0) {
					rowSeparator_tFileInputDelimited_2 = ((String) "\n").toCharArray();
				} else {
					throw new IllegalArgumentException("Row Separator must be assigned a char.");
				}

				Object filename_tFileInputDelimited_2 = /** Start field tFileInputDelimited_2:FILENAME */
						"C:/TEMP/TOS_DI-Win32-20190620_1446-V7.2.1/workspace/LLJ_SAE_INTEGRATIONDATAWAREHOUSE/Data/in/txt/2.txt"/**
																																 * End
																																 * field
																																 * tFileInputDelimited_2:FILENAME
																																 */
				;
				com.talend.csv.CSVReader csvReadertFileInputDelimited_2 = null;

				try {

					String[] rowtFileInputDelimited_2 = null;
					int currentLinetFileInputDelimited_2 = 0;
					int outputLinetFileInputDelimited_2 = 0;
					try {// TD110 begin
						if (filename_tFileInputDelimited_2 instanceof java.io.InputStream) {

							int footer_value_tFileInputDelimited_2 = 0;
							if (footer_value_tFileInputDelimited_2 > 0) {
								throw new java.lang.Exception(
										"When the input source is a stream,footer shouldn't be bigger than 0.");
							}

							csvReadertFileInputDelimited_2 = new com.talend.csv.CSVReader(
									(java.io.InputStream) filename_tFileInputDelimited_2,
									fieldSeparator_tFileInputDelimited_2[0], "US-ASCII");
						} else {
							csvReadertFileInputDelimited_2 = new com.talend.csv.CSVReader(
									new java.io.BufferedReader(new java.io.InputStreamReader(
											new java.io.FileInputStream(String.valueOf(filename_tFileInputDelimited_2)),
											"US-ASCII")),
									fieldSeparator_tFileInputDelimited_2[0]);
						}

						csvReadertFileInputDelimited_2.setTrimWhitespace(false);
						if ((rowSeparator_tFileInputDelimited_2[0] != '\n')
								&& (rowSeparator_tFileInputDelimited_2[0] != '\r'))
							csvReadertFileInputDelimited_2.setLineEnd("" + rowSeparator_tFileInputDelimited_2[0]);

						csvReadertFileInputDelimited_2.setQuoteChar('\"');

						// ?????doesn't work for other escapeChar
						// the default escape mode is double escape
						csvReadertFileInputDelimited_2.setEscapeChar(csvReadertFileInputDelimited_2.getQuoteChar());

						if (footer_tFileInputDelimited_2 > 0) {
							for (totalLinetFileInputDelimited_2 = 0; totalLinetFileInputDelimited_2 < 1; totalLinetFileInputDelimited_2++) {
								csvReadertFileInputDelimited_2.readNext();
							}
							csvReadertFileInputDelimited_2.setSkipEmptyRecords(true);
							while (csvReadertFileInputDelimited_2.readNext()) {

								rowtFileInputDelimited_2 = csvReadertFileInputDelimited_2.getValues();
								if (!(rowtFileInputDelimited_2.length == 1
										&& ("\015").equals(rowtFileInputDelimited_2[0]))) {// empty line when row
																							// separator is '\n'

									totalLinetFileInputDelimited_2++;

								}

							}
							int lastLineTemptFileInputDelimited_2 = totalLinetFileInputDelimited_2
									- footer_tFileInputDelimited_2 < 0 ? 0
											: totalLinetFileInputDelimited_2 - footer_tFileInputDelimited_2;
							if (lastLinetFileInputDelimited_2 > 0) {
								lastLinetFileInputDelimited_2 = lastLinetFileInputDelimited_2 < lastLineTemptFileInputDelimited_2
										? lastLinetFileInputDelimited_2
										: lastLineTemptFileInputDelimited_2;
							} else {
								lastLinetFileInputDelimited_2 = lastLineTemptFileInputDelimited_2;
							}

							csvReadertFileInputDelimited_2.close();
							if (filename_tFileInputDelimited_2 instanceof java.io.InputStream) {
								csvReadertFileInputDelimited_2 = new com.talend.csv.CSVReader(
										(java.io.InputStream) filename_tFileInputDelimited_2,
										fieldSeparator_tFileInputDelimited_2[0], "US-ASCII");
							} else {
								csvReadertFileInputDelimited_2 = new com.talend.csv.CSVReader(
										new java.io.BufferedReader(
												new java.io.InputStreamReader(
														new java.io.FileInputStream(
																String.valueOf(filename_tFileInputDelimited_2)),
														"US-ASCII")),
										fieldSeparator_tFileInputDelimited_2[0]);
							}
							csvReadertFileInputDelimited_2.setTrimWhitespace(false);
							if ((rowSeparator_tFileInputDelimited_2[0] != '\n')
									&& (rowSeparator_tFileInputDelimited_2[0] != '\r'))
								csvReadertFileInputDelimited_2.setLineEnd("" + rowSeparator_tFileInputDelimited_2[0]);

							csvReadertFileInputDelimited_2.setQuoteChar('\"');

							// ?????doesn't work for other escapeChar
							// the default escape mode is double escape
							csvReadertFileInputDelimited_2.setEscapeChar(csvReadertFileInputDelimited_2.getQuoteChar());

						}

						if (limittFileInputDelimited_2 != 0) {
							for (currentLinetFileInputDelimited_2 = 0; currentLinetFileInputDelimited_2 < 1; currentLinetFileInputDelimited_2++) {
								csvReadertFileInputDelimited_2.readNext();
							}
						}
						csvReadertFileInputDelimited_2.setSkipEmptyRecords(true);

					} catch (java.lang.Exception e) {

						System.err.println(e.getMessage());

					} // TD110 end

					while (limittFileInputDelimited_2 != 0 && csvReadertFileInputDelimited_2 != null
							&& csvReadertFileInputDelimited_2.readNext()) {
						rowstate_tFileInputDelimited_2.reset();

						rowtFileInputDelimited_2 = csvReadertFileInputDelimited_2.getValues();

						if (rowtFileInputDelimited_2.length == 1 && ("\015").equals(rowtFileInputDelimited_2[0])) {// empty
																													// line
																													// when
																													// row
																													// separator
																													// is
																													// '\n'
							continue;
						}

						currentLinetFileInputDelimited_2++;

						if (lastLinetFileInputDelimited_2 > -1
								&& currentLinetFileInputDelimited_2 > lastLinetFileInputDelimited_2) {
							break;
						}
						outputLinetFileInputDelimited_2++;
						if (limittFileInputDelimited_2 > 0
								&& outputLinetFileInputDelimited_2 > limittFileInputDelimited_2) {
							break;
						}

						row2 = null;

						row2 = null;

						boolean whetherReject_tFileInputDelimited_2 = false;
						row2 = new row2Struct();
						try {

							char fieldSeparator_tFileInputDelimited_2_ListType[] = null;
							// support passing value (property: Field Separator) by 'context.fs' or
							// 'globalMap.get("fs")'.
							if (((String) ";").length() > 0) {
								fieldSeparator_tFileInputDelimited_2_ListType = ((String) ";").toCharArray();
							} else {
								throw new IllegalArgumentException("Field Separator must be assigned a char.");
							}
							if (rowtFileInputDelimited_2.length == 1 && ("\015").equals(rowtFileInputDelimited_2[0])) {// empty
																														// line
																														// when
																														// row
																														// separator
																														// is
																														// '\n'

								row2.Continent_ID = null;

								row2.Continent_Name = null;

							} else {

								int columnIndexWithD_tFileInputDelimited_2 = 0; // Column Index

								columnIndexWithD_tFileInputDelimited_2 = 0;

								if (columnIndexWithD_tFileInputDelimited_2 < rowtFileInputDelimited_2.length) {

									row2.Continent_ID = rowtFileInputDelimited_2[columnIndexWithD_tFileInputDelimited_2];

								} else {

									row2.Continent_ID = null;

								}

								columnIndexWithD_tFileInputDelimited_2 = 1;

								if (columnIndexWithD_tFileInputDelimited_2 < rowtFileInputDelimited_2.length) {

									row2.Continent_Name = rowtFileInputDelimited_2[columnIndexWithD_tFileInputDelimited_2];

								} else {

									row2.Continent_Name = null;

								}

							}

							if (rowstate_tFileInputDelimited_2.getException() != null) {
								throw rowstate_tFileInputDelimited_2.getException();
							}

						} catch (java.lang.Exception e) {
							whetherReject_tFileInputDelimited_2 = true;

							System.err.println(e.getMessage());
							row2 = null;

						}

						/**
						 * [tFileInputDelimited_2 begin ] stop
						 */

						/**
						 * [tFileInputDelimited_2 main ] start
						 */

						currentComponent = "tFileInputDelimited_2";

						tos_count_tFileInputDelimited_2++;

						/**
						 * [tFileInputDelimited_2 main ] stop
						 */

						/**
						 * [tFileInputDelimited_2 process_data_begin ] start
						 */

						currentComponent = "tFileInputDelimited_2";

						/**
						 * [tFileInputDelimited_2 process_data_begin ] stop
						 */
// Start of branch "row2"
						if (row2 != null) {

							/**
							 * [tAdvancedHash_row2 main ] start
							 */

							currentComponent = "tAdvancedHash_row2";

							// row2
							// row2

							if (execStat) {
								runStat.updateStatOnConnection("row2" + iterateId, 1, 1);
							}

							row2Struct row2_HashRow = new row2Struct();

							row2_HashRow.Continent_ID = row2.Continent_ID;

							row2_HashRow.Continent_Name = row2.Continent_Name;

							tHash_Lookup_row2.put(row2_HashRow);

							tos_count_tAdvancedHash_row2++;

							/**
							 * [tAdvancedHash_row2 main ] stop
							 */

							/**
							 * [tAdvancedHash_row2 process_data_begin ] start
							 */

							currentComponent = "tAdvancedHash_row2";

							/**
							 * [tAdvancedHash_row2 process_data_begin ] stop
							 */

							/**
							 * [tAdvancedHash_row2 process_data_end ] start
							 */

							currentComponent = "tAdvancedHash_row2";

							/**
							 * [tAdvancedHash_row2 process_data_end ] stop
							 */

						} // End of branch "row2"

						/**
						 * [tFileInputDelimited_2 process_data_end ] start
						 */

						currentComponent = "tFileInputDelimited_2";

						/**
						 * [tFileInputDelimited_2 process_data_end ] stop
						 */

						/**
						 * [tFileInputDelimited_2 end ] start
						 */

						currentComponent = "tFileInputDelimited_2";

						nb_line_tFileInputDelimited_2++;
					}

				} finally {
					if (!(filename_tFileInputDelimited_2 instanceof java.io.InputStream)) {
						if (csvReadertFileInputDelimited_2 != null) {
							csvReadertFileInputDelimited_2.close();
						}
					}
					if (csvReadertFileInputDelimited_2 != null) {
						globalMap.put("tFileInputDelimited_2_NB_LINE", nb_line_tFileInputDelimited_2);
					}

				}

				ok_Hash.put("tFileInputDelimited_2", true);
				end_Hash.put("tFileInputDelimited_2", System.currentTimeMillis());

				/**
				 * [tFileInputDelimited_2 end ] stop
				 */

				/**
				 * [tAdvancedHash_row2 end ] start
				 */

				currentComponent = "tAdvancedHash_row2";

				tHash_Lookup_row2.endPut();

				if (execStat) {
					if (resourceMap.get("inIterateVComp") == null || !((Boolean) resourceMap.get("inIterateVComp"))) {
						runStat.updateStatOnConnection("row2" + iterateId, 2, 0);
					}
				}

				ok_Hash.put("tAdvancedHash_row2", true);
				end_Hash.put("tAdvancedHash_row2", System.currentTimeMillis());

				/**
				 * [tAdvancedHash_row2 end ] stop
				 */

			} // end the resume

		} catch (java.lang.Exception e) {

			TalendException te = new TalendException(e, currentComponent, globalMap);

			throw te;
		} catch (java.lang.Error error) {

			runStat.stopThreadStat();

			throw error;
		} finally {

			try {

				/**
				 * [tFileInputDelimited_2 finally ] start
				 */

				currentComponent = "tFileInputDelimited_2";

				/**
				 * [tFileInputDelimited_2 finally ] stop
				 */

				/**
				 * [tAdvancedHash_row2 finally ] start
				 */

				currentComponent = "tAdvancedHash_row2";

				/**
				 * [tAdvancedHash_row2 finally ] stop
				 */

			} catch (java.lang.Exception e) {
				// ignore
			} catch (java.lang.Error error) {
				// ignore
			}
			resourceMap = null;
		}

		globalMap.put("tFileInputDelimited_2_SUBPROCESS_STATE", 1);
	}

	public static class row3Struct implements routines.system.IPersistableComparableLookupRow<row3Struct> {
		final static byte[] commonByteArrayLock_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography = new byte[0];
		static byte[] commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography = new byte[0];
		protected static final int DEFAULT_HASHCODE = 1;
		protected static final int PRIME = 31;
		protected int hashCode = DEFAULT_HASHCODE;
		public boolean hashCodeDirty = true;

		public String loopKey;

		public String Country;

		public String getCountry() {
			return this.Country;
		}

		public String Country_Name;

		public String getCountry_Name() {
			return this.Country_Name;
		}

		public String Population;

		public String getPopulation() {
			return this.Population;
		}

		public String Country_ID;

		public String getCountry_ID() {
			return this.Country_ID;
		}

		public String Continent_ID;

		public String getContinent_ID() {
			return this.Continent_ID;
		}

		public String Country_FormerName;

		public String getCountry_FormerName() {
			return this.Country_FormerName;
		}

		@Override
		public int hashCode() {
			if (this.hashCodeDirty) {
				final int prime = PRIME;
				int result = DEFAULT_HASHCODE;

				result = prime * result + ((this.Country == null) ? 0 : this.Country.hashCode());

				this.hashCode = result;
				this.hashCodeDirty = false;
			}
			return this.hashCode;
		}

		@Override
		public boolean equals(Object obj) {
			if (this == obj)
				return true;
			if (obj == null)
				return false;
			if (getClass() != obj.getClass())
				return false;
			final row3Struct other = (row3Struct) obj;

			if (this.Country == null) {
				if (other.Country != null)
					return false;

			} else if (!this.Country.equals(other.Country))

				return false;

			return true;
		}

		public void copyDataTo(row3Struct other) {

			other.Country = this.Country;
			other.Country_Name = this.Country_Name;
			other.Population = this.Population;
			other.Country_ID = this.Country_ID;
			other.Continent_ID = this.Continent_ID;
			other.Country_FormerName = this.Country_FormerName;

		}

		public void copyKeysDataTo(row3Struct other) {

			other.Country = this.Country;

		}

		private String readString(ObjectInputStream dis) throws IOException {
			String strReturn = null;
			int length = 0;
			length = dis.readInt();
			if (length == -1) {
				strReturn = null;
			} else {
				if (length > commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography.length) {
					if (length < 1024
							&& commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography.length == 0) {
						commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography = new byte[1024];
					} else {
						commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography = new byte[2 * length];
					}
				}
				dis.readFully(commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography, 0, length);
				strReturn = new String(commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography, 0, length,
						utf8Charset);
			}
			return strReturn;
		}

		private void writeString(String str, ObjectOutputStream dos) throws IOException {
			if (str == null) {
				dos.writeInt(-1);
			} else {
				byte[] byteArray = str.getBytes(utf8Charset);
				dos.writeInt(byteArray.length);
				dos.write(byteArray);
			}
		}

		private String readString(DataInputStream dis, ObjectInputStream ois) throws IOException {
			String strReturn = null;
			int length = 0;
			length = dis.readInt();
			if (length == -1) {
				strReturn = null;
			} else {
				byte[] byteArray = new byte[length];
				dis.read(byteArray);
				strReturn = new String(byteArray, utf8Charset);
			}
			return strReturn;
		}

		private void writeString(String str, DataOutputStream dos, ObjectOutputStream oos) throws IOException {
			if (str == null) {
				dos.writeInt(-1);
			} else {
				byte[] byteArray = str.getBytes(utf8Charset);
				dos.writeInt(byteArray.length);
				dos.write(byteArray);
			}
		}

		public void readKeysData(ObjectInputStream dis) {

			synchronized (commonByteArrayLock_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography) {

				try {

					int length = 0;

					this.Country = readString(dis);

				} catch (IOException e) {
					throw new RuntimeException(e);

				}

			}

		}

		public void writeKeysData(ObjectOutputStream dos) {
			try {

				// String

				writeString(this.Country, dos);

			} catch (IOException e) {
				throw new RuntimeException(e);
			}

		}

		/**
		 * Fill Values data by reading ObjectInputStream.
		 */
		public void readValuesData(DataInputStream dis, ObjectInputStream ois) {
			try {

				int length = 0;

				this.Country_Name = readString(dis, ois);

				this.Population = readString(dis, ois);

				this.Country_ID = readString(dis, ois);

				this.Continent_ID = readString(dis, ois);

				this.Country_FormerName = readString(dis, ois);

			} catch (IOException e) {
				throw new RuntimeException(e);

			}

		}

		/**
		 * Return a byte array which represents Values data.
		 */
		public void writeValuesData(DataOutputStream dos, ObjectOutputStream oos) {
			try {

				writeString(this.Country_Name, dos, oos);

				writeString(this.Population, dos, oos);

				writeString(this.Country_ID, dos, oos);

				writeString(this.Continent_ID, dos, oos);

				writeString(this.Country_FormerName, dos, oos);

			} catch (IOException e) {
				throw new RuntimeException(e);
			}

		}

		public String toString() {

			StringBuilder sb = new StringBuilder();
			sb.append(super.toString());
			sb.append("[");
			sb.append("Country=" + Country);
			sb.append(",Country_Name=" + Country_Name);
			sb.append(",Population=" + Population);
			sb.append(",Country_ID=" + Country_ID);
			sb.append(",Continent_ID=" + Continent_ID);
			sb.append(",Country_FormerName=" + Country_FormerName);
			sb.append("]");

			return sb.toString();
		}

		/**
		 * Compare keys
		 */
		public int compareTo(row3Struct other) {

			int returnValue = -1;

			returnValue = checkNullsAndCompare(this.Country, other.Country);
			if (returnValue != 0) {
				return returnValue;
			}

			return returnValue;
		}

		private int checkNullsAndCompare(Object object1, Object object2) {
			int returnValue = 0;
			if (object1 instanceof Comparable && object2 instanceof Comparable) {
				returnValue = ((Comparable) object1).compareTo(object2);
			} else if (object1 != null && object2 != null) {
				returnValue = compareStrings(object1.toString(), object2.toString());
			} else if (object1 == null && object2 != null) {
				returnValue = 1;
			} else if (object1 != null && object2 == null) {
				returnValue = -1;
			} else {
				returnValue = 0;
			}

			return returnValue;
		}

		private int compareStrings(String string1, String string2) {
			return string1.compareTo(string2);
		}

	}

	public void tFileInputDelimited_3Process(final java.util.Map<String, Object> globalMap) throws TalendException {
		globalMap.put("tFileInputDelimited_3_SUBPROCESS_STATE", 0);

		final boolean execStat = this.execStat;

		String iterateId = "";

		String currentComponent = "";
		java.util.Map<String, Object> resourceMap = new java.util.HashMap<String, Object>();

		try {
			// TDI-39566 avoid throwing an useless Exception
			boolean resumeIt = true;
			if (globalResumeTicket == false && resumeEntryMethodName != null) {
				String currentMethodName = new java.lang.Exception().getStackTrace()[0].getMethodName();
				resumeIt = resumeEntryMethodName.equals(currentMethodName);
			}
			if (resumeIt || globalResumeTicket) { // start the resume
				globalResumeTicket = true;

				row3Struct row3 = new row3Struct();

				/**
				 * [tAdvancedHash_row3 begin ] start
				 */

				ok_Hash.put("tAdvancedHash_row3", false);
				start_Hash.put("tAdvancedHash_row3", System.currentTimeMillis());

				currentComponent = "tAdvancedHash_row3";

				if (execStat) {
					if (resourceMap.get("inIterateVComp") == null) {

						if (execStat) {
							runStat.updateStatOnConnection("row3" + iterateId, 0, 0);
						}

					}
				}

				int tos_count_tAdvancedHash_row3 = 0;

				// connection name:row3
				// source node:tFileInputDelimited_3 - inputs:(after_tFileInputDelimited_8)
				// outputs:(row3,row3) | target node:tAdvancedHash_row3 - inputs:(row3)
				// outputs:()
				// linked node: tMap_1 - inputs:(row8,row2,row3,row4,row5,row6,row7,row1)
				// outputs:(sortieCsv)

				org.talend.designer.components.lookup.common.ICommonLookup.MATCHING_MODE matchingModeEnum_row3 = org.talend.designer.components.lookup.common.ICommonLookup.MATCHING_MODE.UNIQUE_MATCH;

				org.talend.designer.components.lookup.memory.AdvancedMemoryLookup<row3Struct> tHash_Lookup_row3 = org.talend.designer.components.lookup.memory.AdvancedMemoryLookup
						.<row3Struct>getLookup(matchingModeEnum_row3);

				globalMap.put("tHash_Lookup_row3", tHash_Lookup_row3);

				/**
				 * [tAdvancedHash_row3 begin ] stop
				 */

				/**
				 * [tFileInputDelimited_3 begin ] start
				 */

				ok_Hash.put("tFileInputDelimited_3", false);
				start_Hash.put("tFileInputDelimited_3", System.currentTimeMillis());

				currentComponent = "tFileInputDelimited_3";

				int tos_count_tFileInputDelimited_3 = 0;

				final routines.system.RowState rowstate_tFileInputDelimited_3 = new routines.system.RowState();

				int nb_line_tFileInputDelimited_3 = 0;
				int footer_tFileInputDelimited_3 = 0;
				int totalLinetFileInputDelimited_3 = 0;
				int limittFileInputDelimited_3 = -1;
				int lastLinetFileInputDelimited_3 = -1;

				char fieldSeparator_tFileInputDelimited_3[] = null;

				// support passing value (property: Field Separator) by 'context.fs' or
				// 'globalMap.get("fs")'.
				if (((String) ";").length() > 0) {
					fieldSeparator_tFileInputDelimited_3 = ((String) ";").toCharArray();
				} else {
					throw new IllegalArgumentException("Field Separator must be assigned a char.");
				}

				char rowSeparator_tFileInputDelimited_3[] = null;

				// support passing value (property: Row Separator) by 'context.rs' or
				// 'globalMap.get("rs")'.
				if (((String) "\n").length() > 0) {
					rowSeparator_tFileInputDelimited_3 = ((String) "\n").toCharArray();
				} else {
					throw new IllegalArgumentException("Row Separator must be assigned a char.");
				}

				Object filename_tFileInputDelimited_3 = /** Start field tFileInputDelimited_3:FILENAME */
						"C:/TEMP/TOS_DI-Win32-20190620_1446-V7.2.1/workspace/LLJ_SAE_INTEGRATIONDATAWAREHOUSE/Data/in/txt/3.txt"/**
																																 * End
																																 * field
																																 * tFileInputDelimited_3:FILENAME
																																 */
				;
				com.talend.csv.CSVReader csvReadertFileInputDelimited_3 = null;

				try {

					String[] rowtFileInputDelimited_3 = null;
					int currentLinetFileInputDelimited_3 = 0;
					int outputLinetFileInputDelimited_3 = 0;
					try {// TD110 begin
						if (filename_tFileInputDelimited_3 instanceof java.io.InputStream) {

							int footer_value_tFileInputDelimited_3 = 0;
							if (footer_value_tFileInputDelimited_3 > 0) {
								throw new java.lang.Exception(
										"When the input source is a stream,footer shouldn't be bigger than 0.");
							}

							csvReadertFileInputDelimited_3 = new com.talend.csv.CSVReader(
									(java.io.InputStream) filename_tFileInputDelimited_3,
									fieldSeparator_tFileInputDelimited_3[0], "US-ASCII");
						} else {
							csvReadertFileInputDelimited_3 = new com.talend.csv.CSVReader(
									new java.io.BufferedReader(new java.io.InputStreamReader(
											new java.io.FileInputStream(String.valueOf(filename_tFileInputDelimited_3)),
											"US-ASCII")),
									fieldSeparator_tFileInputDelimited_3[0]);
						}

						csvReadertFileInputDelimited_3.setTrimWhitespace(false);
						if ((rowSeparator_tFileInputDelimited_3[0] != '\n')
								&& (rowSeparator_tFileInputDelimited_3[0] != '\r'))
							csvReadertFileInputDelimited_3.setLineEnd("" + rowSeparator_tFileInputDelimited_3[0]);

						csvReadertFileInputDelimited_3.setQuoteChar('\"');

						// ?????doesn't work for other escapeChar
						// the default escape mode is double escape
						csvReadertFileInputDelimited_3.setEscapeChar(csvReadertFileInputDelimited_3.getQuoteChar());

						if (footer_tFileInputDelimited_3 > 0) {
							for (totalLinetFileInputDelimited_3 = 0; totalLinetFileInputDelimited_3 < 1; totalLinetFileInputDelimited_3++) {
								csvReadertFileInputDelimited_3.readNext();
							}
							csvReadertFileInputDelimited_3.setSkipEmptyRecords(true);
							while (csvReadertFileInputDelimited_3.readNext()) {

								rowtFileInputDelimited_3 = csvReadertFileInputDelimited_3.getValues();
								if (!(rowtFileInputDelimited_3.length == 1
										&& ("\015").equals(rowtFileInputDelimited_3[0]))) {// empty line when row
																							// separator is '\n'

									totalLinetFileInputDelimited_3++;

								}

							}
							int lastLineTemptFileInputDelimited_3 = totalLinetFileInputDelimited_3
									- footer_tFileInputDelimited_3 < 0 ? 0
											: totalLinetFileInputDelimited_3 - footer_tFileInputDelimited_3;
							if (lastLinetFileInputDelimited_3 > 0) {
								lastLinetFileInputDelimited_3 = lastLinetFileInputDelimited_3 < lastLineTemptFileInputDelimited_3
										? lastLinetFileInputDelimited_3
										: lastLineTemptFileInputDelimited_3;
							} else {
								lastLinetFileInputDelimited_3 = lastLineTemptFileInputDelimited_3;
							}

							csvReadertFileInputDelimited_3.close();
							if (filename_tFileInputDelimited_3 instanceof java.io.InputStream) {
								csvReadertFileInputDelimited_3 = new com.talend.csv.CSVReader(
										(java.io.InputStream) filename_tFileInputDelimited_3,
										fieldSeparator_tFileInputDelimited_3[0], "US-ASCII");
							} else {
								csvReadertFileInputDelimited_3 = new com.talend.csv.CSVReader(
										new java.io.BufferedReader(
												new java.io.InputStreamReader(
														new java.io.FileInputStream(
																String.valueOf(filename_tFileInputDelimited_3)),
														"US-ASCII")),
										fieldSeparator_tFileInputDelimited_3[0]);
							}
							csvReadertFileInputDelimited_3.setTrimWhitespace(false);
							if ((rowSeparator_tFileInputDelimited_3[0] != '\n')
									&& (rowSeparator_tFileInputDelimited_3[0] != '\r'))
								csvReadertFileInputDelimited_3.setLineEnd("" + rowSeparator_tFileInputDelimited_3[0]);

							csvReadertFileInputDelimited_3.setQuoteChar('\"');

							// ?????doesn't work for other escapeChar
							// the default escape mode is double escape
							csvReadertFileInputDelimited_3.setEscapeChar(csvReadertFileInputDelimited_3.getQuoteChar());

						}

						if (limittFileInputDelimited_3 != 0) {
							for (currentLinetFileInputDelimited_3 = 0; currentLinetFileInputDelimited_3 < 1; currentLinetFileInputDelimited_3++) {
								csvReadertFileInputDelimited_3.readNext();
							}
						}
						csvReadertFileInputDelimited_3.setSkipEmptyRecords(true);

					} catch (java.lang.Exception e) {

						System.err.println(e.getMessage());

					} // TD110 end

					while (limittFileInputDelimited_3 != 0 && csvReadertFileInputDelimited_3 != null
							&& csvReadertFileInputDelimited_3.readNext()) {
						rowstate_tFileInputDelimited_3.reset();

						rowtFileInputDelimited_3 = csvReadertFileInputDelimited_3.getValues();

						if (rowtFileInputDelimited_3.length == 1 && ("\015").equals(rowtFileInputDelimited_3[0])) {// empty
																													// line
																													// when
																													// row
																													// separator
																													// is
																													// '\n'
							continue;
						}

						currentLinetFileInputDelimited_3++;

						if (lastLinetFileInputDelimited_3 > -1
								&& currentLinetFileInputDelimited_3 > lastLinetFileInputDelimited_3) {
							break;
						}
						outputLinetFileInputDelimited_3++;
						if (limittFileInputDelimited_3 > 0
								&& outputLinetFileInputDelimited_3 > limittFileInputDelimited_3) {
							break;
						}

						row3 = null;

						row3 = null;

						boolean whetherReject_tFileInputDelimited_3 = false;
						row3 = new row3Struct();
						try {

							char fieldSeparator_tFileInputDelimited_3_ListType[] = null;
							// support passing value (property: Field Separator) by 'context.fs' or
							// 'globalMap.get("fs")'.
							if (((String) ";").length() > 0) {
								fieldSeparator_tFileInputDelimited_3_ListType = ((String) ";").toCharArray();
							} else {
								throw new IllegalArgumentException("Field Separator must be assigned a char.");
							}
							if (rowtFileInputDelimited_3.length == 1 && ("\015").equals(rowtFileInputDelimited_3[0])) {// empty
																														// line
																														// when
																														// row
																														// separator
																														// is
																														// '\n'

								row3.Country = null;

								row3.Country_Name = null;

								row3.Population = null;

								row3.Country_ID = null;

								row3.Continent_ID = null;

								row3.Country_FormerName = null;

							} else {

								int columnIndexWithD_tFileInputDelimited_3 = 0; // Column Index

								columnIndexWithD_tFileInputDelimited_3 = 0;

								if (columnIndexWithD_tFileInputDelimited_3 < rowtFileInputDelimited_3.length) {

									row3.Country = rowtFileInputDelimited_3[columnIndexWithD_tFileInputDelimited_3];

								} else {

									row3.Country = null;

								}

								columnIndexWithD_tFileInputDelimited_3 = 1;

								if (columnIndexWithD_tFileInputDelimited_3 < rowtFileInputDelimited_3.length) {

									row3.Country_Name = rowtFileInputDelimited_3[columnIndexWithD_tFileInputDelimited_3];

								} else {

									row3.Country_Name = null;

								}

								columnIndexWithD_tFileInputDelimited_3 = 2;

								if (columnIndexWithD_tFileInputDelimited_3 < rowtFileInputDelimited_3.length) {

									row3.Population = rowtFileInputDelimited_3[columnIndexWithD_tFileInputDelimited_3];

								} else {

									row3.Population = null;

								}

								columnIndexWithD_tFileInputDelimited_3 = 3;

								if (columnIndexWithD_tFileInputDelimited_3 < rowtFileInputDelimited_3.length) {

									row3.Country_ID = rowtFileInputDelimited_3[columnIndexWithD_tFileInputDelimited_3];

								} else {

									row3.Country_ID = null;

								}

								columnIndexWithD_tFileInputDelimited_3 = 4;

								if (columnIndexWithD_tFileInputDelimited_3 < rowtFileInputDelimited_3.length) {

									row3.Continent_ID = rowtFileInputDelimited_3[columnIndexWithD_tFileInputDelimited_3];

								} else {

									row3.Continent_ID = null;

								}

								columnIndexWithD_tFileInputDelimited_3 = 5;

								if (columnIndexWithD_tFileInputDelimited_3 < rowtFileInputDelimited_3.length) {

									row3.Country_FormerName = rowtFileInputDelimited_3[columnIndexWithD_tFileInputDelimited_3];

								} else {

									row3.Country_FormerName = null;

								}

							}

							if (rowstate_tFileInputDelimited_3.getException() != null) {
								throw rowstate_tFileInputDelimited_3.getException();
							}

						} catch (java.lang.Exception e) {
							whetherReject_tFileInputDelimited_3 = true;

							System.err.println(e.getMessage());
							row3 = null;

						}

						/**
						 * [tFileInputDelimited_3 begin ] stop
						 */

						/**
						 * [tFileInputDelimited_3 main ] start
						 */

						currentComponent = "tFileInputDelimited_3";

						tos_count_tFileInputDelimited_3++;

						/**
						 * [tFileInputDelimited_3 main ] stop
						 */

						/**
						 * [tFileInputDelimited_3 process_data_begin ] start
						 */

						currentComponent = "tFileInputDelimited_3";

						/**
						 * [tFileInputDelimited_3 process_data_begin ] stop
						 */
// Start of branch "row3"
						if (row3 != null) {

							/**
							 * [tAdvancedHash_row3 main ] start
							 */

							currentComponent = "tAdvancedHash_row3";

							// row3
							// row3

							if (execStat) {
								runStat.updateStatOnConnection("row3" + iterateId, 1, 1);
							}

							row3Struct row3_HashRow = new row3Struct();

							row3_HashRow.Country = row3.Country;

							row3_HashRow.Country_Name = row3.Country_Name;

							row3_HashRow.Population = row3.Population;

							row3_HashRow.Country_ID = row3.Country_ID;

							row3_HashRow.Continent_ID = row3.Continent_ID;

							row3_HashRow.Country_FormerName = row3.Country_FormerName;

							tHash_Lookup_row3.put(row3_HashRow);

							tos_count_tAdvancedHash_row3++;

							/**
							 * [tAdvancedHash_row3 main ] stop
							 */

							/**
							 * [tAdvancedHash_row3 process_data_begin ] start
							 */

							currentComponent = "tAdvancedHash_row3";

							/**
							 * [tAdvancedHash_row3 process_data_begin ] stop
							 */

							/**
							 * [tAdvancedHash_row3 process_data_end ] start
							 */

							currentComponent = "tAdvancedHash_row3";

							/**
							 * [tAdvancedHash_row3 process_data_end ] stop
							 */

						} // End of branch "row3"

						/**
						 * [tFileInputDelimited_3 process_data_end ] start
						 */

						currentComponent = "tFileInputDelimited_3";

						/**
						 * [tFileInputDelimited_3 process_data_end ] stop
						 */

						/**
						 * [tFileInputDelimited_3 end ] start
						 */

						currentComponent = "tFileInputDelimited_3";

						nb_line_tFileInputDelimited_3++;
					}

				} finally {
					if (!(filename_tFileInputDelimited_3 instanceof java.io.InputStream)) {
						if (csvReadertFileInputDelimited_3 != null) {
							csvReadertFileInputDelimited_3.close();
						}
					}
					if (csvReadertFileInputDelimited_3 != null) {
						globalMap.put("tFileInputDelimited_3_NB_LINE", nb_line_tFileInputDelimited_3);
					}

				}

				ok_Hash.put("tFileInputDelimited_3", true);
				end_Hash.put("tFileInputDelimited_3", System.currentTimeMillis());

				/**
				 * [tFileInputDelimited_3 end ] stop
				 */

				/**
				 * [tAdvancedHash_row3 end ] start
				 */

				currentComponent = "tAdvancedHash_row3";

				tHash_Lookup_row3.endPut();

				if (execStat) {
					if (resourceMap.get("inIterateVComp") == null || !((Boolean) resourceMap.get("inIterateVComp"))) {
						runStat.updateStatOnConnection("row3" + iterateId, 2, 0);
					}
				}

				ok_Hash.put("tAdvancedHash_row3", true);
				end_Hash.put("tAdvancedHash_row3", System.currentTimeMillis());

				/**
				 * [tAdvancedHash_row3 end ] stop
				 */

			} // end the resume

		} catch (java.lang.Exception e) {

			TalendException te = new TalendException(e, currentComponent, globalMap);

			throw te;
		} catch (java.lang.Error error) {

			runStat.stopThreadStat();

			throw error;
		} finally {

			try {

				/**
				 * [tFileInputDelimited_3 finally ] start
				 */

				currentComponent = "tFileInputDelimited_3";

				/**
				 * [tFileInputDelimited_3 finally ] stop
				 */

				/**
				 * [tAdvancedHash_row3 finally ] start
				 */

				currentComponent = "tAdvancedHash_row3";

				/**
				 * [tAdvancedHash_row3 finally ] stop
				 */

			} catch (java.lang.Exception e) {
				// ignore
			} catch (java.lang.Error error) {
				// ignore
			}
			resourceMap = null;
		}

		globalMap.put("tFileInputDelimited_3_SUBPROCESS_STATE", 1);
	}

	public static class row4Struct implements routines.system.IPersistableComparableLookupRow<row4Struct> {
		final static byte[] commonByteArrayLock_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography = new byte[0];
		static byte[] commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography = new byte[0];
		protected static final int DEFAULT_HASHCODE = 1;
		protected static final int PRIME = 31;
		protected int hashCode = DEFAULT_HASHCODE;
		public boolean hashCodeDirty = true;

		public String loopKey;

		public String County_ID;

		public String getCounty_ID() {
			return this.County_ID;
		}

		public String County_Type;

		public String getCounty_Type() {
			return this.County_Type;
		}

		public String County_Name;

		public String getCounty_Name() {
			return this.County_Name;
		}

		public String Province_Type;

		public String getProvince_Type() {
			return this.Province_Type;
		}

		public String Province_Name;

		public String getProvince_Name() {
			return this.Province_Name;
		}

		public String Region_Name;

		public String getRegion_Name() {
			return this.Region_Name;
		}

		public String Region_Type;

		public String getRegion_Type() {
			return this.Region_Type;
		}

		public String State_ID;

		public String getState_ID() {
			return this.State_ID;
		}

		public String Country;

		public String getCountry() {
			return this.Country;
		}

		@Override
		public int hashCode() {
			if (this.hashCodeDirty) {
				final int prime = PRIME;
				int result = DEFAULT_HASHCODE;

				result = prime * result + ((this.Country == null) ? 0 : this.Country.hashCode());

				this.hashCode = result;
				this.hashCodeDirty = false;
			}
			return this.hashCode;
		}

		@Override
		public boolean equals(Object obj) {
			if (this == obj)
				return true;
			if (obj == null)
				return false;
			if (getClass() != obj.getClass())
				return false;
			final row4Struct other = (row4Struct) obj;

			if (this.Country == null) {
				if (other.Country != null)
					return false;

			} else if (!this.Country.equals(other.Country))

				return false;

			return true;
		}

		public void copyDataTo(row4Struct other) {

			other.County_ID = this.County_ID;
			other.County_Type = this.County_Type;
			other.County_Name = this.County_Name;
			other.Province_Type = this.Province_Type;
			other.Province_Name = this.Province_Name;
			other.Region_Name = this.Region_Name;
			other.Region_Type = this.Region_Type;
			other.State_ID = this.State_ID;
			other.Country = this.Country;

		}

		public void copyKeysDataTo(row4Struct other) {

			other.Country = this.Country;

		}

		private String readString(DataInputStream dis, ObjectInputStream ois) throws IOException {
			String strReturn = null;
			int length = 0;
			length = dis.readInt();
			if (length == -1) {
				strReturn = null;
			} else {
				byte[] byteArray = new byte[length];
				dis.read(byteArray);
				strReturn = new String(byteArray, utf8Charset);
			}
			return strReturn;
		}

		private void writeString(String str, DataOutputStream dos, ObjectOutputStream oos) throws IOException {
			if (str == null) {
				dos.writeInt(-1);
			} else {
				byte[] byteArray = str.getBytes(utf8Charset);
				dos.writeInt(byteArray.length);
				dos.write(byteArray);
			}
		}

		private String readString(ObjectInputStream dis) throws IOException {
			String strReturn = null;
			int length = 0;
			length = dis.readInt();
			if (length == -1) {
				strReturn = null;
			} else {
				if (length > commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography.length) {
					if (length < 1024
							&& commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography.length == 0) {
						commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography = new byte[1024];
					} else {
						commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography = new byte[2 * length];
					}
				}
				dis.readFully(commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography, 0, length);
				strReturn = new String(commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography, 0, length,
						utf8Charset);
			}
			return strReturn;
		}

		private void writeString(String str, ObjectOutputStream dos) throws IOException {
			if (str == null) {
				dos.writeInt(-1);
			} else {
				byte[] byteArray = str.getBytes(utf8Charset);
				dos.writeInt(byteArray.length);
				dos.write(byteArray);
			}
		}

		public void readKeysData(ObjectInputStream dis) {

			synchronized (commonByteArrayLock_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography) {

				try {

					int length = 0;

					this.Country = readString(dis);

				} catch (IOException e) {
					throw new RuntimeException(e);

				}

			}

		}

		public void writeKeysData(ObjectOutputStream dos) {
			try {

				// String

				writeString(this.Country, dos);

			} catch (IOException e) {
				throw new RuntimeException(e);
			}

		}

		/**
		 * Fill Values data by reading ObjectInputStream.
		 */
		public void readValuesData(DataInputStream dis, ObjectInputStream ois) {
			try {

				int length = 0;

				this.County_ID = readString(dis, ois);

				this.County_Type = readString(dis, ois);

				this.County_Name = readString(dis, ois);

				this.Province_Type = readString(dis, ois);

				this.Province_Name = readString(dis, ois);

				this.Region_Name = readString(dis, ois);

				this.Region_Type = readString(dis, ois);

				this.State_ID = readString(dis, ois);

			} catch (IOException e) {
				throw new RuntimeException(e);

			}

		}

		/**
		 * Return a byte array which represents Values data.
		 */
		public void writeValuesData(DataOutputStream dos, ObjectOutputStream oos) {
			try {

				writeString(this.County_ID, dos, oos);

				writeString(this.County_Type, dos, oos);

				writeString(this.County_Name, dos, oos);

				writeString(this.Province_Type, dos, oos);

				writeString(this.Province_Name, dos, oos);

				writeString(this.Region_Name, dos, oos);

				writeString(this.Region_Type, dos, oos);

				writeString(this.State_ID, dos, oos);

			} catch (IOException e) {
				throw new RuntimeException(e);
			}

		}

		public String toString() {

			StringBuilder sb = new StringBuilder();
			sb.append(super.toString());
			sb.append("[");
			sb.append("County_ID=" + County_ID);
			sb.append(",County_Type=" + County_Type);
			sb.append(",County_Name=" + County_Name);
			sb.append(",Province_Type=" + Province_Type);
			sb.append(",Province_Name=" + Province_Name);
			sb.append(",Region_Name=" + Region_Name);
			sb.append(",Region_Type=" + Region_Type);
			sb.append(",State_ID=" + State_ID);
			sb.append(",Country=" + Country);
			sb.append("]");

			return sb.toString();
		}

		/**
		 * Compare keys
		 */
		public int compareTo(row4Struct other) {

			int returnValue = -1;

			returnValue = checkNullsAndCompare(this.Country, other.Country);
			if (returnValue != 0) {
				return returnValue;
			}

			return returnValue;
		}

		private int checkNullsAndCompare(Object object1, Object object2) {
			int returnValue = 0;
			if (object1 instanceof Comparable && object2 instanceof Comparable) {
				returnValue = ((Comparable) object1).compareTo(object2);
			} else if (object1 != null && object2 != null) {
				returnValue = compareStrings(object1.toString(), object2.toString());
			} else if (object1 == null && object2 != null) {
				returnValue = 1;
			} else if (object1 != null && object2 == null) {
				returnValue = -1;
			} else {
				returnValue = 0;
			}

			return returnValue;
		}

		private int compareStrings(String string1, String string2) {
			return string1.compareTo(string2);
		}

	}

	public void tFileInputDelimited_4Process(final java.util.Map<String, Object> globalMap) throws TalendException {
		globalMap.put("tFileInputDelimited_4_SUBPROCESS_STATE", 0);

		final boolean execStat = this.execStat;

		String iterateId = "";

		String currentComponent = "";
		java.util.Map<String, Object> resourceMap = new java.util.HashMap<String, Object>();

		try {
			// TDI-39566 avoid throwing an useless Exception
			boolean resumeIt = true;
			if (globalResumeTicket == false && resumeEntryMethodName != null) {
				String currentMethodName = new java.lang.Exception().getStackTrace()[0].getMethodName();
				resumeIt = resumeEntryMethodName.equals(currentMethodName);
			}
			if (resumeIt || globalResumeTicket) { // start the resume
				globalResumeTicket = true;

				row4Struct row4 = new row4Struct();

				/**
				 * [tAdvancedHash_row4 begin ] start
				 */

				ok_Hash.put("tAdvancedHash_row4", false);
				start_Hash.put("tAdvancedHash_row4", System.currentTimeMillis());

				currentComponent = "tAdvancedHash_row4";

				if (execStat) {
					if (resourceMap.get("inIterateVComp") == null) {

						if (execStat) {
							runStat.updateStatOnConnection("row4" + iterateId, 0, 0);
						}

					}
				}

				int tos_count_tAdvancedHash_row4 = 0;

				// connection name:row4
				// source node:tFileInputDelimited_4 - inputs:(after_tFileInputDelimited_8)
				// outputs:(row4,row4) | target node:tAdvancedHash_row4 - inputs:(row4)
				// outputs:()
				// linked node: tMap_1 - inputs:(row8,row2,row3,row4,row5,row6,row7,row1)
				// outputs:(sortieCsv)

				org.talend.designer.components.lookup.common.ICommonLookup.MATCHING_MODE matchingModeEnum_row4 = org.talend.designer.components.lookup.common.ICommonLookup.MATCHING_MODE.UNIQUE_MATCH;

				org.talend.designer.components.lookup.memory.AdvancedMemoryLookup<row4Struct> tHash_Lookup_row4 = org.talend.designer.components.lookup.memory.AdvancedMemoryLookup
						.<row4Struct>getLookup(matchingModeEnum_row4);

				globalMap.put("tHash_Lookup_row4", tHash_Lookup_row4);

				/**
				 * [tAdvancedHash_row4 begin ] stop
				 */

				/**
				 * [tFileInputDelimited_4 begin ] start
				 */

				ok_Hash.put("tFileInputDelimited_4", false);
				start_Hash.put("tFileInputDelimited_4", System.currentTimeMillis());

				currentComponent = "tFileInputDelimited_4";

				int tos_count_tFileInputDelimited_4 = 0;

				final routines.system.RowState rowstate_tFileInputDelimited_4 = new routines.system.RowState();

				int nb_line_tFileInputDelimited_4 = 0;
				int footer_tFileInputDelimited_4 = 0;
				int totalLinetFileInputDelimited_4 = 0;
				int limittFileInputDelimited_4 = -1;
				int lastLinetFileInputDelimited_4 = -1;

				char fieldSeparator_tFileInputDelimited_4[] = null;

				// support passing value (property: Field Separator) by 'context.fs' or
				// 'globalMap.get("fs")'.
				if (((String) ";").length() > 0) {
					fieldSeparator_tFileInputDelimited_4 = ((String) ";").toCharArray();
				} else {
					throw new IllegalArgumentException("Field Separator must be assigned a char.");
				}

				char rowSeparator_tFileInputDelimited_4[] = null;

				// support passing value (property: Row Separator) by 'context.rs' or
				// 'globalMap.get("rs")'.
				if (((String) "\n").length() > 0) {
					rowSeparator_tFileInputDelimited_4 = ((String) "\n").toCharArray();
				} else {
					throw new IllegalArgumentException("Row Separator must be assigned a char.");
				}

				Object filename_tFileInputDelimited_4 = /** Start field tFileInputDelimited_4:FILENAME */
						"C:/TEMP/TOS_DI-Win32-20190620_1446-V7.2.1/workspace/LLJ_SAE_INTEGRATIONDATAWAREHOUSE/Data/in/txt/4.txt"/**
																																 * End
																																 * field
																																 * tFileInputDelimited_4:FILENAME
																																 */
				;
				com.talend.csv.CSVReader csvReadertFileInputDelimited_4 = null;

				try {

					String[] rowtFileInputDelimited_4 = null;
					int currentLinetFileInputDelimited_4 = 0;
					int outputLinetFileInputDelimited_4 = 0;
					try {// TD110 begin
						if (filename_tFileInputDelimited_4 instanceof java.io.InputStream) {

							int footer_value_tFileInputDelimited_4 = 0;
							if (footer_value_tFileInputDelimited_4 > 0) {
								throw new java.lang.Exception(
										"When the input source is a stream,footer shouldn't be bigger than 0.");
							}

							csvReadertFileInputDelimited_4 = new com.talend.csv.CSVReader(
									(java.io.InputStream) filename_tFileInputDelimited_4,
									fieldSeparator_tFileInputDelimited_4[0], "UTF-8");
						} else {
							csvReadertFileInputDelimited_4 = new com.talend.csv.CSVReader(
									new java.io.BufferedReader(new java.io.InputStreamReader(
											new java.io.FileInputStream(String.valueOf(filename_tFileInputDelimited_4)),
											"UTF-8")),
									fieldSeparator_tFileInputDelimited_4[0]);
						}

						csvReadertFileInputDelimited_4.setTrimWhitespace(false);
						if ((rowSeparator_tFileInputDelimited_4[0] != '\n')
								&& (rowSeparator_tFileInputDelimited_4[0] != '\r'))
							csvReadertFileInputDelimited_4.setLineEnd("" + rowSeparator_tFileInputDelimited_4[0]);

						csvReadertFileInputDelimited_4.setQuoteChar('\"');

						// ?????doesn't work for other escapeChar
						// the default escape mode is double escape
						csvReadertFileInputDelimited_4.setEscapeChar(csvReadertFileInputDelimited_4.getQuoteChar());

						if (footer_tFileInputDelimited_4 > 0) {
							for (totalLinetFileInputDelimited_4 = 0; totalLinetFileInputDelimited_4 < 1; totalLinetFileInputDelimited_4++) {
								csvReadertFileInputDelimited_4.readNext();
							}
							csvReadertFileInputDelimited_4.setSkipEmptyRecords(true);
							while (csvReadertFileInputDelimited_4.readNext()) {

								rowtFileInputDelimited_4 = csvReadertFileInputDelimited_4.getValues();
								if (!(rowtFileInputDelimited_4.length == 1
										&& ("\015").equals(rowtFileInputDelimited_4[0]))) {// empty line when row
																							// separator is '\n'

									totalLinetFileInputDelimited_4++;

								}

							}
							int lastLineTemptFileInputDelimited_4 = totalLinetFileInputDelimited_4
									- footer_tFileInputDelimited_4 < 0 ? 0
											: totalLinetFileInputDelimited_4 - footer_tFileInputDelimited_4;
							if (lastLinetFileInputDelimited_4 > 0) {
								lastLinetFileInputDelimited_4 = lastLinetFileInputDelimited_4 < lastLineTemptFileInputDelimited_4
										? lastLinetFileInputDelimited_4
										: lastLineTemptFileInputDelimited_4;
							} else {
								lastLinetFileInputDelimited_4 = lastLineTemptFileInputDelimited_4;
							}

							csvReadertFileInputDelimited_4.close();
							if (filename_tFileInputDelimited_4 instanceof java.io.InputStream) {
								csvReadertFileInputDelimited_4 = new com.talend.csv.CSVReader(
										(java.io.InputStream) filename_tFileInputDelimited_4,
										fieldSeparator_tFileInputDelimited_4[0], "UTF-8");
							} else {
								csvReadertFileInputDelimited_4 = new com.talend.csv.CSVReader(
										new java.io.BufferedReader(
												new java.io.InputStreamReader(
														new java.io.FileInputStream(
																String.valueOf(filename_tFileInputDelimited_4)),
														"UTF-8")),
										fieldSeparator_tFileInputDelimited_4[0]);
							}
							csvReadertFileInputDelimited_4.setTrimWhitespace(false);
							if ((rowSeparator_tFileInputDelimited_4[0] != '\n')
									&& (rowSeparator_tFileInputDelimited_4[0] != '\r'))
								csvReadertFileInputDelimited_4.setLineEnd("" + rowSeparator_tFileInputDelimited_4[0]);

							csvReadertFileInputDelimited_4.setQuoteChar('\"');

							// ?????doesn't work for other escapeChar
							// the default escape mode is double escape
							csvReadertFileInputDelimited_4.setEscapeChar(csvReadertFileInputDelimited_4.getQuoteChar());

						}

						if (limittFileInputDelimited_4 != 0) {
							for (currentLinetFileInputDelimited_4 = 0; currentLinetFileInputDelimited_4 < 1; currentLinetFileInputDelimited_4++) {
								csvReadertFileInputDelimited_4.readNext();
							}
						}
						csvReadertFileInputDelimited_4.setSkipEmptyRecords(true);

					} catch (java.lang.Exception e) {

						System.err.println(e.getMessage());

					} // TD110 end

					while (limittFileInputDelimited_4 != 0 && csvReadertFileInputDelimited_4 != null
							&& csvReadertFileInputDelimited_4.readNext()) {
						rowstate_tFileInputDelimited_4.reset();

						rowtFileInputDelimited_4 = csvReadertFileInputDelimited_4.getValues();

						if (rowtFileInputDelimited_4.length == 1 && ("\015").equals(rowtFileInputDelimited_4[0])) {// empty
																													// line
																													// when
																													// row
																													// separator
																													// is
																													// '\n'
							continue;
						}

						currentLinetFileInputDelimited_4++;

						if (lastLinetFileInputDelimited_4 > -1
								&& currentLinetFileInputDelimited_4 > lastLinetFileInputDelimited_4) {
							break;
						}
						outputLinetFileInputDelimited_4++;
						if (limittFileInputDelimited_4 > 0
								&& outputLinetFileInputDelimited_4 > limittFileInputDelimited_4) {
							break;
						}

						row4 = null;

						row4 = null;

						boolean whetherReject_tFileInputDelimited_4 = false;
						row4 = new row4Struct();
						try {

							char fieldSeparator_tFileInputDelimited_4_ListType[] = null;
							// support passing value (property: Field Separator) by 'context.fs' or
							// 'globalMap.get("fs")'.
							if (((String) ";").length() > 0) {
								fieldSeparator_tFileInputDelimited_4_ListType = ((String) ";").toCharArray();
							} else {
								throw new IllegalArgumentException("Field Separator must be assigned a char.");
							}
							if (rowtFileInputDelimited_4.length == 1 && ("\015").equals(rowtFileInputDelimited_4[0])) {// empty
																														// line
																														// when
																														// row
																														// separator
																														// is
																														// '\n'

								row4.County_ID = null;

								row4.County_Type = null;

								row4.County_Name = null;

								row4.Province_Type = null;

								row4.Province_Name = null;

								row4.Region_Name = null;

								row4.Region_Type = null;

								row4.State_ID = null;

								row4.Country = null;

							} else {

								int columnIndexWithD_tFileInputDelimited_4 = 0; // Column Index

								columnIndexWithD_tFileInputDelimited_4 = 0;

								if (columnIndexWithD_tFileInputDelimited_4 < rowtFileInputDelimited_4.length) {

									row4.County_ID = rowtFileInputDelimited_4[columnIndexWithD_tFileInputDelimited_4];

								} else {

									row4.County_ID = null;

								}

								columnIndexWithD_tFileInputDelimited_4 = 1;

								if (columnIndexWithD_tFileInputDelimited_4 < rowtFileInputDelimited_4.length) {

									row4.County_Type = rowtFileInputDelimited_4[columnIndexWithD_tFileInputDelimited_4];

								} else {

									row4.County_Type = null;

								}

								columnIndexWithD_tFileInputDelimited_4 = 2;

								if (columnIndexWithD_tFileInputDelimited_4 < rowtFileInputDelimited_4.length) {

									row4.County_Name = rowtFileInputDelimited_4[columnIndexWithD_tFileInputDelimited_4];

								} else {

									row4.County_Name = null;

								}

								columnIndexWithD_tFileInputDelimited_4 = 3;

								if (columnIndexWithD_tFileInputDelimited_4 < rowtFileInputDelimited_4.length) {

									row4.Province_Type = rowtFileInputDelimited_4[columnIndexWithD_tFileInputDelimited_4];

								} else {

									row4.Province_Type = null;

								}

								columnIndexWithD_tFileInputDelimited_4 = 4;

								if (columnIndexWithD_tFileInputDelimited_4 < rowtFileInputDelimited_4.length) {

									row4.Province_Name = rowtFileInputDelimited_4[columnIndexWithD_tFileInputDelimited_4];

								} else {

									row4.Province_Name = null;

								}

								columnIndexWithD_tFileInputDelimited_4 = 5;

								if (columnIndexWithD_tFileInputDelimited_4 < rowtFileInputDelimited_4.length) {

									row4.Region_Name = rowtFileInputDelimited_4[columnIndexWithD_tFileInputDelimited_4];

								} else {

									row4.Region_Name = null;

								}

								columnIndexWithD_tFileInputDelimited_4 = 6;

								if (columnIndexWithD_tFileInputDelimited_4 < rowtFileInputDelimited_4.length) {

									row4.Region_Type = rowtFileInputDelimited_4[columnIndexWithD_tFileInputDelimited_4];

								} else {

									row4.Region_Type = null;

								}

								columnIndexWithD_tFileInputDelimited_4 = 7;

								if (columnIndexWithD_tFileInputDelimited_4 < rowtFileInputDelimited_4.length) {

									row4.State_ID = rowtFileInputDelimited_4[columnIndexWithD_tFileInputDelimited_4];

								} else {

									row4.State_ID = null;

								}

								columnIndexWithD_tFileInputDelimited_4 = 8;

								if (columnIndexWithD_tFileInputDelimited_4 < rowtFileInputDelimited_4.length) {

									row4.Country = rowtFileInputDelimited_4[columnIndexWithD_tFileInputDelimited_4];

								} else {

									row4.Country = null;

								}

							}

							if (rowstate_tFileInputDelimited_4.getException() != null) {
								throw rowstate_tFileInputDelimited_4.getException();
							}

						} catch (java.lang.Exception e) {
							whetherReject_tFileInputDelimited_4 = true;

							System.err.println(e.getMessage());
							row4 = null;

						}

						/**
						 * [tFileInputDelimited_4 begin ] stop
						 */

						/**
						 * [tFileInputDelimited_4 main ] start
						 */

						currentComponent = "tFileInputDelimited_4";

						tos_count_tFileInputDelimited_4++;

						/**
						 * [tFileInputDelimited_4 main ] stop
						 */

						/**
						 * [tFileInputDelimited_4 process_data_begin ] start
						 */

						currentComponent = "tFileInputDelimited_4";

						/**
						 * [tFileInputDelimited_4 process_data_begin ] stop
						 */
// Start of branch "row4"
						if (row4 != null) {

							/**
							 * [tAdvancedHash_row4 main ] start
							 */

							currentComponent = "tAdvancedHash_row4";

							// row4
							// row4

							if (execStat) {
								runStat.updateStatOnConnection("row4" + iterateId, 1, 1);
							}

							row4Struct row4_HashRow = new row4Struct();

							row4_HashRow.County_ID = row4.County_ID;

							row4_HashRow.County_Type = row4.County_Type;

							row4_HashRow.County_Name = row4.County_Name;

							row4_HashRow.Province_Type = row4.Province_Type;

							row4_HashRow.Province_Name = row4.Province_Name;

							row4_HashRow.Region_Name = row4.Region_Name;

							row4_HashRow.Region_Type = row4.Region_Type;

							row4_HashRow.State_ID = row4.State_ID;

							row4_HashRow.Country = row4.Country;

							tHash_Lookup_row4.put(row4_HashRow);

							tos_count_tAdvancedHash_row4++;

							/**
							 * [tAdvancedHash_row4 main ] stop
							 */

							/**
							 * [tAdvancedHash_row4 process_data_begin ] start
							 */

							currentComponent = "tAdvancedHash_row4";

							/**
							 * [tAdvancedHash_row4 process_data_begin ] stop
							 */

							/**
							 * [tAdvancedHash_row4 process_data_end ] start
							 */

							currentComponent = "tAdvancedHash_row4";

							/**
							 * [tAdvancedHash_row4 process_data_end ] stop
							 */

						} // End of branch "row4"

						/**
						 * [tFileInputDelimited_4 process_data_end ] start
						 */

						currentComponent = "tFileInputDelimited_4";

						/**
						 * [tFileInputDelimited_4 process_data_end ] stop
						 */

						/**
						 * [tFileInputDelimited_4 end ] start
						 */

						currentComponent = "tFileInputDelimited_4";

						nb_line_tFileInputDelimited_4++;
					}

				} finally {
					if (!(filename_tFileInputDelimited_4 instanceof java.io.InputStream)) {
						if (csvReadertFileInputDelimited_4 != null) {
							csvReadertFileInputDelimited_4.close();
						}
					}
					if (csvReadertFileInputDelimited_4 != null) {
						globalMap.put("tFileInputDelimited_4_NB_LINE", nb_line_tFileInputDelimited_4);
					}

				}

				ok_Hash.put("tFileInputDelimited_4", true);
				end_Hash.put("tFileInputDelimited_4", System.currentTimeMillis());

				/**
				 * [tFileInputDelimited_4 end ] stop
				 */

				/**
				 * [tAdvancedHash_row4 end ] start
				 */

				currentComponent = "tAdvancedHash_row4";

				tHash_Lookup_row4.endPut();

				if (execStat) {
					if (resourceMap.get("inIterateVComp") == null || !((Boolean) resourceMap.get("inIterateVComp"))) {
						runStat.updateStatOnConnection("row4" + iterateId, 2, 0);
					}
				}

				ok_Hash.put("tAdvancedHash_row4", true);
				end_Hash.put("tAdvancedHash_row4", System.currentTimeMillis());

				/**
				 * [tAdvancedHash_row4 end ] stop
				 */

			} // end the resume

		} catch (java.lang.Exception e) {

			TalendException te = new TalendException(e, currentComponent, globalMap);

			throw te;
		} catch (java.lang.Error error) {

			runStat.stopThreadStat();

			throw error;
		} finally {

			try {

				/**
				 * [tFileInputDelimited_4 finally ] start
				 */

				currentComponent = "tFileInputDelimited_4";

				/**
				 * [tFileInputDelimited_4 finally ] stop
				 */

				/**
				 * [tAdvancedHash_row4 finally ] start
				 */

				currentComponent = "tAdvancedHash_row4";

				/**
				 * [tAdvancedHash_row4 finally ] stop
				 */

			} catch (java.lang.Exception e) {
				// ignore
			} catch (java.lang.Error error) {
				// ignore
			}
			resourceMap = null;
		}

		globalMap.put("tFileInputDelimited_4_SUBPROCESS_STATE", 1);
	}

	public static class row5Struct implements routines.system.IPersistableComparableLookupRow<row5Struct> {
		final static byte[] commonByteArrayLock_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography = new byte[0];
		static byte[] commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography = new byte[0];
		protected static final int DEFAULT_HASHCODE = 1;
		protected static final int PRIME = 31;
		protected int hashCode = DEFAULT_HASHCODE;
		public boolean hashCodeDirty = true;

		public String loopKey;

		public String Geo_Type_ID;

		public String getGeo_Type_ID() {
			return this.Geo_Type_ID;
		}

		public String Geo_Type_Name;

		public String getGeo_Type_Name() {
			return this.Geo_Type_Name;
		}

		public String Country;

		public String getCountry() {
			return this.Country;
		}

		@Override
		public int hashCode() {
			if (this.hashCodeDirty) {
				final int prime = PRIME;
				int result = DEFAULT_HASHCODE;

				result = prime * result + ((this.Country == null) ? 0 : this.Country.hashCode());

				this.hashCode = result;
				this.hashCodeDirty = false;
			}
			return this.hashCode;
		}

		@Override
		public boolean equals(Object obj) {
			if (this == obj)
				return true;
			if (obj == null)
				return false;
			if (getClass() != obj.getClass())
				return false;
			final row5Struct other = (row5Struct) obj;

			if (this.Country == null) {
				if (other.Country != null)
					return false;

			} else if (!this.Country.equals(other.Country))

				return false;

			return true;
		}

		public void copyDataTo(row5Struct other) {

			other.Geo_Type_ID = this.Geo_Type_ID;
			other.Geo_Type_Name = this.Geo_Type_Name;
			other.Country = this.Country;

		}

		public void copyKeysDataTo(row5Struct other) {

			other.Country = this.Country;

		}

		private String readString(DataInputStream dis, ObjectInputStream ois) throws IOException {
			String strReturn = null;
			int length = 0;
			length = dis.readInt();
			if (length == -1) {
				strReturn = null;
			} else {
				byte[] byteArray = new byte[length];
				dis.read(byteArray);
				strReturn = new String(byteArray, utf8Charset);
			}
			return strReturn;
		}

		private void writeString(String str, DataOutputStream dos, ObjectOutputStream oos) throws IOException {
			if (str == null) {
				dos.writeInt(-1);
			} else {
				byte[] byteArray = str.getBytes(utf8Charset);
				dos.writeInt(byteArray.length);
				dos.write(byteArray);
			}
		}

		private String readString(ObjectInputStream dis) throws IOException {
			String strReturn = null;
			int length = 0;
			length = dis.readInt();
			if (length == -1) {
				strReturn = null;
			} else {
				if (length > commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography.length) {
					if (length < 1024
							&& commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography.length == 0) {
						commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography = new byte[1024];
					} else {
						commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography = new byte[2 * length];
					}
				}
				dis.readFully(commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography, 0, length);
				strReturn = new String(commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography, 0, length,
						utf8Charset);
			}
			return strReturn;
		}

		private void writeString(String str, ObjectOutputStream dos) throws IOException {
			if (str == null) {
				dos.writeInt(-1);
			} else {
				byte[] byteArray = str.getBytes(utf8Charset);
				dos.writeInt(byteArray.length);
				dos.write(byteArray);
			}
		}

		public void readKeysData(ObjectInputStream dis) {

			synchronized (commonByteArrayLock_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography) {

				try {

					int length = 0;

					this.Country = readString(dis);

				} catch (IOException e) {
					throw new RuntimeException(e);

				}

			}

		}

		public void writeKeysData(ObjectOutputStream dos) {
			try {

				// String

				writeString(this.Country, dos);

			} catch (IOException e) {
				throw new RuntimeException(e);
			}

		}

		/**
		 * Fill Values data by reading ObjectInputStream.
		 */
		public void readValuesData(DataInputStream dis, ObjectInputStream ois) {
			try {

				int length = 0;

				this.Geo_Type_ID = readString(dis, ois);

				this.Geo_Type_Name = readString(dis, ois);

			} catch (IOException e) {
				throw new RuntimeException(e);

			}

		}

		/**
		 * Return a byte array which represents Values data.
		 */
		public void writeValuesData(DataOutputStream dos, ObjectOutputStream oos) {
			try {

				writeString(this.Geo_Type_ID, dos, oos);

				writeString(this.Geo_Type_Name, dos, oos);

			} catch (IOException e) {
				throw new RuntimeException(e);
			}

		}

		public String toString() {

			StringBuilder sb = new StringBuilder();
			sb.append(super.toString());
			sb.append("[");
			sb.append("Geo_Type_ID=" + Geo_Type_ID);
			sb.append(",Geo_Type_Name=" + Geo_Type_Name);
			sb.append(",Country=" + Country);
			sb.append("]");

			return sb.toString();
		}

		/**
		 * Compare keys
		 */
		public int compareTo(row5Struct other) {

			int returnValue = -1;

			returnValue = checkNullsAndCompare(this.Country, other.Country);
			if (returnValue != 0) {
				return returnValue;
			}

			return returnValue;
		}

		private int checkNullsAndCompare(Object object1, Object object2) {
			int returnValue = 0;
			if (object1 instanceof Comparable && object2 instanceof Comparable) {
				returnValue = ((Comparable) object1).compareTo(object2);
			} else if (object1 != null && object2 != null) {
				returnValue = compareStrings(object1.toString(), object2.toString());
			} else if (object1 == null && object2 != null) {
				returnValue = 1;
			} else if (object1 != null && object2 == null) {
				returnValue = -1;
			} else {
				returnValue = 0;
			}

			return returnValue;
		}

		private int compareStrings(String string1, String string2) {
			return string1.compareTo(string2);
		}

	}

	public void tFileInputDelimited_5Process(final java.util.Map<String, Object> globalMap) throws TalendException {
		globalMap.put("tFileInputDelimited_5_SUBPROCESS_STATE", 0);

		final boolean execStat = this.execStat;

		String iterateId = "";

		String currentComponent = "";
		java.util.Map<String, Object> resourceMap = new java.util.HashMap<String, Object>();

		try {
			// TDI-39566 avoid throwing an useless Exception
			boolean resumeIt = true;
			if (globalResumeTicket == false && resumeEntryMethodName != null) {
				String currentMethodName = new java.lang.Exception().getStackTrace()[0].getMethodName();
				resumeIt = resumeEntryMethodName.equals(currentMethodName);
			}
			if (resumeIt || globalResumeTicket) { // start the resume
				globalResumeTicket = true;

				row5Struct row5 = new row5Struct();

				/**
				 * [tAdvancedHash_row5 begin ] start
				 */

				ok_Hash.put("tAdvancedHash_row5", false);
				start_Hash.put("tAdvancedHash_row5", System.currentTimeMillis());

				currentComponent = "tAdvancedHash_row5";

				if (execStat) {
					if (resourceMap.get("inIterateVComp") == null) {

						if (execStat) {
							runStat.updateStatOnConnection("row5" + iterateId, 0, 0);
						}

					}
				}

				int tos_count_tAdvancedHash_row5 = 0;

				// connection name:row5
				// source node:tFileInputDelimited_5 - inputs:(after_tFileInputDelimited_8)
				// outputs:(row5,row5) | target node:tAdvancedHash_row5 - inputs:(row5)
				// outputs:()
				// linked node: tMap_1 - inputs:(row8,row2,row3,row4,row5,row6,row7,row1)
				// outputs:(sortieCsv)

				org.talend.designer.components.lookup.common.ICommonLookup.MATCHING_MODE matchingModeEnum_row5 = org.talend.designer.components.lookup.common.ICommonLookup.MATCHING_MODE.UNIQUE_MATCH;

				org.talend.designer.components.lookup.memory.AdvancedMemoryLookup<row5Struct> tHash_Lookup_row5 = org.talend.designer.components.lookup.memory.AdvancedMemoryLookup
						.<row5Struct>getLookup(matchingModeEnum_row5);

				globalMap.put("tHash_Lookup_row5", tHash_Lookup_row5);

				/**
				 * [tAdvancedHash_row5 begin ] stop
				 */

				/**
				 * [tFileInputDelimited_5 begin ] start
				 */

				ok_Hash.put("tFileInputDelimited_5", false);
				start_Hash.put("tFileInputDelimited_5", System.currentTimeMillis());

				currentComponent = "tFileInputDelimited_5";

				int tos_count_tFileInputDelimited_5 = 0;

				final routines.system.RowState rowstate_tFileInputDelimited_5 = new routines.system.RowState();

				int nb_line_tFileInputDelimited_5 = 0;
				int footer_tFileInputDelimited_5 = 0;
				int totalLinetFileInputDelimited_5 = 0;
				int limittFileInputDelimited_5 = -1;
				int lastLinetFileInputDelimited_5 = -1;

				char fieldSeparator_tFileInputDelimited_5[] = null;

				// support passing value (property: Field Separator) by 'context.fs' or
				// 'globalMap.get("fs")'.
				if (((String) ";").length() > 0) {
					fieldSeparator_tFileInputDelimited_5 = ((String) ";").toCharArray();
				} else {
					throw new IllegalArgumentException("Field Separator must be assigned a char.");
				}

				char rowSeparator_tFileInputDelimited_5[] = null;

				// support passing value (property: Row Separator) by 'context.rs' or
				// 'globalMap.get("rs")'.
				if (((String) "\n").length() > 0) {
					rowSeparator_tFileInputDelimited_5 = ((String) "\n").toCharArray();
				} else {
					throw new IllegalArgumentException("Row Separator must be assigned a char.");
				}

				Object filename_tFileInputDelimited_5 = /** Start field tFileInputDelimited_5:FILENAME */
						"C:/TEMP/TOS_DI-Win32-20190620_1446-V7.2.1/workspace/LLJ_SAE_INTEGRATIONDATAWAREHOUSE/Data/in/txt/5.txt"/**
																																 * End
																																 * field
																																 * tFileInputDelimited_5:FILENAME
																																 */
				;
				com.talend.csv.CSVReader csvReadertFileInputDelimited_5 = null;

				try {

					String[] rowtFileInputDelimited_5 = null;
					int currentLinetFileInputDelimited_5 = 0;
					int outputLinetFileInputDelimited_5 = 0;
					try {// TD110 begin
						if (filename_tFileInputDelimited_5 instanceof java.io.InputStream) {

							int footer_value_tFileInputDelimited_5 = 0;
							if (footer_value_tFileInputDelimited_5 > 0) {
								throw new java.lang.Exception(
										"When the input source is a stream,footer shouldn't be bigger than 0.");
							}

							csvReadertFileInputDelimited_5 = new com.talend.csv.CSVReader(
									(java.io.InputStream) filename_tFileInputDelimited_5,
									fieldSeparator_tFileInputDelimited_5[0], "UTF-8");
						} else {
							csvReadertFileInputDelimited_5 = new com.talend.csv.CSVReader(
									new java.io.BufferedReader(new java.io.InputStreamReader(
											new java.io.FileInputStream(String.valueOf(filename_tFileInputDelimited_5)),
											"UTF-8")),
									fieldSeparator_tFileInputDelimited_5[0]);
						}

						csvReadertFileInputDelimited_5.setTrimWhitespace(false);
						if ((rowSeparator_tFileInputDelimited_5[0] != '\n')
								&& (rowSeparator_tFileInputDelimited_5[0] != '\r'))
							csvReadertFileInputDelimited_5.setLineEnd("" + rowSeparator_tFileInputDelimited_5[0]);

						csvReadertFileInputDelimited_5.setQuoteChar('\"');

						// ?????doesn't work for other escapeChar
						// the default escape mode is double escape
						csvReadertFileInputDelimited_5.setEscapeChar(csvReadertFileInputDelimited_5.getQuoteChar());

						if (footer_tFileInputDelimited_5 > 0) {
							for (totalLinetFileInputDelimited_5 = 0; totalLinetFileInputDelimited_5 < 1; totalLinetFileInputDelimited_5++) {
								csvReadertFileInputDelimited_5.readNext();
							}
							csvReadertFileInputDelimited_5.setSkipEmptyRecords(true);
							while (csvReadertFileInputDelimited_5.readNext()) {

								rowtFileInputDelimited_5 = csvReadertFileInputDelimited_5.getValues();
								if (!(rowtFileInputDelimited_5.length == 1
										&& ("\015").equals(rowtFileInputDelimited_5[0]))) {// empty line when row
																							// separator is '\n'

									totalLinetFileInputDelimited_5++;

								}

							}
							int lastLineTemptFileInputDelimited_5 = totalLinetFileInputDelimited_5
									- footer_tFileInputDelimited_5 < 0 ? 0
											: totalLinetFileInputDelimited_5 - footer_tFileInputDelimited_5;
							if (lastLinetFileInputDelimited_5 > 0) {
								lastLinetFileInputDelimited_5 = lastLinetFileInputDelimited_5 < lastLineTemptFileInputDelimited_5
										? lastLinetFileInputDelimited_5
										: lastLineTemptFileInputDelimited_5;
							} else {
								lastLinetFileInputDelimited_5 = lastLineTemptFileInputDelimited_5;
							}

							csvReadertFileInputDelimited_5.close();
							if (filename_tFileInputDelimited_5 instanceof java.io.InputStream) {
								csvReadertFileInputDelimited_5 = new com.talend.csv.CSVReader(
										(java.io.InputStream) filename_tFileInputDelimited_5,
										fieldSeparator_tFileInputDelimited_5[0], "UTF-8");
							} else {
								csvReadertFileInputDelimited_5 = new com.talend.csv.CSVReader(
										new java.io.BufferedReader(
												new java.io.InputStreamReader(
														new java.io.FileInputStream(
																String.valueOf(filename_tFileInputDelimited_5)),
														"UTF-8")),
										fieldSeparator_tFileInputDelimited_5[0]);
							}
							csvReadertFileInputDelimited_5.setTrimWhitespace(false);
							if ((rowSeparator_tFileInputDelimited_5[0] != '\n')
									&& (rowSeparator_tFileInputDelimited_5[0] != '\r'))
								csvReadertFileInputDelimited_5.setLineEnd("" + rowSeparator_tFileInputDelimited_5[0]);

							csvReadertFileInputDelimited_5.setQuoteChar('\"');

							// ?????doesn't work for other escapeChar
							// the default escape mode is double escape
							csvReadertFileInputDelimited_5.setEscapeChar(csvReadertFileInputDelimited_5.getQuoteChar());

						}

						if (limittFileInputDelimited_5 != 0) {
							for (currentLinetFileInputDelimited_5 = 0; currentLinetFileInputDelimited_5 < 1; currentLinetFileInputDelimited_5++) {
								csvReadertFileInputDelimited_5.readNext();
							}
						}
						csvReadertFileInputDelimited_5.setSkipEmptyRecords(true);

					} catch (java.lang.Exception e) {

						System.err.println(e.getMessage());

					} // TD110 end

					while (limittFileInputDelimited_5 != 0 && csvReadertFileInputDelimited_5 != null
							&& csvReadertFileInputDelimited_5.readNext()) {
						rowstate_tFileInputDelimited_5.reset();

						rowtFileInputDelimited_5 = csvReadertFileInputDelimited_5.getValues();

						if (rowtFileInputDelimited_5.length == 1 && ("\015").equals(rowtFileInputDelimited_5[0])) {// empty
																													// line
																													// when
																													// row
																													// separator
																													// is
																													// '\n'
							continue;
						}

						currentLinetFileInputDelimited_5++;

						if (lastLinetFileInputDelimited_5 > -1
								&& currentLinetFileInputDelimited_5 > lastLinetFileInputDelimited_5) {
							break;
						}
						outputLinetFileInputDelimited_5++;
						if (limittFileInputDelimited_5 > 0
								&& outputLinetFileInputDelimited_5 > limittFileInputDelimited_5) {
							break;
						}

						row5 = null;

						row5 = null;

						boolean whetherReject_tFileInputDelimited_5 = false;
						row5 = new row5Struct();
						try {

							char fieldSeparator_tFileInputDelimited_5_ListType[] = null;
							// support passing value (property: Field Separator) by 'context.fs' or
							// 'globalMap.get("fs")'.
							if (((String) ";").length() > 0) {
								fieldSeparator_tFileInputDelimited_5_ListType = ((String) ";").toCharArray();
							} else {
								throw new IllegalArgumentException("Field Separator must be assigned a char.");
							}
							if (rowtFileInputDelimited_5.length == 1 && ("\015").equals(rowtFileInputDelimited_5[0])) {// empty
																														// line
																														// when
																														// row
																														// separator
																														// is
																														// '\n'

								row5.Geo_Type_ID = null;

								row5.Geo_Type_Name = null;

								row5.Country = null;

							} else {

								int columnIndexWithD_tFileInputDelimited_5 = 0; // Column Index

								columnIndexWithD_tFileInputDelimited_5 = 0;

								if (columnIndexWithD_tFileInputDelimited_5 < rowtFileInputDelimited_5.length) {

									row5.Geo_Type_ID = rowtFileInputDelimited_5[columnIndexWithD_tFileInputDelimited_5];

								} else {

									row5.Geo_Type_ID = null;

								}

								columnIndexWithD_tFileInputDelimited_5 = 1;

								if (columnIndexWithD_tFileInputDelimited_5 < rowtFileInputDelimited_5.length) {

									row5.Geo_Type_Name = rowtFileInputDelimited_5[columnIndexWithD_tFileInputDelimited_5];

								} else {

									row5.Geo_Type_Name = null;

								}

								columnIndexWithD_tFileInputDelimited_5 = 2;

								if (columnIndexWithD_tFileInputDelimited_5 < rowtFileInputDelimited_5.length) {

									row5.Country = rowtFileInputDelimited_5[columnIndexWithD_tFileInputDelimited_5];

								} else {

									row5.Country = null;

								}

							}

							if (rowstate_tFileInputDelimited_5.getException() != null) {
								throw rowstate_tFileInputDelimited_5.getException();
							}

						} catch (java.lang.Exception e) {
							whetherReject_tFileInputDelimited_5 = true;

							System.err.println(e.getMessage());
							row5 = null;

						}

						/**
						 * [tFileInputDelimited_5 begin ] stop
						 */

						/**
						 * [tFileInputDelimited_5 main ] start
						 */

						currentComponent = "tFileInputDelimited_5";

						tos_count_tFileInputDelimited_5++;

						/**
						 * [tFileInputDelimited_5 main ] stop
						 */

						/**
						 * [tFileInputDelimited_5 process_data_begin ] start
						 */

						currentComponent = "tFileInputDelimited_5";

						/**
						 * [tFileInputDelimited_5 process_data_begin ] stop
						 */
// Start of branch "row5"
						if (row5 != null) {

							/**
							 * [tAdvancedHash_row5 main ] start
							 */

							currentComponent = "tAdvancedHash_row5";

							// row5
							// row5

							if (execStat) {
								runStat.updateStatOnConnection("row5" + iterateId, 1, 1);
							}

							row5Struct row5_HashRow = new row5Struct();

							row5_HashRow.Geo_Type_ID = row5.Geo_Type_ID;

							row5_HashRow.Geo_Type_Name = row5.Geo_Type_Name;

							row5_HashRow.Country = row5.Country;

							tHash_Lookup_row5.put(row5_HashRow);

							tos_count_tAdvancedHash_row5++;

							/**
							 * [tAdvancedHash_row5 main ] stop
							 */

							/**
							 * [tAdvancedHash_row5 process_data_begin ] start
							 */

							currentComponent = "tAdvancedHash_row5";

							/**
							 * [tAdvancedHash_row5 process_data_begin ] stop
							 */

							/**
							 * [tAdvancedHash_row5 process_data_end ] start
							 */

							currentComponent = "tAdvancedHash_row5";

							/**
							 * [tAdvancedHash_row5 process_data_end ] stop
							 */

						} // End of branch "row5"

						/**
						 * [tFileInputDelimited_5 process_data_end ] start
						 */

						currentComponent = "tFileInputDelimited_5";

						/**
						 * [tFileInputDelimited_5 process_data_end ] stop
						 */

						/**
						 * [tFileInputDelimited_5 end ] start
						 */

						currentComponent = "tFileInputDelimited_5";

						nb_line_tFileInputDelimited_5++;
					}

				} finally {
					if (!(filename_tFileInputDelimited_5 instanceof java.io.InputStream)) {
						if (csvReadertFileInputDelimited_5 != null) {
							csvReadertFileInputDelimited_5.close();
						}
					}
					if (csvReadertFileInputDelimited_5 != null) {
						globalMap.put("tFileInputDelimited_5_NB_LINE", nb_line_tFileInputDelimited_5);
					}

				}

				ok_Hash.put("tFileInputDelimited_5", true);
				end_Hash.put("tFileInputDelimited_5", System.currentTimeMillis());

				/**
				 * [tFileInputDelimited_5 end ] stop
				 */

				/**
				 * [tAdvancedHash_row5 end ] start
				 */

				currentComponent = "tAdvancedHash_row5";

				tHash_Lookup_row5.endPut();

				if (execStat) {
					if (resourceMap.get("inIterateVComp") == null || !((Boolean) resourceMap.get("inIterateVComp"))) {
						runStat.updateStatOnConnection("row5" + iterateId, 2, 0);
					}
				}

				ok_Hash.put("tAdvancedHash_row5", true);
				end_Hash.put("tAdvancedHash_row5", System.currentTimeMillis());

				/**
				 * [tAdvancedHash_row5 end ] stop
				 */

			} // end the resume

		} catch (java.lang.Exception e) {

			TalendException te = new TalendException(e, currentComponent, globalMap);

			throw te;
		} catch (java.lang.Error error) {

			runStat.stopThreadStat();

			throw error;
		} finally {

			try {

				/**
				 * [tFileInputDelimited_5 finally ] start
				 */

				currentComponent = "tFileInputDelimited_5";

				/**
				 * [tFileInputDelimited_5 finally ] stop
				 */

				/**
				 * [tAdvancedHash_row5 finally ] start
				 */

				currentComponent = "tAdvancedHash_row5";

				/**
				 * [tAdvancedHash_row5 finally ] stop
				 */

			} catch (java.lang.Exception e) {
				// ignore
			} catch (java.lang.Error error) {
				// ignore
			}
			resourceMap = null;
		}

		globalMap.put("tFileInputDelimited_5_SUBPROCESS_STATE", 1);
	}

	public static class row6Struct implements routines.system.IPersistableComparableLookupRow<row6Struct> {
		final static byte[] commonByteArrayLock_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography = new byte[0];
		static byte[] commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography = new byte[0];
		protected static final int DEFAULT_HASHCODE = 1;
		protected static final int PRIME = 31;
		protected int hashCode = DEFAULT_HASHCODE;
		public boolean hashCodeDirty = true;

		public String loopKey;

		public String Postal_Code_ID;

		public String getPostal_Code_ID() {
			return this.Postal_Code_ID;
		}

		public String Postal_Code;

		public String getPostal_Code() {
			return this.Postal_Code;
		}

		public String City_Name;

		public String getCity_Name() {
			return this.City_Name;
		}

		public String City_ID;

		public String getCity_ID() {
			return this.City_ID;
		}

		@Override
		public int hashCode() {
			if (this.hashCodeDirty) {
				final int prime = PRIME;
				int result = DEFAULT_HASHCODE;

				result = prime * result + ((this.Postal_Code == null) ? 0 : this.Postal_Code.hashCode());

				this.hashCode = result;
				this.hashCodeDirty = false;
			}
			return this.hashCode;
		}

		@Override
		public boolean equals(Object obj) {
			if (this == obj)
				return true;
			if (obj == null)
				return false;
			if (getClass() != obj.getClass())
				return false;
			final row6Struct other = (row6Struct) obj;

			if (this.Postal_Code == null) {
				if (other.Postal_Code != null)
					return false;

			} else if (!this.Postal_Code.equals(other.Postal_Code))

				return false;

			return true;
		}

		public void copyDataTo(row6Struct other) {

			other.Postal_Code_ID = this.Postal_Code_ID;
			other.Postal_Code = this.Postal_Code;
			other.City_Name = this.City_Name;
			other.City_ID = this.City_ID;

		}

		public void copyKeysDataTo(row6Struct other) {

			other.Postal_Code = this.Postal_Code;

		}

		private String readString(DataInputStream dis, ObjectInputStream ois) throws IOException {
			String strReturn = null;
			int length = 0;
			length = dis.readInt();
			if (length == -1) {
				strReturn = null;
			} else {
				byte[] byteArray = new byte[length];
				dis.read(byteArray);
				strReturn = new String(byteArray, utf8Charset);
			}
			return strReturn;
		}

		private void writeString(String str, DataOutputStream dos, ObjectOutputStream oos) throws IOException {
			if (str == null) {
				dos.writeInt(-1);
			} else {
				byte[] byteArray = str.getBytes(utf8Charset);
				dos.writeInt(byteArray.length);
				dos.write(byteArray);
			}
		}

		private String readString(ObjectInputStream dis) throws IOException {
			String strReturn = null;
			int length = 0;
			length = dis.readInt();
			if (length == -1) {
				strReturn = null;
			} else {
				if (length > commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography.length) {
					if (length < 1024
							&& commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography.length == 0) {
						commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography = new byte[1024];
					} else {
						commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography = new byte[2 * length];
					}
				}
				dis.readFully(commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography, 0, length);
				strReturn = new String(commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography, 0, length,
						utf8Charset);
			}
			return strReturn;
		}

		private void writeString(String str, ObjectOutputStream dos) throws IOException {
			if (str == null) {
				dos.writeInt(-1);
			} else {
				byte[] byteArray = str.getBytes(utf8Charset);
				dos.writeInt(byteArray.length);
				dos.write(byteArray);
			}
		}

		public void readKeysData(ObjectInputStream dis) {

			synchronized (commonByteArrayLock_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography) {

				try {

					int length = 0;

					this.Postal_Code = readString(dis);

				} catch (IOException e) {
					throw new RuntimeException(e);

				}

			}

		}

		public void writeKeysData(ObjectOutputStream dos) {
			try {

				// String

				writeString(this.Postal_Code, dos);

			} catch (IOException e) {
				throw new RuntimeException(e);
			}

		}

		/**
		 * Fill Values data by reading ObjectInputStream.
		 */
		public void readValuesData(DataInputStream dis, ObjectInputStream ois) {
			try {

				int length = 0;

				this.Postal_Code_ID = readString(dis, ois);

				this.City_Name = readString(dis, ois);

				this.City_ID = readString(dis, ois);

			} catch (IOException e) {
				throw new RuntimeException(e);

			}

		}

		/**
		 * Return a byte array which represents Values data.
		 */
		public void writeValuesData(DataOutputStream dos, ObjectOutputStream oos) {
			try {

				writeString(this.Postal_Code_ID, dos, oos);

				writeString(this.City_Name, dos, oos);

				writeString(this.City_ID, dos, oos);

			} catch (IOException e) {
				throw new RuntimeException(e);
			}

		}

		public String toString() {

			StringBuilder sb = new StringBuilder();
			sb.append(super.toString());
			sb.append("[");
			sb.append("Postal_Code_ID=" + Postal_Code_ID);
			sb.append(",Postal_Code=" + Postal_Code);
			sb.append(",City_Name=" + City_Name);
			sb.append(",City_ID=" + City_ID);
			sb.append("]");

			return sb.toString();
		}

		/**
		 * Compare keys
		 */
		public int compareTo(row6Struct other) {

			int returnValue = -1;

			returnValue = checkNullsAndCompare(this.Postal_Code, other.Postal_Code);
			if (returnValue != 0) {
				return returnValue;
			}

			return returnValue;
		}

		private int checkNullsAndCompare(Object object1, Object object2) {
			int returnValue = 0;
			if (object1 instanceof Comparable && object2 instanceof Comparable) {
				returnValue = ((Comparable) object1).compareTo(object2);
			} else if (object1 != null && object2 != null) {
				returnValue = compareStrings(object1.toString(), object2.toString());
			} else if (object1 == null && object2 != null) {
				returnValue = 1;
			} else if (object1 != null && object2 == null) {
				returnValue = -1;
			} else {
				returnValue = 0;
			}

			return returnValue;
		}

		private int compareStrings(String string1, String string2) {
			return string1.compareTo(string2);
		}

	}

	public void tFileInputDelimited_6Process(final java.util.Map<String, Object> globalMap) throws TalendException {
		globalMap.put("tFileInputDelimited_6_SUBPROCESS_STATE", 0);

		final boolean execStat = this.execStat;

		String iterateId = "";

		String currentComponent = "";
		java.util.Map<String, Object> resourceMap = new java.util.HashMap<String, Object>();

		try {
			// TDI-39566 avoid throwing an useless Exception
			boolean resumeIt = true;
			if (globalResumeTicket == false && resumeEntryMethodName != null) {
				String currentMethodName = new java.lang.Exception().getStackTrace()[0].getMethodName();
				resumeIt = resumeEntryMethodName.equals(currentMethodName);
			}
			if (resumeIt || globalResumeTicket) { // start the resume
				globalResumeTicket = true;

				row6Struct row6 = new row6Struct();

				/**
				 * [tAdvancedHash_row6 begin ] start
				 */

				ok_Hash.put("tAdvancedHash_row6", false);
				start_Hash.put("tAdvancedHash_row6", System.currentTimeMillis());

				currentComponent = "tAdvancedHash_row6";

				if (execStat) {
					if (resourceMap.get("inIterateVComp") == null) {

						if (execStat) {
							runStat.updateStatOnConnection("row6" + iterateId, 0, 0);
						}

					}
				}

				int tos_count_tAdvancedHash_row6 = 0;

				// connection name:row6
				// source node:tFileInputDelimited_6 - inputs:(after_tFileInputDelimited_8)
				// outputs:(row6,row6) | target node:tAdvancedHash_row6 - inputs:(row6)
				// outputs:()
				// linked node: tMap_1 - inputs:(row8,row2,row3,row4,row5,row6,row7,row1)
				// outputs:(sortieCsv)

				org.talend.designer.components.lookup.common.ICommonLookup.MATCHING_MODE matchingModeEnum_row6 = org.talend.designer.components.lookup.common.ICommonLookup.MATCHING_MODE.UNIQUE_MATCH;

				org.talend.designer.components.lookup.memory.AdvancedMemoryLookup<row6Struct> tHash_Lookup_row6 = org.talend.designer.components.lookup.memory.AdvancedMemoryLookup
						.<row6Struct>getLookup(matchingModeEnum_row6);

				globalMap.put("tHash_Lookup_row6", tHash_Lookup_row6);

				/**
				 * [tAdvancedHash_row6 begin ] stop
				 */

				/**
				 * [tFileInputDelimited_6 begin ] start
				 */

				ok_Hash.put("tFileInputDelimited_6", false);
				start_Hash.put("tFileInputDelimited_6", System.currentTimeMillis());

				currentComponent = "tFileInputDelimited_6";

				int tos_count_tFileInputDelimited_6 = 0;

				final routines.system.RowState rowstate_tFileInputDelimited_6 = new routines.system.RowState();

				int nb_line_tFileInputDelimited_6 = 0;
				int footer_tFileInputDelimited_6 = 0;
				int totalLinetFileInputDelimited_6 = 0;
				int limittFileInputDelimited_6 = -1;
				int lastLinetFileInputDelimited_6 = -1;

				char fieldSeparator_tFileInputDelimited_6[] = null;

				// support passing value (property: Field Separator) by 'context.fs' or
				// 'globalMap.get("fs")'.
				if (((String) ";").length() > 0) {
					fieldSeparator_tFileInputDelimited_6 = ((String) ";").toCharArray();
				} else {
					throw new IllegalArgumentException("Field Separator must be assigned a char.");
				}

				char rowSeparator_tFileInputDelimited_6[] = null;

				// support passing value (property: Row Separator) by 'context.rs' or
				// 'globalMap.get("rs")'.
				if (((String) "\n").length() > 0) {
					rowSeparator_tFileInputDelimited_6 = ((String) "\n").toCharArray();
				} else {
					throw new IllegalArgumentException("Row Separator must be assigned a char.");
				}

				Object filename_tFileInputDelimited_6 = /** Start field tFileInputDelimited_6:FILENAME */
						"C:/TEMP/TOS_DI-Win32-20190620_1446-V7.2.1/workspace/LLJ_SAE_INTEGRATIONDATAWAREHOUSE/Data/in/txt/6.txt"/**
																																 * End
																																 * field
																																 * tFileInputDelimited_6:FILENAME
																																 */
				;
				com.talend.csv.CSVReader csvReadertFileInputDelimited_6 = null;

				try {

					String[] rowtFileInputDelimited_6 = null;
					int currentLinetFileInputDelimited_6 = 0;
					int outputLinetFileInputDelimited_6 = 0;
					try {// TD110 begin
						if (filename_tFileInputDelimited_6 instanceof java.io.InputStream) {

							int footer_value_tFileInputDelimited_6 = 0;
							if (footer_value_tFileInputDelimited_6 > 0) {
								throw new java.lang.Exception(
										"When the input source is a stream,footer shouldn't be bigger than 0.");
							}

							csvReadertFileInputDelimited_6 = new com.talend.csv.CSVReader(
									(java.io.InputStream) filename_tFileInputDelimited_6,
									fieldSeparator_tFileInputDelimited_6[0], "US-ASCII");
						} else {
							csvReadertFileInputDelimited_6 = new com.talend.csv.CSVReader(
									new java.io.BufferedReader(new java.io.InputStreamReader(
											new java.io.FileInputStream(String.valueOf(filename_tFileInputDelimited_6)),
											"US-ASCII")),
									fieldSeparator_tFileInputDelimited_6[0]);
						}

						csvReadertFileInputDelimited_6.setTrimWhitespace(false);
						if ((rowSeparator_tFileInputDelimited_6[0] != '\n')
								&& (rowSeparator_tFileInputDelimited_6[0] != '\r'))
							csvReadertFileInputDelimited_6.setLineEnd("" + rowSeparator_tFileInputDelimited_6[0]);

						csvReadertFileInputDelimited_6.setQuoteChar('\"');

						// ?????doesn't work for other escapeChar
						// the default escape mode is double escape
						csvReadertFileInputDelimited_6.setEscapeChar(csvReadertFileInputDelimited_6.getQuoteChar());

						if (footer_tFileInputDelimited_6 > 0) {
							for (totalLinetFileInputDelimited_6 = 0; totalLinetFileInputDelimited_6 < 1; totalLinetFileInputDelimited_6++) {
								csvReadertFileInputDelimited_6.readNext();
							}
							csvReadertFileInputDelimited_6.setSkipEmptyRecords(true);
							while (csvReadertFileInputDelimited_6.readNext()) {

								rowtFileInputDelimited_6 = csvReadertFileInputDelimited_6.getValues();
								if (!(rowtFileInputDelimited_6.length == 1
										&& ("\015").equals(rowtFileInputDelimited_6[0]))) {// empty line when row
																							// separator is '\n'

									totalLinetFileInputDelimited_6++;

								}

							}
							int lastLineTemptFileInputDelimited_6 = totalLinetFileInputDelimited_6
									- footer_tFileInputDelimited_6 < 0 ? 0
											: totalLinetFileInputDelimited_6 - footer_tFileInputDelimited_6;
							if (lastLinetFileInputDelimited_6 > 0) {
								lastLinetFileInputDelimited_6 = lastLinetFileInputDelimited_6 < lastLineTemptFileInputDelimited_6
										? lastLinetFileInputDelimited_6
										: lastLineTemptFileInputDelimited_6;
							} else {
								lastLinetFileInputDelimited_6 = lastLineTemptFileInputDelimited_6;
							}

							csvReadertFileInputDelimited_6.close();
							if (filename_tFileInputDelimited_6 instanceof java.io.InputStream) {
								csvReadertFileInputDelimited_6 = new com.talend.csv.CSVReader(
										(java.io.InputStream) filename_tFileInputDelimited_6,
										fieldSeparator_tFileInputDelimited_6[0], "US-ASCII");
							} else {
								csvReadertFileInputDelimited_6 = new com.talend.csv.CSVReader(
										new java.io.BufferedReader(
												new java.io.InputStreamReader(
														new java.io.FileInputStream(
																String.valueOf(filename_tFileInputDelimited_6)),
														"US-ASCII")),
										fieldSeparator_tFileInputDelimited_6[0]);
							}
							csvReadertFileInputDelimited_6.setTrimWhitespace(false);
							if ((rowSeparator_tFileInputDelimited_6[0] != '\n')
									&& (rowSeparator_tFileInputDelimited_6[0] != '\r'))
								csvReadertFileInputDelimited_6.setLineEnd("" + rowSeparator_tFileInputDelimited_6[0]);

							csvReadertFileInputDelimited_6.setQuoteChar('\"');

							// ?????doesn't work for other escapeChar
							// the default escape mode is double escape
							csvReadertFileInputDelimited_6.setEscapeChar(csvReadertFileInputDelimited_6.getQuoteChar());

						}

						if (limittFileInputDelimited_6 != 0) {
							for (currentLinetFileInputDelimited_6 = 0; currentLinetFileInputDelimited_6 < 1; currentLinetFileInputDelimited_6++) {
								csvReadertFileInputDelimited_6.readNext();
							}
						}
						csvReadertFileInputDelimited_6.setSkipEmptyRecords(true);

					} catch (java.lang.Exception e) {

						System.err.println(e.getMessage());

					} // TD110 end

					while (limittFileInputDelimited_6 != 0 && csvReadertFileInputDelimited_6 != null
							&& csvReadertFileInputDelimited_6.readNext()) {
						rowstate_tFileInputDelimited_6.reset();

						rowtFileInputDelimited_6 = csvReadertFileInputDelimited_6.getValues();

						if (rowtFileInputDelimited_6.length == 1 && ("\015").equals(rowtFileInputDelimited_6[0])) {// empty
																													// line
																													// when
																													// row
																													// separator
																													// is
																													// '\n'
							continue;
						}

						currentLinetFileInputDelimited_6++;

						if (lastLinetFileInputDelimited_6 > -1
								&& currentLinetFileInputDelimited_6 > lastLinetFileInputDelimited_6) {
							break;
						}
						outputLinetFileInputDelimited_6++;
						if (limittFileInputDelimited_6 > 0
								&& outputLinetFileInputDelimited_6 > limittFileInputDelimited_6) {
							break;
						}

						row6 = null;

						row6 = null;

						boolean whetherReject_tFileInputDelimited_6 = false;
						row6 = new row6Struct();
						try {

							char fieldSeparator_tFileInputDelimited_6_ListType[] = null;
							// support passing value (property: Field Separator) by 'context.fs' or
							// 'globalMap.get("fs")'.
							if (((String) ";").length() > 0) {
								fieldSeparator_tFileInputDelimited_6_ListType = ((String) ";").toCharArray();
							} else {
								throw new IllegalArgumentException("Field Separator must be assigned a char.");
							}
							if (rowtFileInputDelimited_6.length == 1 && ("\015").equals(rowtFileInputDelimited_6[0])) {// empty
																														// line
																														// when
																														// row
																														// separator
																														// is
																														// '\n'

								row6.Postal_Code_ID = null;

								row6.Postal_Code = null;

								row6.City_Name = null;

								row6.City_ID = null;

							} else {

								int columnIndexWithD_tFileInputDelimited_6 = 0; // Column Index

								columnIndexWithD_tFileInputDelimited_6 = 0;

								if (columnIndexWithD_tFileInputDelimited_6 < rowtFileInputDelimited_6.length) {

									row6.Postal_Code_ID = rowtFileInputDelimited_6[columnIndexWithD_tFileInputDelimited_6];

								} else {

									row6.Postal_Code_ID = null;

								}

								columnIndexWithD_tFileInputDelimited_6 = 1;

								if (columnIndexWithD_tFileInputDelimited_6 < rowtFileInputDelimited_6.length) {

									row6.Postal_Code = rowtFileInputDelimited_6[columnIndexWithD_tFileInputDelimited_6];

								} else {

									row6.Postal_Code = null;

								}

								columnIndexWithD_tFileInputDelimited_6 = 2;

								if (columnIndexWithD_tFileInputDelimited_6 < rowtFileInputDelimited_6.length) {

									row6.City_Name = rowtFileInputDelimited_6[columnIndexWithD_tFileInputDelimited_6];

								} else {

									row6.City_Name = null;

								}

								columnIndexWithD_tFileInputDelimited_6 = 3;

								if (columnIndexWithD_tFileInputDelimited_6 < rowtFileInputDelimited_6.length) {

									row6.City_ID = rowtFileInputDelimited_6[columnIndexWithD_tFileInputDelimited_6];

								} else {

									row6.City_ID = null;

								}

							}

							if (rowstate_tFileInputDelimited_6.getException() != null) {
								throw rowstate_tFileInputDelimited_6.getException();
							}

						} catch (java.lang.Exception e) {
							whetherReject_tFileInputDelimited_6 = true;

							System.err.println(e.getMessage());
							row6 = null;

						}

						/**
						 * [tFileInputDelimited_6 begin ] stop
						 */

						/**
						 * [tFileInputDelimited_6 main ] start
						 */

						currentComponent = "tFileInputDelimited_6";

						tos_count_tFileInputDelimited_6++;

						/**
						 * [tFileInputDelimited_6 main ] stop
						 */

						/**
						 * [tFileInputDelimited_6 process_data_begin ] start
						 */

						currentComponent = "tFileInputDelimited_6";

						/**
						 * [tFileInputDelimited_6 process_data_begin ] stop
						 */
// Start of branch "row6"
						if (row6 != null) {

							/**
							 * [tAdvancedHash_row6 main ] start
							 */

							currentComponent = "tAdvancedHash_row6";

							// row6
							// row6

							if (execStat) {
								runStat.updateStatOnConnection("row6" + iterateId, 1, 1);
							}

							row6Struct row6_HashRow = new row6Struct();

							row6_HashRow.Postal_Code_ID = row6.Postal_Code_ID;

							row6_HashRow.Postal_Code = row6.Postal_Code;

							row6_HashRow.City_Name = row6.City_Name;

							row6_HashRow.City_ID = row6.City_ID;

							tHash_Lookup_row6.put(row6_HashRow);

							tos_count_tAdvancedHash_row6++;

							/**
							 * [tAdvancedHash_row6 main ] stop
							 */

							/**
							 * [tAdvancedHash_row6 process_data_begin ] start
							 */

							currentComponent = "tAdvancedHash_row6";

							/**
							 * [tAdvancedHash_row6 process_data_begin ] stop
							 */

							/**
							 * [tAdvancedHash_row6 process_data_end ] start
							 */

							currentComponent = "tAdvancedHash_row6";

							/**
							 * [tAdvancedHash_row6 process_data_end ] stop
							 */

						} // End of branch "row6"

						/**
						 * [tFileInputDelimited_6 process_data_end ] start
						 */

						currentComponent = "tFileInputDelimited_6";

						/**
						 * [tFileInputDelimited_6 process_data_end ] stop
						 */

						/**
						 * [tFileInputDelimited_6 end ] start
						 */

						currentComponent = "tFileInputDelimited_6";

						nb_line_tFileInputDelimited_6++;
					}

				} finally {
					if (!(filename_tFileInputDelimited_6 instanceof java.io.InputStream)) {
						if (csvReadertFileInputDelimited_6 != null) {
							csvReadertFileInputDelimited_6.close();
						}
					}
					if (csvReadertFileInputDelimited_6 != null) {
						globalMap.put("tFileInputDelimited_6_NB_LINE", nb_line_tFileInputDelimited_6);
					}

				}

				ok_Hash.put("tFileInputDelimited_6", true);
				end_Hash.put("tFileInputDelimited_6", System.currentTimeMillis());

				/**
				 * [tFileInputDelimited_6 end ] stop
				 */

				/**
				 * [tAdvancedHash_row6 end ] start
				 */

				currentComponent = "tAdvancedHash_row6";

				tHash_Lookup_row6.endPut();

				if (execStat) {
					if (resourceMap.get("inIterateVComp") == null || !((Boolean) resourceMap.get("inIterateVComp"))) {
						runStat.updateStatOnConnection("row6" + iterateId, 2, 0);
					}
				}

				ok_Hash.put("tAdvancedHash_row6", true);
				end_Hash.put("tAdvancedHash_row6", System.currentTimeMillis());

				/**
				 * [tAdvancedHash_row6 end ] stop
				 */

			} // end the resume

		} catch (java.lang.Exception e) {

			TalendException te = new TalendException(e, currentComponent, globalMap);

			throw te;
		} catch (java.lang.Error error) {

			runStat.stopThreadStat();

			throw error;
		} finally {

			try {

				/**
				 * [tFileInputDelimited_6 finally ] start
				 */

				currentComponent = "tFileInputDelimited_6";

				/**
				 * [tFileInputDelimited_6 finally ] stop
				 */

				/**
				 * [tAdvancedHash_row6 finally ] start
				 */

				currentComponent = "tAdvancedHash_row6";

				/**
				 * [tAdvancedHash_row6 finally ] stop
				 */

			} catch (java.lang.Exception e) {
				// ignore
			} catch (java.lang.Error error) {
				// ignore
			}
			resourceMap = null;
		}

		globalMap.put("tFileInputDelimited_6_SUBPROCESS_STATE", 1);
	}

	public static class row7Struct implements routines.system.IPersistableComparableLookupRow<row7Struct> {
		final static byte[] commonByteArrayLock_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography = new byte[0];
		static byte[] commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography = new byte[0];
		protected static final int DEFAULT_HASHCODE = 1;
		protected static final int PRIME = 31;
		protected int hashCode = DEFAULT_HASHCODE;
		public boolean hashCodeDirty = true;

		public String loopKey;

		public String State_ID;

		public String getState_ID() {
			return this.State_ID;
		}

		public String State_Type;

		public String getState_Type() {
			return this.State_Type;
		}

		public String State_Code;

		public String getState_Code() {
			return this.State_Code;
		}

		public String State_Name;

		public String getState_Name() {
			return this.State_Name;
		}

		public String Country;

		public String getCountry() {
			return this.Country;
		}

		@Override
		public int hashCode() {
			if (this.hashCodeDirty) {
				final int prime = PRIME;
				int result = DEFAULT_HASHCODE;

				result = prime * result + ((this.Country == null) ? 0 : this.Country.hashCode());

				this.hashCode = result;
				this.hashCodeDirty = false;
			}
			return this.hashCode;
		}

		@Override
		public boolean equals(Object obj) {
			if (this == obj)
				return true;
			if (obj == null)
				return false;
			if (getClass() != obj.getClass())
				return false;
			final row7Struct other = (row7Struct) obj;

			if (this.Country == null) {
				if (other.Country != null)
					return false;

			} else if (!this.Country.equals(other.Country))

				return false;

			return true;
		}

		public void copyDataTo(row7Struct other) {

			other.State_ID = this.State_ID;
			other.State_Type = this.State_Type;
			other.State_Code = this.State_Code;
			other.State_Name = this.State_Name;
			other.Country = this.Country;

		}

		public void copyKeysDataTo(row7Struct other) {

			other.Country = this.Country;

		}

		private String readString(DataInputStream dis, ObjectInputStream ois) throws IOException {
			String strReturn = null;
			int length = 0;
			length = dis.readInt();
			if (length == -1) {
				strReturn = null;
			} else {
				byte[] byteArray = new byte[length];
				dis.read(byteArray);
				strReturn = new String(byteArray, utf8Charset);
			}
			return strReturn;
		}

		private void writeString(String str, DataOutputStream dos, ObjectOutputStream oos) throws IOException {
			if (str == null) {
				dos.writeInt(-1);
			} else {
				byte[] byteArray = str.getBytes(utf8Charset);
				dos.writeInt(byteArray.length);
				dos.write(byteArray);
			}
		}

		private String readString(ObjectInputStream dis) throws IOException {
			String strReturn = null;
			int length = 0;
			length = dis.readInt();
			if (length == -1) {
				strReturn = null;
			} else {
				if (length > commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography.length) {
					if (length < 1024
							&& commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography.length == 0) {
						commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography = new byte[1024];
					} else {
						commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography = new byte[2 * length];
					}
				}
				dis.readFully(commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography, 0, length);
				strReturn = new String(commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography, 0, length,
						utf8Charset);
			}
			return strReturn;
		}

		private void writeString(String str, ObjectOutputStream dos) throws IOException {
			if (str == null) {
				dos.writeInt(-1);
			} else {
				byte[] byteArray = str.getBytes(utf8Charset);
				dos.writeInt(byteArray.length);
				dos.write(byteArray);
			}
		}

		public void readKeysData(ObjectInputStream dis) {

			synchronized (commonByteArrayLock_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography) {

				try {

					int length = 0;

					this.Country = readString(dis);

				} catch (IOException e) {
					throw new RuntimeException(e);

				}

			}

		}

		public void writeKeysData(ObjectOutputStream dos) {
			try {

				// String

				writeString(this.Country, dos);

			} catch (IOException e) {
				throw new RuntimeException(e);
			}

		}

		/**
		 * Fill Values data by reading ObjectInputStream.
		 */
		public void readValuesData(DataInputStream dis, ObjectInputStream ois) {
			try {

				int length = 0;

				this.State_ID = readString(dis, ois);

				this.State_Type = readString(dis, ois);

				this.State_Code = readString(dis, ois);

				this.State_Name = readString(dis, ois);

			} catch (IOException e) {
				throw new RuntimeException(e);

			}

		}

		/**
		 * Return a byte array which represents Values data.
		 */
		public void writeValuesData(DataOutputStream dos, ObjectOutputStream oos) {
			try {

				writeString(this.State_ID, dos, oos);

				writeString(this.State_Type, dos, oos);

				writeString(this.State_Code, dos, oos);

				writeString(this.State_Name, dos, oos);

			} catch (IOException e) {
				throw new RuntimeException(e);
			}

		}

		public String toString() {

			StringBuilder sb = new StringBuilder();
			sb.append(super.toString());
			sb.append("[");
			sb.append("State_ID=" + State_ID);
			sb.append(",State_Type=" + State_Type);
			sb.append(",State_Code=" + State_Code);
			sb.append(",State_Name=" + State_Name);
			sb.append(",Country=" + Country);
			sb.append("]");

			return sb.toString();
		}

		/**
		 * Compare keys
		 */
		public int compareTo(row7Struct other) {

			int returnValue = -1;

			returnValue = checkNullsAndCompare(this.Country, other.Country);
			if (returnValue != 0) {
				return returnValue;
			}

			return returnValue;
		}

		private int checkNullsAndCompare(Object object1, Object object2) {
			int returnValue = 0;
			if (object1 instanceof Comparable && object2 instanceof Comparable) {
				returnValue = ((Comparable) object1).compareTo(object2);
			} else if (object1 != null && object2 != null) {
				returnValue = compareStrings(object1.toString(), object2.toString());
			} else if (object1 == null && object2 != null) {
				returnValue = 1;
			} else if (object1 != null && object2 == null) {
				returnValue = -1;
			} else {
				returnValue = 0;
			}

			return returnValue;
		}

		private int compareStrings(String string1, String string2) {
			return string1.compareTo(string2);
		}

	}

	public void tFileInputDelimited_7Process(final java.util.Map<String, Object> globalMap) throws TalendException {
		globalMap.put("tFileInputDelimited_7_SUBPROCESS_STATE", 0);

		final boolean execStat = this.execStat;

		String iterateId = "";

		String currentComponent = "";
		java.util.Map<String, Object> resourceMap = new java.util.HashMap<String, Object>();

		try {
			// TDI-39566 avoid throwing an useless Exception
			boolean resumeIt = true;
			if (globalResumeTicket == false && resumeEntryMethodName != null) {
				String currentMethodName = new java.lang.Exception().getStackTrace()[0].getMethodName();
				resumeIt = resumeEntryMethodName.equals(currentMethodName);
			}
			if (resumeIt || globalResumeTicket) { // start the resume
				globalResumeTicket = true;

				row7Struct row7 = new row7Struct();

				/**
				 * [tAdvancedHash_row7 begin ] start
				 */

				ok_Hash.put("tAdvancedHash_row7", false);
				start_Hash.put("tAdvancedHash_row7", System.currentTimeMillis());

				currentComponent = "tAdvancedHash_row7";

				if (execStat) {
					if (resourceMap.get("inIterateVComp") == null) {

						if (execStat) {
							runStat.updateStatOnConnection("row7" + iterateId, 0, 0);
						}

					}
				}

				int tos_count_tAdvancedHash_row7 = 0;

				// connection name:row7
				// source node:tFileInputDelimited_7 - inputs:(after_tFileInputDelimited_8)
				// outputs:(row7,row7) | target node:tAdvancedHash_row7 - inputs:(row7)
				// outputs:()
				// linked node: tMap_1 - inputs:(row8,row2,row3,row4,row5,row6,row7,row1)
				// outputs:(sortieCsv)

				org.talend.designer.components.lookup.common.ICommonLookup.MATCHING_MODE matchingModeEnum_row7 = org.talend.designer.components.lookup.common.ICommonLookup.MATCHING_MODE.UNIQUE_MATCH;

				org.talend.designer.components.lookup.memory.AdvancedMemoryLookup<row7Struct> tHash_Lookup_row7 = org.talend.designer.components.lookup.memory.AdvancedMemoryLookup
						.<row7Struct>getLookup(matchingModeEnum_row7);

				globalMap.put("tHash_Lookup_row7", tHash_Lookup_row7);

				/**
				 * [tAdvancedHash_row7 begin ] stop
				 */

				/**
				 * [tFileInputDelimited_7 begin ] start
				 */

				ok_Hash.put("tFileInputDelimited_7", false);
				start_Hash.put("tFileInputDelimited_7", System.currentTimeMillis());

				currentComponent = "tFileInputDelimited_7";

				int tos_count_tFileInputDelimited_7 = 0;

				final routines.system.RowState rowstate_tFileInputDelimited_7 = new routines.system.RowState();

				int nb_line_tFileInputDelimited_7 = 0;
				int footer_tFileInputDelimited_7 = 0;
				int totalLinetFileInputDelimited_7 = 0;
				int limittFileInputDelimited_7 = -1;
				int lastLinetFileInputDelimited_7 = -1;

				char fieldSeparator_tFileInputDelimited_7[] = null;

				// support passing value (property: Field Separator) by 'context.fs' or
				// 'globalMap.get("fs")'.
				if (((String) ";").length() > 0) {
					fieldSeparator_tFileInputDelimited_7 = ((String) ";").toCharArray();
				} else {
					throw new IllegalArgumentException("Field Separator must be assigned a char.");
				}

				char rowSeparator_tFileInputDelimited_7[] = null;

				// support passing value (property: Row Separator) by 'context.rs' or
				// 'globalMap.get("rs")'.
				if (((String) "\n").length() > 0) {
					rowSeparator_tFileInputDelimited_7 = ((String) "\n").toCharArray();
				} else {
					throw new IllegalArgumentException("Row Separator must be assigned a char.");
				}

				Object filename_tFileInputDelimited_7 = /** Start field tFileInputDelimited_7:FILENAME */
						"C:/TEMP/TOS_DI-Win32-20190620_1446-V7.2.1/workspace/LLJ_SAE_INTEGRATIONDATAWAREHOUSE/Data/in/txt/7.txt"/**
																																 * End
																																 * field
																																 * tFileInputDelimited_7:FILENAME
																																 */
				;
				com.talend.csv.CSVReader csvReadertFileInputDelimited_7 = null;

				try {

					String[] rowtFileInputDelimited_7 = null;
					int currentLinetFileInputDelimited_7 = 0;
					int outputLinetFileInputDelimited_7 = 0;
					try {// TD110 begin
						if (filename_tFileInputDelimited_7 instanceof java.io.InputStream) {

							int footer_value_tFileInputDelimited_7 = 0;
							if (footer_value_tFileInputDelimited_7 > 0) {
								throw new java.lang.Exception(
										"When the input source is a stream,footer shouldn't be bigger than 0.");
							}

							csvReadertFileInputDelimited_7 = new com.talend.csv.CSVReader(
									(java.io.InputStream) filename_tFileInputDelimited_7,
									fieldSeparator_tFileInputDelimited_7[0], "US-ASCII");
						} else {
							csvReadertFileInputDelimited_7 = new com.talend.csv.CSVReader(
									new java.io.BufferedReader(new java.io.InputStreamReader(
											new java.io.FileInputStream(String.valueOf(filename_tFileInputDelimited_7)),
											"US-ASCII")),
									fieldSeparator_tFileInputDelimited_7[0]);
						}

						csvReadertFileInputDelimited_7.setTrimWhitespace(false);
						if ((rowSeparator_tFileInputDelimited_7[0] != '\n')
								&& (rowSeparator_tFileInputDelimited_7[0] != '\r'))
							csvReadertFileInputDelimited_7.setLineEnd("" + rowSeparator_tFileInputDelimited_7[0]);

						csvReadertFileInputDelimited_7.setQuoteChar('\"');

						// ?????doesn't work for other escapeChar
						// the default escape mode is double escape
						csvReadertFileInputDelimited_7.setEscapeChar(csvReadertFileInputDelimited_7.getQuoteChar());

						if (footer_tFileInputDelimited_7 > 0) {
							for (totalLinetFileInputDelimited_7 = 0; totalLinetFileInputDelimited_7 < 1; totalLinetFileInputDelimited_7++) {
								csvReadertFileInputDelimited_7.readNext();
							}
							csvReadertFileInputDelimited_7.setSkipEmptyRecords(true);
							while (csvReadertFileInputDelimited_7.readNext()) {

								rowtFileInputDelimited_7 = csvReadertFileInputDelimited_7.getValues();
								if (!(rowtFileInputDelimited_7.length == 1
										&& ("\015").equals(rowtFileInputDelimited_7[0]))) {// empty line when row
																							// separator is '\n'

									totalLinetFileInputDelimited_7++;

								}

							}
							int lastLineTemptFileInputDelimited_7 = totalLinetFileInputDelimited_7
									- footer_tFileInputDelimited_7 < 0 ? 0
											: totalLinetFileInputDelimited_7 - footer_tFileInputDelimited_7;
							if (lastLinetFileInputDelimited_7 > 0) {
								lastLinetFileInputDelimited_7 = lastLinetFileInputDelimited_7 < lastLineTemptFileInputDelimited_7
										? lastLinetFileInputDelimited_7
										: lastLineTemptFileInputDelimited_7;
							} else {
								lastLinetFileInputDelimited_7 = lastLineTemptFileInputDelimited_7;
							}

							csvReadertFileInputDelimited_7.close();
							if (filename_tFileInputDelimited_7 instanceof java.io.InputStream) {
								csvReadertFileInputDelimited_7 = new com.talend.csv.CSVReader(
										(java.io.InputStream) filename_tFileInputDelimited_7,
										fieldSeparator_tFileInputDelimited_7[0], "US-ASCII");
							} else {
								csvReadertFileInputDelimited_7 = new com.talend.csv.CSVReader(
										new java.io.BufferedReader(
												new java.io.InputStreamReader(
														new java.io.FileInputStream(
																String.valueOf(filename_tFileInputDelimited_7)),
														"US-ASCII")),
										fieldSeparator_tFileInputDelimited_7[0]);
							}
							csvReadertFileInputDelimited_7.setTrimWhitespace(false);
							if ((rowSeparator_tFileInputDelimited_7[0] != '\n')
									&& (rowSeparator_tFileInputDelimited_7[0] != '\r'))
								csvReadertFileInputDelimited_7.setLineEnd("" + rowSeparator_tFileInputDelimited_7[0]);

							csvReadertFileInputDelimited_7.setQuoteChar('\"');

							// ?????doesn't work for other escapeChar
							// the default escape mode is double escape
							csvReadertFileInputDelimited_7.setEscapeChar(csvReadertFileInputDelimited_7.getQuoteChar());

						}

						if (limittFileInputDelimited_7 != 0) {
							for (currentLinetFileInputDelimited_7 = 0; currentLinetFileInputDelimited_7 < 1; currentLinetFileInputDelimited_7++) {
								csvReadertFileInputDelimited_7.readNext();
							}
						}
						csvReadertFileInputDelimited_7.setSkipEmptyRecords(true);

					} catch (java.lang.Exception e) {

						System.err.println(e.getMessage());

					} // TD110 end

					while (limittFileInputDelimited_7 != 0 && csvReadertFileInputDelimited_7 != null
							&& csvReadertFileInputDelimited_7.readNext()) {
						rowstate_tFileInputDelimited_7.reset();

						rowtFileInputDelimited_7 = csvReadertFileInputDelimited_7.getValues();

						if (rowtFileInputDelimited_7.length == 1 && ("\015").equals(rowtFileInputDelimited_7[0])) {// empty
																													// line
																													// when
																													// row
																													// separator
																													// is
																													// '\n'
							continue;
						}

						currentLinetFileInputDelimited_7++;

						if (lastLinetFileInputDelimited_7 > -1
								&& currentLinetFileInputDelimited_7 > lastLinetFileInputDelimited_7) {
							break;
						}
						outputLinetFileInputDelimited_7++;
						if (limittFileInputDelimited_7 > 0
								&& outputLinetFileInputDelimited_7 > limittFileInputDelimited_7) {
							break;
						}

						row7 = null;

						row7 = null;

						boolean whetherReject_tFileInputDelimited_7 = false;
						row7 = new row7Struct();
						try {

							char fieldSeparator_tFileInputDelimited_7_ListType[] = null;
							// support passing value (property: Field Separator) by 'context.fs' or
							// 'globalMap.get("fs")'.
							if (((String) ";").length() > 0) {
								fieldSeparator_tFileInputDelimited_7_ListType = ((String) ";").toCharArray();
							} else {
								throw new IllegalArgumentException("Field Separator must be assigned a char.");
							}
							if (rowtFileInputDelimited_7.length == 1 && ("\015").equals(rowtFileInputDelimited_7[0])) {// empty
																														// line
																														// when
																														// row
																														// separator
																														// is
																														// '\n'

								row7.State_ID = null;

								row7.State_Type = null;

								row7.State_Code = null;

								row7.State_Name = null;

								row7.Country = null;

							} else {

								int columnIndexWithD_tFileInputDelimited_7 = 0; // Column Index

								columnIndexWithD_tFileInputDelimited_7 = 0;

								if (columnIndexWithD_tFileInputDelimited_7 < rowtFileInputDelimited_7.length) {

									row7.State_ID = rowtFileInputDelimited_7[columnIndexWithD_tFileInputDelimited_7];

								} else {

									row7.State_ID = null;

								}

								columnIndexWithD_tFileInputDelimited_7 = 1;

								if (columnIndexWithD_tFileInputDelimited_7 < rowtFileInputDelimited_7.length) {

									row7.State_Type = rowtFileInputDelimited_7[columnIndexWithD_tFileInputDelimited_7];

								} else {

									row7.State_Type = null;

								}

								columnIndexWithD_tFileInputDelimited_7 = 2;

								if (columnIndexWithD_tFileInputDelimited_7 < rowtFileInputDelimited_7.length) {

									row7.State_Code = rowtFileInputDelimited_7[columnIndexWithD_tFileInputDelimited_7];

								} else {

									row7.State_Code = null;

								}

								columnIndexWithD_tFileInputDelimited_7 = 3;

								if (columnIndexWithD_tFileInputDelimited_7 < rowtFileInputDelimited_7.length) {

									row7.State_Name = rowtFileInputDelimited_7[columnIndexWithD_tFileInputDelimited_7];

								} else {

									row7.State_Name = null;

								}

								columnIndexWithD_tFileInputDelimited_7 = 4;

								if (columnIndexWithD_tFileInputDelimited_7 < rowtFileInputDelimited_7.length) {

									row7.Country = rowtFileInputDelimited_7[columnIndexWithD_tFileInputDelimited_7];

								} else {

									row7.Country = null;

								}

							}

							if (rowstate_tFileInputDelimited_7.getException() != null) {
								throw rowstate_tFileInputDelimited_7.getException();
							}

						} catch (java.lang.Exception e) {
							whetherReject_tFileInputDelimited_7 = true;

							System.err.println(e.getMessage());
							row7 = null;

						}

						/**
						 * [tFileInputDelimited_7 begin ] stop
						 */

						/**
						 * [tFileInputDelimited_7 main ] start
						 */

						currentComponent = "tFileInputDelimited_7";

						tos_count_tFileInputDelimited_7++;

						/**
						 * [tFileInputDelimited_7 main ] stop
						 */

						/**
						 * [tFileInputDelimited_7 process_data_begin ] start
						 */

						currentComponent = "tFileInputDelimited_7";

						/**
						 * [tFileInputDelimited_7 process_data_begin ] stop
						 */
// Start of branch "row7"
						if (row7 != null) {

							/**
							 * [tAdvancedHash_row7 main ] start
							 */

							currentComponent = "tAdvancedHash_row7";

							// row7
							// row7

							if (execStat) {
								runStat.updateStatOnConnection("row7" + iterateId, 1, 1);
							}

							row7Struct row7_HashRow = new row7Struct();

							row7_HashRow.State_ID = row7.State_ID;

							row7_HashRow.State_Type = row7.State_Type;

							row7_HashRow.State_Code = row7.State_Code;

							row7_HashRow.State_Name = row7.State_Name;

							row7_HashRow.Country = row7.Country;

							tHash_Lookup_row7.put(row7_HashRow);

							tos_count_tAdvancedHash_row7++;

							/**
							 * [tAdvancedHash_row7 main ] stop
							 */

							/**
							 * [tAdvancedHash_row7 process_data_begin ] start
							 */

							currentComponent = "tAdvancedHash_row7";

							/**
							 * [tAdvancedHash_row7 process_data_begin ] stop
							 */

							/**
							 * [tAdvancedHash_row7 process_data_end ] start
							 */

							currentComponent = "tAdvancedHash_row7";

							/**
							 * [tAdvancedHash_row7 process_data_end ] stop
							 */

						} // End of branch "row7"

						/**
						 * [tFileInputDelimited_7 process_data_end ] start
						 */

						currentComponent = "tFileInputDelimited_7";

						/**
						 * [tFileInputDelimited_7 process_data_end ] stop
						 */

						/**
						 * [tFileInputDelimited_7 end ] start
						 */

						currentComponent = "tFileInputDelimited_7";

						nb_line_tFileInputDelimited_7++;
					}

				} finally {
					if (!(filename_tFileInputDelimited_7 instanceof java.io.InputStream)) {
						if (csvReadertFileInputDelimited_7 != null) {
							csvReadertFileInputDelimited_7.close();
						}
					}
					if (csvReadertFileInputDelimited_7 != null) {
						globalMap.put("tFileInputDelimited_7_NB_LINE", nb_line_tFileInputDelimited_7);
					}

				}

				ok_Hash.put("tFileInputDelimited_7", true);
				end_Hash.put("tFileInputDelimited_7", System.currentTimeMillis());

				/**
				 * [tFileInputDelimited_7 end ] stop
				 */

				/**
				 * [tAdvancedHash_row7 end ] start
				 */

				currentComponent = "tAdvancedHash_row7";

				tHash_Lookup_row7.endPut();

				if (execStat) {
					if (resourceMap.get("inIterateVComp") == null || !((Boolean) resourceMap.get("inIterateVComp"))) {
						runStat.updateStatOnConnection("row7" + iterateId, 2, 0);
					}
				}

				ok_Hash.put("tAdvancedHash_row7", true);
				end_Hash.put("tAdvancedHash_row7", System.currentTimeMillis());

				/**
				 * [tAdvancedHash_row7 end ] stop
				 */

			} // end the resume

		} catch (java.lang.Exception e) {

			TalendException te = new TalendException(e, currentComponent, globalMap);

			throw te;
		} catch (java.lang.Error error) {

			runStat.stopThreadStat();

			throw error;
		} finally {

			try {

				/**
				 * [tFileInputDelimited_7 finally ] start
				 */

				currentComponent = "tFileInputDelimited_7";

				/**
				 * [tFileInputDelimited_7 finally ] stop
				 */

				/**
				 * [tAdvancedHash_row7 finally ] start
				 */

				currentComponent = "tAdvancedHash_row7";

				/**
				 * [tAdvancedHash_row7 finally ] stop
				 */

			} catch (java.lang.Exception e) {
				// ignore
			} catch (java.lang.Error error) {
				// ignore
			}
			resourceMap = null;
		}

		globalMap.put("tFileInputDelimited_7_SUBPROCESS_STATE", 1);
	}

	public static class sortieCsvStruct implements routines.system.IPersistableRow<sortieCsvStruct> {
		final static byte[] commonByteArrayLock_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography = new byte[0];
		static byte[] commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography = new byte[0];
		protected static final int DEFAULT_HASHCODE = 1;
		protected static final int PRIME = 31;
		protected int hashCode = DEFAULT_HASHCODE;
		public boolean hashCodeDirty = true;

		public String loopKey;

		public String Street_ID;

		public String getStreet_ID() {
			return this.Street_ID;
		}

		public String Continent;

		public String getContinent() {
			return this.Continent;
		}

		public String Country;

		public String getCountry() {
			return this.Country;
		}

		public String State;

		public String getState() {
			return this.State;
		}

		public String Region;

		public String getRegion() {
			return this.Region;
		}

		public String Province;

		public String getProvince() {
			return this.Province;
		}

		public String County;

		public String getCounty() {
			return this.County;
		}

		public String City;

		public String getCity() {
			return this.City;
		}

		public String State_Code;

		public String getState_Code() {
			return this.State_Code;
		}

		public String Postal_Code;

		public String getPostal_Code() {
			return this.Postal_Code;
		}

		public String Street_Name;

		public String getStreet_Name() {
			return this.Street_Name;
		}

		@Override
		public int hashCode() {
			if (this.hashCodeDirty) {
				final int prime = PRIME;
				int result = DEFAULT_HASHCODE;

				result = prime * result + ((this.Street_ID == null) ? 0 : this.Street_ID.hashCode());

				this.hashCode = result;
				this.hashCodeDirty = false;
			}
			return this.hashCode;
		}

		@Override
		public boolean equals(Object obj) {
			if (this == obj)
				return true;
			if (obj == null)
				return false;
			if (getClass() != obj.getClass())
				return false;
			final sortieCsvStruct other = (sortieCsvStruct) obj;

			if (this.Street_ID == null) {
				if (other.Street_ID != null)
					return false;

			} else if (!this.Street_ID.equals(other.Street_ID))

				return false;

			return true;
		}

		public void copyDataTo(sortieCsvStruct other) {

			other.Street_ID = this.Street_ID;
			other.Continent = this.Continent;
			other.Country = this.Country;
			other.State = this.State;
			other.Region = this.Region;
			other.Province = this.Province;
			other.County = this.County;
			other.City = this.City;
			other.State_Code = this.State_Code;
			other.Postal_Code = this.Postal_Code;
			other.Street_Name = this.Street_Name;

		}

		public void copyKeysDataTo(sortieCsvStruct other) {

			other.Street_ID = this.Street_ID;

		}

		private String readString(ObjectInputStream dis) throws IOException {
			String strReturn = null;
			int length = 0;
			length = dis.readInt();
			if (length == -1) {
				strReturn = null;
			} else {
				if (length > commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography.length) {
					if (length < 1024
							&& commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography.length == 0) {
						commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography = new byte[1024];
					} else {
						commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography = new byte[2 * length];
					}
				}
				dis.readFully(commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography, 0, length);
				strReturn = new String(commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography, 0, length,
						utf8Charset);
			}
			return strReturn;
		}

		private void writeString(String str, ObjectOutputStream dos) throws IOException {
			if (str == null) {
				dos.writeInt(-1);
			} else {
				byte[] byteArray = str.getBytes(utf8Charset);
				dos.writeInt(byteArray.length);
				dos.write(byteArray);
			}
		}

		public void readData(ObjectInputStream dis) {

			synchronized (commonByteArrayLock_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography) {

				try {

					int length = 0;

					this.Street_ID = readString(dis);

					this.Continent = readString(dis);

					this.Country = readString(dis);

					this.State = readString(dis);

					this.Region = readString(dis);

					this.Province = readString(dis);

					this.County = readString(dis);

					this.City = readString(dis);

					this.State_Code = readString(dis);

					this.Postal_Code = readString(dis);

					this.Street_Name = readString(dis);

				} catch (IOException e) {
					throw new RuntimeException(e);

				}

			}

		}

		public void writeData(ObjectOutputStream dos) {
			try {

				// String

				writeString(this.Street_ID, dos);

				// String

				writeString(this.Continent, dos);

				// String

				writeString(this.Country, dos);

				// String

				writeString(this.State, dos);

				// String

				writeString(this.Region, dos);

				// String

				writeString(this.Province, dos);

				// String

				writeString(this.County, dos);

				// String

				writeString(this.City, dos);

				// String

				writeString(this.State_Code, dos);

				// String

				writeString(this.Postal_Code, dos);

				// String

				writeString(this.Street_Name, dos);

			} catch (IOException e) {
				throw new RuntimeException(e);
			}

		}

		public String toString() {

			StringBuilder sb = new StringBuilder();
			sb.append(super.toString());
			sb.append("[");
			sb.append("Street_ID=" + Street_ID);
			sb.append(",Continent=" + Continent);
			sb.append(",Country=" + Country);
			sb.append(",State=" + State);
			sb.append(",Region=" + Region);
			sb.append(",Province=" + Province);
			sb.append(",County=" + County);
			sb.append(",City=" + City);
			sb.append(",State_Code=" + State_Code);
			sb.append(",Postal_Code=" + Postal_Code);
			sb.append(",Street_Name=" + Street_Name);
			sb.append("]");

			return sb.toString();
		}

		/**
		 * Compare keys
		 */
		public int compareTo(sortieCsvStruct other) {

			int returnValue = -1;

			returnValue = checkNullsAndCompare(this.Street_ID, other.Street_ID);
			if (returnValue != 0) {
				return returnValue;
			}

			return returnValue;
		}

		private int checkNullsAndCompare(Object object1, Object object2) {
			int returnValue = 0;
			if (object1 instanceof Comparable && object2 instanceof Comparable) {
				returnValue = ((Comparable) object1).compareTo(object2);
			} else if (object1 != null && object2 != null) {
				returnValue = compareStrings(object1.toString(), object2.toString());
			} else if (object1 == null && object2 != null) {
				returnValue = 1;
			} else if (object1 != null && object2 == null) {
				returnValue = -1;
			} else {
				returnValue = 0;
			}

			return returnValue;
		}

		private int compareStrings(String string1, String string2) {
			return string1.compareTo(string2);
		}

	}

	public static class row1Struct implements routines.system.IPersistableRow<row1Struct> {
		final static byte[] commonByteArrayLock_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography = new byte[0];
		static byte[] commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography = new byte[0];

		public String Street_ID;

		public String getStreet_ID() {
			return this.Street_ID;
		}

		public String Country;

		public String getCountry() {
			return this.Country;
		}

		public String Street_Name;

		public String getStreet_Name() {
			return this.Street_Name;
		}

		public String City_ID;

		public String getCity_ID() {
			return this.City_ID;
		}

		public String Postal_Code;

		public String getPostal_Code() {
			return this.Postal_Code;
		}

		public String From_Street_Num;

		public String getFrom_Street_Num() {
			return this.From_Street_Num;
		}

		public String To_Street_Num;

		public String getTo_Street_Num() {
			return this.To_Street_Num;
		}

		public String City_Name;

		public String getCity_Name() {
			return this.City_Name;
		}

		public String Count;

		public String getCount() {
			return this.Count;
		}

		public String County_ID;

		public String getCounty_ID() {
			return this.County_ID;
		}

		public String Postal_Code_ID;

		public String getPostal_Code_ID() {
			return this.Postal_Code_ID;
		}

		private String readString(ObjectInputStream dis) throws IOException {
			String strReturn = null;
			int length = 0;
			length = dis.readInt();
			if (length == -1) {
				strReturn = null;
			} else {
				if (length > commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography.length) {
					if (length < 1024
							&& commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography.length == 0) {
						commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography = new byte[1024];
					} else {
						commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography = new byte[2 * length];
					}
				}
				dis.readFully(commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography, 0, length);
				strReturn = new String(commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography, 0, length,
						utf8Charset);
			}
			return strReturn;
		}

		private void writeString(String str, ObjectOutputStream dos) throws IOException {
			if (str == null) {
				dos.writeInt(-1);
			} else {
				byte[] byteArray = str.getBytes(utf8Charset);
				dos.writeInt(byteArray.length);
				dos.write(byteArray);
			}
		}

		public void readData(ObjectInputStream dis) {

			synchronized (commonByteArrayLock_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography) {

				try {

					int length = 0;

					this.Street_ID = readString(dis);

					this.Country = readString(dis);

					this.Street_Name = readString(dis);

					this.City_ID = readString(dis);

					this.Postal_Code = readString(dis);

					this.From_Street_Num = readString(dis);

					this.To_Street_Num = readString(dis);

					this.City_Name = readString(dis);

					this.Count = readString(dis);

					this.County_ID = readString(dis);

					this.Postal_Code_ID = readString(dis);

				} catch (IOException e) {
					throw new RuntimeException(e);

				}

			}

		}

		public void writeData(ObjectOutputStream dos) {
			try {

				// String

				writeString(this.Street_ID, dos);

				// String

				writeString(this.Country, dos);

				// String

				writeString(this.Street_Name, dos);

				// String

				writeString(this.City_ID, dos);

				// String

				writeString(this.Postal_Code, dos);

				// String

				writeString(this.From_Street_Num, dos);

				// String

				writeString(this.To_Street_Num, dos);

				// String

				writeString(this.City_Name, dos);

				// String

				writeString(this.Count, dos);

				// String

				writeString(this.County_ID, dos);

				// String

				writeString(this.Postal_Code_ID, dos);

			} catch (IOException e) {
				throw new RuntimeException(e);
			}

		}

		public String toString() {

			StringBuilder sb = new StringBuilder();
			sb.append(super.toString());
			sb.append("[");
			sb.append("Street_ID=" + Street_ID);
			sb.append(",Country=" + Country);
			sb.append(",Street_Name=" + Street_Name);
			sb.append(",City_ID=" + City_ID);
			sb.append(",Postal_Code=" + Postal_Code);
			sb.append(",From_Street_Num=" + From_Street_Num);
			sb.append(",To_Street_Num=" + To_Street_Num);
			sb.append(",City_Name=" + City_Name);
			sb.append(",Count=" + Count);
			sb.append(",County_ID=" + County_ID);
			sb.append(",Postal_Code_ID=" + Postal_Code_ID);
			sb.append("]");

			return sb.toString();
		}

		/**
		 * Compare keys
		 */
		public int compareTo(row1Struct other) {

			int returnValue = -1;

			return returnValue;
		}

		private int checkNullsAndCompare(Object object1, Object object2) {
			int returnValue = 0;
			if (object1 instanceof Comparable && object2 instanceof Comparable) {
				returnValue = ((Comparable) object1).compareTo(object2);
			} else if (object1 != null && object2 != null) {
				returnValue = compareStrings(object1.toString(), object2.toString());
			} else if (object1 == null && object2 != null) {
				returnValue = 1;
			} else if (object1 != null && object2 == null) {
				returnValue = -1;
			} else {
				returnValue = 0;
			}

			return returnValue;
		}

		private int compareStrings(String string1, String string2) {
			return string1.compareTo(string2);
		}

	}

	public static class after_tFileInputDelimited_8Struct
			implements routines.system.IPersistableRow<after_tFileInputDelimited_8Struct> {
		final static byte[] commonByteArrayLock_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography = new byte[0];
		static byte[] commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography = new byte[0];
		protected static final int DEFAULT_HASHCODE = 1;
		protected static final int PRIME = 31;
		protected int hashCode = DEFAULT_HASHCODE;
		public boolean hashCodeDirty = true;

		public String loopKey;

		public String Street_ID;

		public String getStreet_ID() {
			return this.Street_ID;
		}

		public String Country;

		public String getCountry() {
			return this.Country;
		}

		public String Street_Name;

		public String getStreet_Name() {
			return this.Street_Name;
		}

		public String City_ID;

		public String getCity_ID() {
			return this.City_ID;
		}

		public String Postal_Code;

		public String getPostal_Code() {
			return this.Postal_Code;
		}

		public String From_Street_Num;

		public String getFrom_Street_Num() {
			return this.From_Street_Num;
		}

		public String To_Street_Num;

		public String getTo_Street_Num() {
			return this.To_Street_Num;
		}

		public String City_Name;

		public String getCity_Name() {
			return this.City_Name;
		}

		public String Count;

		public String getCount() {
			return this.Count;
		}

		public String County_ID;

		public String getCounty_ID() {
			return this.County_ID;
		}

		public String Postal_Code_ID;

		public String getPostal_Code_ID() {
			return this.Postal_Code_ID;
		}

		@Override
		public int hashCode() {
			if (this.hashCodeDirty) {
				final int prime = PRIME;
				int result = DEFAULT_HASHCODE;

				result = prime * result + ((this.Street_ID == null) ? 0 : this.Street_ID.hashCode());

				this.hashCode = result;
				this.hashCodeDirty = false;
			}
			return this.hashCode;
		}

		@Override
		public boolean equals(Object obj) {
			if (this == obj)
				return true;
			if (obj == null)
				return false;
			if (getClass() != obj.getClass())
				return false;
			final after_tFileInputDelimited_8Struct other = (after_tFileInputDelimited_8Struct) obj;

			if (this.Street_ID == null) {
				if (other.Street_ID != null)
					return false;

			} else if (!this.Street_ID.equals(other.Street_ID))

				return false;

			return true;
		}

		public void copyDataTo(after_tFileInputDelimited_8Struct other) {

			other.Street_ID = this.Street_ID;
			other.Country = this.Country;
			other.Street_Name = this.Street_Name;
			other.City_ID = this.City_ID;
			other.Postal_Code = this.Postal_Code;
			other.From_Street_Num = this.From_Street_Num;
			other.To_Street_Num = this.To_Street_Num;
			other.City_Name = this.City_Name;
			other.Count = this.Count;
			other.County_ID = this.County_ID;
			other.Postal_Code_ID = this.Postal_Code_ID;

		}

		public void copyKeysDataTo(after_tFileInputDelimited_8Struct other) {

			other.Street_ID = this.Street_ID;

		}

		private String readString(ObjectInputStream dis) throws IOException {
			String strReturn = null;
			int length = 0;
			length = dis.readInt();
			if (length == -1) {
				strReturn = null;
			} else {
				if (length > commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography.length) {
					if (length < 1024
							&& commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography.length == 0) {
						commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography = new byte[1024];
					} else {
						commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography = new byte[2 * length];
					}
				}
				dis.readFully(commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography, 0, length);
				strReturn = new String(commonByteArray_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography, 0, length,
						utf8Charset);
			}
			return strReturn;
		}

		private void writeString(String str, ObjectOutputStream dos) throws IOException {
			if (str == null) {
				dos.writeInt(-1);
			} else {
				byte[] byteArray = str.getBytes(utf8Charset);
				dos.writeInt(byteArray.length);
				dos.write(byteArray);
			}
		}

		public void readData(ObjectInputStream dis) {

			synchronized (commonByteArrayLock_LLJ_SAE_INTEGRATIONDATAWAREHOUSE_dimensionGeography) {

				try {

					int length = 0;

					this.Street_ID = readString(dis);

					this.Country = readString(dis);

					this.Street_Name = readString(dis);

					this.City_ID = readString(dis);

					this.Postal_Code = readString(dis);

					this.From_Street_Num = readString(dis);

					this.To_Street_Num = readString(dis);

					this.City_Name = readString(dis);

					this.Count = readString(dis);

					this.County_ID = readString(dis);

					this.Postal_Code_ID = readString(dis);

				} catch (IOException e) {
					throw new RuntimeException(e);

				}

			}

		}

		public void writeData(ObjectOutputStream dos) {
			try {

				// String

				writeString(this.Street_ID, dos);

				// String

				writeString(this.Country, dos);

				// String

				writeString(this.Street_Name, dos);

				// String

				writeString(this.City_ID, dos);

				// String

				writeString(this.Postal_Code, dos);

				// String

				writeString(this.From_Street_Num, dos);

				// String

				writeString(this.To_Street_Num, dos);

				// String

				writeString(this.City_Name, dos);

				// String

				writeString(this.Count, dos);

				// String

				writeString(this.County_ID, dos);

				// String

				writeString(this.Postal_Code_ID, dos);

			} catch (IOException e) {
				throw new RuntimeException(e);
			}

		}

		public String toString() {

			StringBuilder sb = new StringBuilder();
			sb.append(super.toString());
			sb.append("[");
			sb.append("Street_ID=" + Street_ID);
			sb.append(",Country=" + Country);
			sb.append(",Street_Name=" + Street_Name);
			sb.append(",City_ID=" + City_ID);
			sb.append(",Postal_Code=" + Postal_Code);
			sb.append(",From_Street_Num=" + From_Street_Num);
			sb.append(",To_Street_Num=" + To_Street_Num);
			sb.append(",City_Name=" + City_Name);
			sb.append(",Count=" + Count);
			sb.append(",County_ID=" + County_ID);
			sb.append(",Postal_Code_ID=" + Postal_Code_ID);
			sb.append("]");

			return sb.toString();
		}

		/**
		 * Compare keys
		 */
		public int compareTo(after_tFileInputDelimited_8Struct other) {

			int returnValue = -1;

			returnValue = checkNullsAndCompare(this.Street_ID, other.Street_ID);
			if (returnValue != 0) {
				return returnValue;
			}

			return returnValue;
		}

		private int checkNullsAndCompare(Object object1, Object object2) {
			int returnValue = 0;
			if (object1 instanceof Comparable && object2 instanceof Comparable) {
				returnValue = ((Comparable) object1).compareTo(object2);
			} else if (object1 != null && object2 != null) {
				returnValue = compareStrings(object1.toString(), object2.toString());
			} else if (object1 == null && object2 != null) {
				returnValue = 1;
			} else if (object1 != null && object2 == null) {
				returnValue = -1;
			} else {
				returnValue = 0;
			}

			return returnValue;
		}

		private int compareStrings(String string1, String string2) {
			return string1.compareTo(string2);
		}

	}

	public void tFileInputDelimited_8Process(final java.util.Map<String, Object> globalMap) throws TalendException {
		globalMap.put("tFileInputDelimited_8_SUBPROCESS_STATE", 0);

		final boolean execStat = this.execStat;

		String iterateId = "";

		String currentComponent = "";
		java.util.Map<String, Object> resourceMap = new java.util.HashMap<String, Object>();

		try {
			// TDI-39566 avoid throwing an useless Exception
			boolean resumeIt = true;
			if (globalResumeTicket == false && resumeEntryMethodName != null) {
				String currentMethodName = new java.lang.Exception().getStackTrace()[0].getMethodName();
				resumeIt = resumeEntryMethodName.equals(currentMethodName);
			}
			if (resumeIt || globalResumeTicket) { // start the resume
				globalResumeTicket = true;

				tFileInputDelimited_1Process(globalMap);
				tFileInputDelimited_2Process(globalMap);
				tFileInputDelimited_3Process(globalMap);
				tFileInputDelimited_4Process(globalMap);
				tFileInputDelimited_5Process(globalMap);
				tFileInputDelimited_6Process(globalMap);
				tFileInputDelimited_7Process(globalMap);

				row1Struct row1 = new row1Struct();
				sortieCsvStruct sortieCsv = new sortieCsvStruct();

				/**
				 * [tDBOutput_1 begin ] start
				 */

				ok_Hash.put("tDBOutput_1", false);
				start_Hash.put("tDBOutput_1", System.currentTimeMillis());

				currentComponent = "tDBOutput_1";

				if (execStat) {
					if (resourceMap.get("inIterateVComp") == null) {

						if (execStat) {
							runStat.updateStatOnConnection("sortieCsv" + iterateId, 0, 0);
						}

					}
				}

				int tos_count_tDBOutput_1 = 0;

				int nb_line_tDBOutput_1 = 0;
				int nb_line_update_tDBOutput_1 = 0;
				int nb_line_inserted_tDBOutput_1 = 0;
				int nb_line_deleted_tDBOutput_1 = 0;
				int nb_line_rejected_tDBOutput_1 = 0;

				int tmp_batchUpdateCount_tDBOutput_1 = 0;

				int deletedCount_tDBOutput_1 = 0;
				int updatedCount_tDBOutput_1 = 0;
				int insertedCount_tDBOutput_1 = 0;
				int rejectedCount_tDBOutput_1 = 0;

				boolean whetherReject_tDBOutput_1 = false;

				java.sql.Connection conn_tDBOutput_1 = null;

				// optional table
				String dbschema_tDBOutput_1 = null;
				String tableName_tDBOutput_1 = null;
				String driverClass_tDBOutput_1 = "oracle.jdbc.OracleDriver";

				java.lang.Class.forName(driverClass_tDBOutput_1);
				String url_tDBOutput_1 = null;
				url_tDBOutput_1 = "jdbc:oracle:thin:@" + "10.16.14.186" + ":" + "1521" + ":" + "cdb1";
				String dbUser_tDBOutput_1 = "llejos01";

				final String decryptedPassword_tDBOutput_1 = routines.system.PasswordEncryptUtil
						.decryptPassword("ENC:[Uaf1IAZYri5z15rEWPir4A==]");

				String dbPwd_tDBOutput_1 = decryptedPassword_tDBOutput_1;
				dbschema_tDBOutput_1 = "";

				conn_tDBOutput_1 = java.sql.DriverManager.getConnection(url_tDBOutput_1, dbUser_tDBOutput_1,
						dbPwd_tDBOutput_1);
				resourceMap.put("conn_tDBOutput_1", conn_tDBOutput_1);
				conn_tDBOutput_1.setAutoCommit(false);
				int commitEvery_tDBOutput_1 = 10000;
				int commitCounter_tDBOutput_1 = 0;
				int batchSize_tDBOutput_1 = 10000;
				int batchSizeCounter_tDBOutput_1 = 0;
				int count_tDBOutput_1 = 0;

				if (dbschema_tDBOutput_1 == null || dbschema_tDBOutput_1.trim().length() == 0) {
					tableName_tDBOutput_1 = ("Geography_Dim");
				} else {
					tableName_tDBOutput_1 = dbschema_tDBOutput_1 + "." + ("Geography_Dim");
				}
				String insert_tDBOutput_1 = "INSERT INTO " + tableName_tDBOutput_1
						+ " (Continent,Country,State,Region,Province,County,City,Street_ID,State_Code,Postal_Code,Street_Name) VALUES (?,?,?,?,?,?,?,?,?,?,?)";

				java.sql.PreparedStatement pstmt_tDBOutput_1 = conn_tDBOutput_1.prepareStatement(insert_tDBOutput_1);
				resourceMap.put("pstmt_tDBOutput_1", pstmt_tDBOutput_1);

				/**
				 * [tDBOutput_1 begin ] stop
				 */

				/**
				 * [tMap_1 begin ] start
				 */

				ok_Hash.put("tMap_1", false);
				start_Hash.put("tMap_1", System.currentTimeMillis());

				currentComponent = "tMap_1";

				if (execStat) {
					if (resourceMap.get("inIterateVComp") == null) {

						if (execStat) {
							runStat.updateStatOnConnection("row1" + iterateId, 0, 0);
						}

					}
				}

				int tos_count_tMap_1 = 0;

// ###############################
// # Lookup's keys initialization

				org.talend.designer.components.lookup.memory.AdvancedMemoryLookup<row3Struct> tHash_Lookup_row3 = (org.talend.designer.components.lookup.memory.AdvancedMemoryLookup<row3Struct>) ((org.talend.designer.components.lookup.memory.AdvancedMemoryLookup<row3Struct>) globalMap
						.get("tHash_Lookup_row3"));

				row3Struct row3HashKey = new row3Struct();
				row3Struct row3Default = new row3Struct();

				org.talend.designer.components.lookup.memory.AdvancedMemoryLookup<row2Struct> tHash_Lookup_row2 = (org.talend.designer.components.lookup.memory.AdvancedMemoryLookup<row2Struct>) ((org.talend.designer.components.lookup.memory.AdvancedMemoryLookup<row2Struct>) globalMap
						.get("tHash_Lookup_row2"));

				row2Struct row2HashKey = new row2Struct();
				row2Struct row2Default = new row2Struct();

				org.talend.designer.components.lookup.memory.AdvancedMemoryLookup<row7Struct> tHash_Lookup_row7 = (org.talend.designer.components.lookup.memory.AdvancedMemoryLookup<row7Struct>) ((org.talend.designer.components.lookup.memory.AdvancedMemoryLookup<row7Struct>) globalMap
						.get("tHash_Lookup_row7"));

				row7Struct row7HashKey = new row7Struct();
				row7Struct row7Default = new row7Struct();

				org.talend.designer.components.lookup.memory.AdvancedMemoryLookup<row4Struct> tHash_Lookup_row4 = (org.talend.designer.components.lookup.memory.AdvancedMemoryLookup<row4Struct>) ((org.talend.designer.components.lookup.memory.AdvancedMemoryLookup<row4Struct>) globalMap
						.get("tHash_Lookup_row4"));

				row4Struct row4HashKey = new row4Struct();
				row4Struct row4Default = new row4Struct();

				org.talend.designer.components.lookup.memory.AdvancedMemoryLookup<row5Struct> tHash_Lookup_row5 = (org.talend.designer.components.lookup.memory.AdvancedMemoryLookup<row5Struct>) ((org.talend.designer.components.lookup.memory.AdvancedMemoryLookup<row5Struct>) globalMap
						.get("tHash_Lookup_row5"));

				row5Struct row5HashKey = new row5Struct();
				row5Struct row5Default = new row5Struct();

				org.talend.designer.components.lookup.memory.AdvancedMemoryLookup<row8Struct> tHash_Lookup_row8 = (org.talend.designer.components.lookup.memory.AdvancedMemoryLookup<row8Struct>) ((org.talend.designer.components.lookup.memory.AdvancedMemoryLookup<row8Struct>) globalMap
						.get("tHash_Lookup_row8"));

				row8Struct row8HashKey = new row8Struct();
				row8Struct row8Default = new row8Struct();

				org.talend.designer.components.lookup.memory.AdvancedMemoryLookup<row6Struct> tHash_Lookup_row6 = (org.talend.designer.components.lookup.memory.AdvancedMemoryLookup<row6Struct>) ((org.talend.designer.components.lookup.memory.AdvancedMemoryLookup<row6Struct>) globalMap
						.get("tHash_Lookup_row6"));

				row6Struct row6HashKey = new row6Struct();
				row6Struct row6Default = new row6Struct();
// ###############################        

// ###############################
// # Vars initialization
				class Var__tMap_1__Struct {
				}
				Var__tMap_1__Struct Var__tMap_1 = new Var__tMap_1__Struct();
// ###############################

// ###############################
// # Outputs initialization
				sortieCsvStruct sortieCsv_tmp = new sortieCsvStruct();
// ###############################

				/**
				 * [tMap_1 begin ] stop
				 */

				/**
				 * [tFileInputDelimited_8 begin ] start
				 */

				ok_Hash.put("tFileInputDelimited_8", false);
				start_Hash.put("tFileInputDelimited_8", System.currentTimeMillis());

				currentComponent = "tFileInputDelimited_8";

				int tos_count_tFileInputDelimited_8 = 0;

				final routines.system.RowState rowstate_tFileInputDelimited_8 = new routines.system.RowState();

				int nb_line_tFileInputDelimited_8 = 0;
				int footer_tFileInputDelimited_8 = 0;
				int totalLinetFileInputDelimited_8 = 0;
				int limittFileInputDelimited_8 = -1;
				int lastLinetFileInputDelimited_8 = -1;

				char fieldSeparator_tFileInputDelimited_8[] = null;

				// support passing value (property: Field Separator) by 'context.fs' or
				// 'globalMap.get("fs")'.
				if (((String) ";").length() > 0) {
					fieldSeparator_tFileInputDelimited_8 = ((String) ";").toCharArray();
				} else {
					throw new IllegalArgumentException("Field Separator must be assigned a char.");
				}

				char rowSeparator_tFileInputDelimited_8[] = null;

				// support passing value (property: Row Separator) by 'context.rs' or
				// 'globalMap.get("rs")'.
				if (((String) "\n").length() > 0) {
					rowSeparator_tFileInputDelimited_8 = ((String) "\n").toCharArray();
				} else {
					throw new IllegalArgumentException("Row Separator must be assigned a char.");
				}

				Object filename_tFileInputDelimited_8 = /** Start field tFileInputDelimited_8:FILENAME */
						"C:/TEMP/TOS_DI-Win32-20190620_1446-V7.2.1/workspace/LLJ_SAE_INTEGRATIONDATAWAREHOUSE/Data/in/txt/8.txt"/**
																																 * End
																																 * field
																																 * tFileInputDelimited_8:FILENAME
																																 */
				;
				com.talend.csv.CSVReader csvReadertFileInputDelimited_8 = null;

				try {

					String[] rowtFileInputDelimited_8 = null;
					int currentLinetFileInputDelimited_8 = 0;
					int outputLinetFileInputDelimited_8 = 0;
					try {// TD110 begin
						if (filename_tFileInputDelimited_8 instanceof java.io.InputStream) {

							int footer_value_tFileInputDelimited_8 = 0;
							if (footer_value_tFileInputDelimited_8 > 0) {
								throw new java.lang.Exception(
										"When the input source is a stream,footer shouldn't be bigger than 0.");
							}

							csvReadertFileInputDelimited_8 = new com.talend.csv.CSVReader(
									(java.io.InputStream) filename_tFileInputDelimited_8,
									fieldSeparator_tFileInputDelimited_8[0], "US-ASCII");
						} else {
							csvReadertFileInputDelimited_8 = new com.talend.csv.CSVReader(
									new java.io.BufferedReader(new java.io.InputStreamReader(
											new java.io.FileInputStream(String.valueOf(filename_tFileInputDelimited_8)),
											"US-ASCII")),
									fieldSeparator_tFileInputDelimited_8[0]);
						}

						csvReadertFileInputDelimited_8.setTrimWhitespace(false);
						if ((rowSeparator_tFileInputDelimited_8[0] != '\n')
								&& (rowSeparator_tFileInputDelimited_8[0] != '\r'))
							csvReadertFileInputDelimited_8.setLineEnd("" + rowSeparator_tFileInputDelimited_8[0]);

						csvReadertFileInputDelimited_8.setQuoteChar('\"');

						// ?????doesn't work for other escapeChar
						// the default escape mode is double escape
						csvReadertFileInputDelimited_8.setEscapeChar(csvReadertFileInputDelimited_8.getQuoteChar());

						if (footer_tFileInputDelimited_8 > 0) {
							for (totalLinetFileInputDelimited_8 = 0; totalLinetFileInputDelimited_8 < 1; totalLinetFileInputDelimited_8++) {
								csvReadertFileInputDelimited_8.readNext();
							}
							csvReadertFileInputDelimited_8.setSkipEmptyRecords(true);
							while (csvReadertFileInputDelimited_8.readNext()) {

								rowtFileInputDelimited_8 = csvReadertFileInputDelimited_8.getValues();
								if (!(rowtFileInputDelimited_8.length == 1
										&& ("\015").equals(rowtFileInputDelimited_8[0]))) {// empty line when row
																							// separator is '\n'

									totalLinetFileInputDelimited_8++;

								}

							}
							int lastLineTemptFileInputDelimited_8 = totalLinetFileInputDelimited_8
									- footer_tFileInputDelimited_8 < 0 ? 0
											: totalLinetFileInputDelimited_8 - footer_tFileInputDelimited_8;
							if (lastLinetFileInputDelimited_8 > 0) {
								lastLinetFileInputDelimited_8 = lastLinetFileInputDelimited_8 < lastLineTemptFileInputDelimited_8
										? lastLinetFileInputDelimited_8
										: lastLineTemptFileInputDelimited_8;
							} else {
								lastLinetFileInputDelimited_8 = lastLineTemptFileInputDelimited_8;
							}

							csvReadertFileInputDelimited_8.close();
							if (filename_tFileInputDelimited_8 instanceof java.io.InputStream) {
								csvReadertFileInputDelimited_8 = new com.talend.csv.CSVReader(
										(java.io.InputStream) filename_tFileInputDelimited_8,
										fieldSeparator_tFileInputDelimited_8[0], "US-ASCII");
							} else {
								csvReadertFileInputDelimited_8 = new com.talend.csv.CSVReader(
										new java.io.BufferedReader(
												new java.io.InputStreamReader(
														new java.io.FileInputStream(
																String.valueOf(filename_tFileInputDelimited_8)),
														"US-ASCII")),
										fieldSeparator_tFileInputDelimited_8[0]);
							}
							csvReadertFileInputDelimited_8.setTrimWhitespace(false);
							if ((rowSeparator_tFileInputDelimited_8[0] != '\n')
									&& (rowSeparator_tFileInputDelimited_8[0] != '\r'))
								csvReadertFileInputDelimited_8.setLineEnd("" + rowSeparator_tFileInputDelimited_8[0]);

							csvReadertFileInputDelimited_8.setQuoteChar('\"');

							// ?????doesn't work for other escapeChar
							// the default escape mode is double escape
							csvReadertFileInputDelimited_8.setEscapeChar(csvReadertFileInputDelimited_8.getQuoteChar());

						}

						if (limittFileInputDelimited_8 != 0) {
							for (currentLinetFileInputDelimited_8 = 0; currentLinetFileInputDelimited_8 < 1; currentLinetFileInputDelimited_8++) {
								csvReadertFileInputDelimited_8.readNext();
							}
						}
						csvReadertFileInputDelimited_8.setSkipEmptyRecords(true);

					} catch (java.lang.Exception e) {

						System.err.println(e.getMessage());

					} // TD110 end

					while (limittFileInputDelimited_8 != 0 && csvReadertFileInputDelimited_8 != null
							&& csvReadertFileInputDelimited_8.readNext()) {
						rowstate_tFileInputDelimited_8.reset();

						rowtFileInputDelimited_8 = csvReadertFileInputDelimited_8.getValues();

						if (rowtFileInputDelimited_8.length == 1 && ("\015").equals(rowtFileInputDelimited_8[0])) {// empty
																													// line
																													// when
																													// row
																													// separator
																													// is
																													// '\n'
							continue;
						}

						currentLinetFileInputDelimited_8++;

						if (lastLinetFileInputDelimited_8 > -1
								&& currentLinetFileInputDelimited_8 > lastLinetFileInputDelimited_8) {
							break;
						}
						outputLinetFileInputDelimited_8++;
						if (limittFileInputDelimited_8 > 0
								&& outputLinetFileInputDelimited_8 > limittFileInputDelimited_8) {
							break;
						}

						row1 = null;

						boolean whetherReject_tFileInputDelimited_8 = false;
						row1 = new row1Struct();
						try {

							char fieldSeparator_tFileInputDelimited_8_ListType[] = null;
							// support passing value (property: Field Separator) by 'context.fs' or
							// 'globalMap.get("fs")'.
							if (((String) ";").length() > 0) {
								fieldSeparator_tFileInputDelimited_8_ListType = ((String) ";").toCharArray();
							} else {
								throw new IllegalArgumentException("Field Separator must be assigned a char.");
							}
							if (rowtFileInputDelimited_8.length == 1 && ("\015").equals(rowtFileInputDelimited_8[0])) {// empty
																														// line
																														// when
																														// row
																														// separator
																														// is
																														// '\n'

								row1.Street_ID = null;

								row1.Country = null;

								row1.Street_Name = null;

								row1.City_ID = null;

								row1.Postal_Code = null;

								row1.From_Street_Num = null;

								row1.To_Street_Num = null;

								row1.City_Name = null;

								row1.Count = null;

								row1.County_ID = null;

								row1.Postal_Code_ID = null;

							} else {

								int columnIndexWithD_tFileInputDelimited_8 = 0; // Column Index

								columnIndexWithD_tFileInputDelimited_8 = 0;

								if (columnIndexWithD_tFileInputDelimited_8 < rowtFileInputDelimited_8.length) {

									row1.Street_ID = rowtFileInputDelimited_8[columnIndexWithD_tFileInputDelimited_8];

								} else {

									row1.Street_ID = null;

								}

								columnIndexWithD_tFileInputDelimited_8 = 1;

								if (columnIndexWithD_tFileInputDelimited_8 < rowtFileInputDelimited_8.length) {

									row1.Country = rowtFileInputDelimited_8[columnIndexWithD_tFileInputDelimited_8];

								} else {

									row1.Country = null;

								}

								columnIndexWithD_tFileInputDelimited_8 = 2;

								if (columnIndexWithD_tFileInputDelimited_8 < rowtFileInputDelimited_8.length) {

									row1.Street_Name = rowtFileInputDelimited_8[columnIndexWithD_tFileInputDelimited_8];

								} else {

									row1.Street_Name = null;

								}

								columnIndexWithD_tFileInputDelimited_8 = 3;

								if (columnIndexWithD_tFileInputDelimited_8 < rowtFileInputDelimited_8.length) {

									row1.City_ID = rowtFileInputDelimited_8[columnIndexWithD_tFileInputDelimited_8];

								} else {

									row1.City_ID = null;

								}

								columnIndexWithD_tFileInputDelimited_8 = 4;

								if (columnIndexWithD_tFileInputDelimited_8 < rowtFileInputDelimited_8.length) {

									row1.Postal_Code = rowtFileInputDelimited_8[columnIndexWithD_tFileInputDelimited_8];

								} else {

									row1.Postal_Code = null;

								}

								columnIndexWithD_tFileInputDelimited_8 = 5;

								if (columnIndexWithD_tFileInputDelimited_8 < rowtFileInputDelimited_8.length) {

									row1.From_Street_Num = rowtFileInputDelimited_8[columnIndexWithD_tFileInputDelimited_8];

								} else {

									row1.From_Street_Num = null;

								}

								columnIndexWithD_tFileInputDelimited_8 = 6;

								if (columnIndexWithD_tFileInputDelimited_8 < rowtFileInputDelimited_8.length) {

									row1.To_Street_Num = rowtFileInputDelimited_8[columnIndexWithD_tFileInputDelimited_8];

								} else {

									row1.To_Street_Num = null;

								}

								columnIndexWithD_tFileInputDelimited_8 = 7;

								if (columnIndexWithD_tFileInputDelimited_8 < rowtFileInputDelimited_8.length) {

									row1.City_Name = rowtFileInputDelimited_8[columnIndexWithD_tFileInputDelimited_8];

								} else {

									row1.City_Name = null;

								}

								columnIndexWithD_tFileInputDelimited_8 = 8;

								if (columnIndexWithD_tFileInputDelimited_8 < rowtFileInputDelimited_8.length) {

									row1.Count = rowtFileInputDelimited_8[columnIndexWithD_tFileInputDelimited_8];

								} else {

									row1.Count = null;

								}

								columnIndexWithD_tFileInputDelimited_8 = 9;

								if (columnIndexWithD_tFileInputDelimited_8 < rowtFileInputDelimited_8.length) {

									row1.County_ID = rowtFileInputDelimited_8[columnIndexWithD_tFileInputDelimited_8];

								} else {

									row1.County_ID = null;

								}

								columnIndexWithD_tFileInputDelimited_8 = 10;

								if (columnIndexWithD_tFileInputDelimited_8 < rowtFileInputDelimited_8.length) {

									row1.Postal_Code_ID = rowtFileInputDelimited_8[columnIndexWithD_tFileInputDelimited_8];

								} else {

									row1.Postal_Code_ID = null;

								}

							}

							if (rowstate_tFileInputDelimited_8.getException() != null) {
								throw rowstate_tFileInputDelimited_8.getException();
							}

						} catch (java.lang.Exception e) {
							whetherReject_tFileInputDelimited_8 = true;

							System.err.println(e.getMessage());
							row1 = null;

						}

						/**
						 * [tFileInputDelimited_8 begin ] stop
						 */

						/**
						 * [tFileInputDelimited_8 main ] start
						 */

						currentComponent = "tFileInputDelimited_8";

						tos_count_tFileInputDelimited_8++;

						/**
						 * [tFileInputDelimited_8 main ] stop
						 */

						/**
						 * [tFileInputDelimited_8 process_data_begin ] start
						 */

						currentComponent = "tFileInputDelimited_8";

						/**
						 * [tFileInputDelimited_8 process_data_begin ] stop
						 */
// Start of branch "row1"
						if (row1 != null) {

							/**
							 * [tMap_1 main ] start
							 */

							currentComponent = "tMap_1";

							// row1
							// row1

							if (execStat) {
								runStat.updateStatOnConnection("row1" + iterateId, 1, 1);
							}

							boolean hasCasePrimitiveKeyWithNull_tMap_1 = false;

							// ###############################
							// # Input tables (lookups)
							boolean rejectedInnerJoin_tMap_1 = false;
							boolean mainRowRejected_tMap_1 = false;

							///////////////////////////////////////////////
							// Starting Lookup Table "row3"
							///////////////////////////////////////////////

							boolean forceLooprow3 = false;

							row3Struct row3ObjectFromLookup = null;

							if (!rejectedInnerJoin_tMap_1) { // G_TM_M_020

								hasCasePrimitiveKeyWithNull_tMap_1 = false;

								row3HashKey.Country = row1.Country;

								row3HashKey.hashCodeDirty = true;

								tHash_Lookup_row3.lookup(row3HashKey);

							} // G_TM_M_020

							if (tHash_Lookup_row3 != null && tHash_Lookup_row3.getCount(row3HashKey) > 1) { // G 071

								// System.out.println("WARNING: UNIQUE MATCH is configured for the lookup 'row3'
								// and it contains more one result from keys : row3.Country = '" +
								// row3HashKey.Country + "'");
							} // G 071

							row3Struct row3 = null;

							row3Struct fromLookup_row3 = null;
							row3 = row3Default;

							if (tHash_Lookup_row3 != null && tHash_Lookup_row3.hasNext()) { // G 099

								fromLookup_row3 = tHash_Lookup_row3.next();

							} // G 099

							if (fromLookup_row3 != null) {
								row3 = fromLookup_row3;
							}

							///////////////////////////////////////////////
							// Starting Lookup Table "row2"
							///////////////////////////////////////////////

							boolean forceLooprow2 = false;

							row2Struct row2ObjectFromLookup = null;

							if (!rejectedInnerJoin_tMap_1) { // G_TM_M_020

								hasCasePrimitiveKeyWithNull_tMap_1 = false;

								row2HashKey.Continent_ID = row3.Continent_ID;

								row2HashKey.hashCodeDirty = true;

								tHash_Lookup_row2.lookup(row2HashKey);

							} // G_TM_M_020

							if (tHash_Lookup_row2 != null && tHash_Lookup_row2.getCount(row2HashKey) > 1) { // G 071

								// System.out.println("WARNING: UNIQUE MATCH is configured for the lookup 'row2'
								// and it contains more one result from keys : row2.Continent_ID = '" +
								// row2HashKey.Continent_ID + "'");
							} // G 071

							row2Struct row2 = null;

							row2Struct fromLookup_row2 = null;
							row2 = row2Default;

							if (tHash_Lookup_row2 != null && tHash_Lookup_row2.hasNext()) { // G 099

								fromLookup_row2 = tHash_Lookup_row2.next();

							} // G 099

							if (fromLookup_row2 != null) {
								row2 = fromLookup_row2;
							}

							///////////////////////////////////////////////
							// Starting Lookup Table "row7"
							///////////////////////////////////////////////

							boolean forceLooprow7 = false;

							row7Struct row7ObjectFromLookup = null;

							if (!rejectedInnerJoin_tMap_1) { // G_TM_M_020

								hasCasePrimitiveKeyWithNull_tMap_1 = false;

								row7HashKey.Country = row1.Country;

								row7HashKey.hashCodeDirty = true;

								tHash_Lookup_row7.lookup(row7HashKey);

							} // G_TM_M_020

							if (tHash_Lookup_row7 != null && tHash_Lookup_row7.getCount(row7HashKey) > 1) { // G 071

								// System.out.println("WARNING: UNIQUE MATCH is configured for the lookup 'row7'
								// and it contains more one result from keys : row7.Country = '" +
								// row7HashKey.Country + "'");
							} // G 071

							row7Struct row7 = null;

							row7Struct fromLookup_row7 = null;
							row7 = row7Default;

							if (tHash_Lookup_row7 != null && tHash_Lookup_row7.hasNext()) { // G 099

								fromLookup_row7 = tHash_Lookup_row7.next();

							} // G 099

							if (fromLookup_row7 != null) {
								row7 = fromLookup_row7;
							}

							///////////////////////////////////////////////
							// Starting Lookup Table "row4"
							///////////////////////////////////////////////

							boolean forceLooprow4 = false;

							row4Struct row4ObjectFromLookup = null;

							if (!rejectedInnerJoin_tMap_1) { // G_TM_M_020

								hasCasePrimitiveKeyWithNull_tMap_1 = false;

								row4HashKey.Country = row1.Country;

								row4HashKey.hashCodeDirty = true;

								tHash_Lookup_row4.lookup(row4HashKey);

							} // G_TM_M_020

							if (tHash_Lookup_row4 != null && tHash_Lookup_row4.getCount(row4HashKey) > 1) { // G 071

								// System.out.println("WARNING: UNIQUE MATCH is configured for the lookup 'row4'
								// and it contains more one result from keys : row4.Country = '" +
								// row4HashKey.Country + "'");
							} // G 071

							row4Struct row4 = null;

							row4Struct fromLookup_row4 = null;
							row4 = row4Default;

							if (tHash_Lookup_row4 != null && tHash_Lookup_row4.hasNext()) { // G 099

								fromLookup_row4 = tHash_Lookup_row4.next();

							} // G 099

							if (fromLookup_row4 != null) {
								row4 = fromLookup_row4;
							}

							///////////////////////////////////////////////
							// Starting Lookup Table "row5"
							///////////////////////////////////////////////

							boolean forceLooprow5 = false;

							row5Struct row5ObjectFromLookup = null;

							if (!rejectedInnerJoin_tMap_1) { // G_TM_M_020

								hasCasePrimitiveKeyWithNull_tMap_1 = false;

								row5HashKey.Country = row1.Country;

								row5HashKey.hashCodeDirty = true;

								tHash_Lookup_row5.lookup(row5HashKey);

							} // G_TM_M_020

							if (tHash_Lookup_row5 != null && tHash_Lookup_row5.getCount(row5HashKey) > 1) { // G 071

								// System.out.println("WARNING: UNIQUE MATCH is configured for the lookup 'row5'
								// and it contains more one result from keys : row5.Country = '" +
								// row5HashKey.Country + "'");
							} // G 071

							row5Struct row5 = null;

							row5Struct fromLookup_row5 = null;
							row5 = row5Default;

							if (tHash_Lookup_row5 != null && tHash_Lookup_row5.hasNext()) { // G 099

								fromLookup_row5 = tHash_Lookup_row5.next();

							} // G 099

							if (fromLookup_row5 != null) {
								row5 = fromLookup_row5;
							}

							///////////////////////////////////////////////
							// Starting Lookup Table "row8"
							///////////////////////////////////////////////

							boolean forceLooprow8 = false;

							row8Struct row8ObjectFromLookup = null;

							if (!rejectedInnerJoin_tMap_1) { // G_TM_M_020

								hasCasePrimitiveKeyWithNull_tMap_1 = false;

								row8HashKey.Country = row1.Country;

								row8HashKey.hashCodeDirty = true;

								tHash_Lookup_row8.lookup(row8HashKey);

							} // G_TM_M_020

							if (tHash_Lookup_row8 != null && tHash_Lookup_row8.getCount(row8HashKey) > 1) { // G 071

								// System.out.println("WARNING: UNIQUE MATCH is configured for the lookup 'row8'
								// and it contains more one result from keys : row8.Country = '" +
								// row8HashKey.Country + "'");
							} // G 071

							row8Struct row8 = null;

							row8Struct fromLookup_row8 = null;
							row8 = row8Default;

							if (tHash_Lookup_row8 != null && tHash_Lookup_row8.hasNext()) { // G 099

								fromLookup_row8 = tHash_Lookup_row8.next();

							} // G 099

							if (fromLookup_row8 != null) {
								row8 = fromLookup_row8;
							}

							///////////////////////////////////////////////
							// Starting Lookup Table "row6"
							///////////////////////////////////////////////

							boolean forceLooprow6 = false;

							row6Struct row6ObjectFromLookup = null;

							if (!rejectedInnerJoin_tMap_1) { // G_TM_M_020

								hasCasePrimitiveKeyWithNull_tMap_1 = false;

								row6HashKey.Postal_Code = row1.Postal_Code;

								row6HashKey.hashCodeDirty = true;

								tHash_Lookup_row6.lookup(row6HashKey);

							} // G_TM_M_020

							if (tHash_Lookup_row6 != null && tHash_Lookup_row6.getCount(row6HashKey) > 1) { // G 071

								// System.out.println("WARNING: UNIQUE MATCH is configured for the lookup 'row6'
								// and it contains more one result from keys : row6.Postal_Code = '" +
								// row6HashKey.Postal_Code + "'");
							} // G 071

							row6Struct row6 = null;

							row6Struct fromLookup_row6 = null;
							row6 = row6Default;

							if (tHash_Lookup_row6 != null && tHash_Lookup_row6.hasNext()) { // G 099

								fromLookup_row6 = tHash_Lookup_row6.next();

							} // G 099

							if (fromLookup_row6 != null) {
								row6 = fromLookup_row6;
							}

							// ###############################
							{ // start of Var scope

								// ###############################
								// # Vars tables

								Var__tMap_1__Struct Var = Var__tMap_1;// ###############################
								// ###############################
								// # Output tables

								sortieCsv = null;

// # Output table : 'sortieCsv'
								sortieCsv_tmp.Street_ID = row1.Street_ID;
								sortieCsv_tmp.Continent = row2.Continent_Name;
								sortieCsv_tmp.Country = row3.Country;
								sortieCsv_tmp.State = row7.State_Name;
								sortieCsv_tmp.Region = row4.Region_Name;
								sortieCsv_tmp.Province = row4.Province_Name;
								sortieCsv_tmp.County = row4.County_Name;
								sortieCsv_tmp.City = row8.City_Name;
								sortieCsv_tmp.State_Code = row7.State_Code;
								sortieCsv_tmp.Postal_Code = row6.Postal_Code;
								sortieCsv_tmp.Street_Name = row1.Street_Name;
								sortieCsv = sortieCsv_tmp;
// ###############################

							} // end of Var scope

							rejectedInnerJoin_tMap_1 = false;

							tos_count_tMap_1++;

							/**
							 * [tMap_1 main ] stop
							 */

							/**
							 * [tMap_1 process_data_begin ] start
							 */

							currentComponent = "tMap_1";

							/**
							 * [tMap_1 process_data_begin ] stop
							 */
// Start of branch "sortieCsv"
							if (sortieCsv != null) {

								/**
								 * [tDBOutput_1 main ] start
								 */

								currentComponent = "tDBOutput_1";

								// sortieCsv
								// sortieCsv

								if (execStat) {
									runStat.updateStatOnConnection("sortieCsv" + iterateId, 1, 1);
								}

								whetherReject_tDBOutput_1 = false;
								if (sortieCsv.Continent == null) {
									pstmt_tDBOutput_1.setNull(1, java.sql.Types.VARCHAR);
								} else {
									pstmt_tDBOutput_1.setString(1, sortieCsv.Continent);
								}

								if (sortieCsv.Country == null) {
									pstmt_tDBOutput_1.setNull(2, java.sql.Types.VARCHAR);
								} else {
									pstmt_tDBOutput_1.setString(2, sortieCsv.Country);
								}

								if (sortieCsv.State == null) {
									pstmt_tDBOutput_1.setNull(3, java.sql.Types.VARCHAR);
								} else {
									pstmt_tDBOutput_1.setString(3, sortieCsv.State);
								}

								if (sortieCsv.Region == null) {
									pstmt_tDBOutput_1.setNull(4, java.sql.Types.VARCHAR);
								} else {
									pstmt_tDBOutput_1.setString(4, sortieCsv.Region);
								}

								if (sortieCsv.Province == null) {
									pstmt_tDBOutput_1.setNull(5, java.sql.Types.VARCHAR);
								} else {
									pstmt_tDBOutput_1.setString(5, sortieCsv.Province);
								}

								if (sortieCsv.County == null) {
									pstmt_tDBOutput_1.setNull(6, java.sql.Types.VARCHAR);
								} else {
									pstmt_tDBOutput_1.setString(6, sortieCsv.County);
								}

								if (sortieCsv.City == null) {
									pstmt_tDBOutput_1.setNull(7, java.sql.Types.VARCHAR);
								} else {
									pstmt_tDBOutput_1.setString(7, sortieCsv.City);
								}

								if (sortieCsv.Street_ID == null) {
									pstmt_tDBOutput_1.setNull(8, java.sql.Types.VARCHAR);
								} else {
									pstmt_tDBOutput_1.setString(8, sortieCsv.Street_ID);
								}

								if (sortieCsv.State_Code == null) {
									pstmt_tDBOutput_1.setNull(9, java.sql.Types.VARCHAR);
								} else {
									pstmt_tDBOutput_1.setString(9, sortieCsv.State_Code);
								}

								if (sortieCsv.Postal_Code == null) {
									pstmt_tDBOutput_1.setNull(10, java.sql.Types.VARCHAR);
								} else {
									pstmt_tDBOutput_1.setString(10, sortieCsv.Postal_Code);
								}

								if (sortieCsv.Street_Name == null) {
									pstmt_tDBOutput_1.setNull(11, java.sql.Types.VARCHAR);
								} else {
									pstmt_tDBOutput_1.setString(11, sortieCsv.Street_Name);
								}

								pstmt_tDBOutput_1.addBatch();
								nb_line_tDBOutput_1++;
								batchSizeCounter_tDBOutput_1++;
								if (batchSize_tDBOutput_1 > 0
										&& batchSize_tDBOutput_1 <= batchSizeCounter_tDBOutput_1) {
									try {
										pstmt_tDBOutput_1.executeBatch();
									} catch (java.sql.BatchUpdateException e_tDBOutput_1) {
										java.sql.SQLException ne_tDBOutput_1 = e_tDBOutput_1.getNextException(),
												sqle_tDBOutput_1 = null;
										String errormessage_tDBOutput_1;
										if (ne_tDBOutput_1 != null) {
											// build new exception to provide the original cause
											sqle_tDBOutput_1 = new java.sql.SQLException(
													e_tDBOutput_1.getMessage() + "\ncaused by: "
															+ ne_tDBOutput_1.getMessage(),
													ne_tDBOutput_1.getSQLState(), ne_tDBOutput_1.getErrorCode(),
													ne_tDBOutput_1);
											errormessage_tDBOutput_1 = sqle_tDBOutput_1.getMessage();
										} else {
											errormessage_tDBOutput_1 = e_tDBOutput_1.getMessage();
										}

										System.err.println(errormessage_tDBOutput_1);

									}
									tmp_batchUpdateCount_tDBOutput_1 = pstmt_tDBOutput_1.getUpdateCount();
									insertedCount_tDBOutput_1 += (tmp_batchUpdateCount_tDBOutput_1 != -1
											? tmp_batchUpdateCount_tDBOutput_1
											: 0);
									batchSizeCounter_tDBOutput_1 = 0;
								}
								commitCounter_tDBOutput_1++;
								if (commitEvery_tDBOutput_1 <= commitCounter_tDBOutput_1) {

									try {
										pstmt_tDBOutput_1.executeBatch();
									} catch (java.sql.BatchUpdateException e_tDBOutput_1) {
										java.sql.SQLException ne_tDBOutput_1 = e_tDBOutput_1.getNextException(),
												sqle_tDBOutput_1 = null;
										String errormessage_tDBOutput_1;
										if (ne_tDBOutput_1 != null) {
											// build new exception to provide the original cause
											sqle_tDBOutput_1 = new java.sql.SQLException(
													e_tDBOutput_1.getMessage() + "\ncaused by: "
															+ ne_tDBOutput_1.getMessage(),
													ne_tDBOutput_1.getSQLState(), ne_tDBOutput_1.getErrorCode(),
													ne_tDBOutput_1);
											errormessage_tDBOutput_1 = sqle_tDBOutput_1.getMessage();
										} else {
											errormessage_tDBOutput_1 = e_tDBOutput_1.getMessage();
										}

										System.err.println(errormessage_tDBOutput_1);

									}
									tmp_batchUpdateCount_tDBOutput_1 = pstmt_tDBOutput_1.getUpdateCount();
									insertedCount_tDBOutput_1 += (tmp_batchUpdateCount_tDBOutput_1 != -1
											? tmp_batchUpdateCount_tDBOutput_1
											: 0);
									conn_tDBOutput_1.commit();
									commitCounter_tDBOutput_1 = 0;
								}

								tos_count_tDBOutput_1++;

								/**
								 * [tDBOutput_1 main ] stop
								 */

								/**
								 * [tDBOutput_1 process_data_begin ] start
								 */

								currentComponent = "tDBOutput_1";

								/**
								 * [tDBOutput_1 process_data_begin ] stop
								 */

								/**
								 * [tDBOutput_1 process_data_end ] start
								 */

								currentComponent = "tDBOutput_1";

								/**
								 * [tDBOutput_1 process_data_end ] stop
								 */

							} // End of branch "sortieCsv"

							/**
							 * [tMap_1 process_data_end ] start
							 */

							currentComponent = "tMap_1";

							/**
							 * [tMap_1 process_data_end ] stop
							 */

						} // End of branch "row1"

						/**
						 * [tFileInputDelimited_8 process_data_end ] start
						 */

						currentComponent = "tFileInputDelimited_8";

						/**
						 * [tFileInputDelimited_8 process_data_end ] stop
						 */

						/**
						 * [tFileInputDelimited_8 end ] start
						 */

						currentComponent = "tFileInputDelimited_8";

						nb_line_tFileInputDelimited_8++;
					}

				} finally {
					if (!(filename_tFileInputDelimited_8 instanceof java.io.InputStream)) {
						if (csvReadertFileInputDelimited_8 != null) {
							csvReadertFileInputDelimited_8.close();
						}
					}
					if (csvReadertFileInputDelimited_8 != null) {
						globalMap.put("tFileInputDelimited_8_NB_LINE", nb_line_tFileInputDelimited_8);
					}

				}

				ok_Hash.put("tFileInputDelimited_8", true);
				end_Hash.put("tFileInputDelimited_8", System.currentTimeMillis());

				/**
				 * [tFileInputDelimited_8 end ] stop
				 */

				/**
				 * [tMap_1 end ] start
				 */

				currentComponent = "tMap_1";

// ###############################
// # Lookup hashes releasing
				if (tHash_Lookup_row3 != null) {
					tHash_Lookup_row3.endGet();
				}
				globalMap.remove("tHash_Lookup_row3");

				if (tHash_Lookup_row2 != null) {
					tHash_Lookup_row2.endGet();
				}
				globalMap.remove("tHash_Lookup_row2");

				if (tHash_Lookup_row7 != null) {
					tHash_Lookup_row7.endGet();
				}
				globalMap.remove("tHash_Lookup_row7");

				if (tHash_Lookup_row4 != null) {
					tHash_Lookup_row4.endGet();
				}
				globalMap.remove("tHash_Lookup_row4");

				if (tHash_Lookup_row5 != null) {
					tHash_Lookup_row5.endGet();
				}
				globalMap.remove("tHash_Lookup_row5");

				if (tHash_Lookup_row8 != null) {
					tHash_Lookup_row8.endGet();
				}
				globalMap.remove("tHash_Lookup_row8");

				if (tHash_Lookup_row6 != null) {
					tHash_Lookup_row6.endGet();
				}
				globalMap.remove("tHash_Lookup_row6");

// ###############################      

				if (execStat) {
					if (resourceMap.get("inIterateVComp") == null || !((Boolean) resourceMap.get("inIterateVComp"))) {
						runStat.updateStatOnConnection("row1" + iterateId, 2, 0);
					}
				}

				ok_Hash.put("tMap_1", true);
				end_Hash.put("tMap_1", System.currentTimeMillis());

				/**
				 * [tMap_1 end ] stop
				 */

				/**
				 * [tDBOutput_1 end ] start
				 */

				currentComponent = "tDBOutput_1";

				try {
					if (pstmt_tDBOutput_1 != null) {

						pstmt_tDBOutput_1.executeBatch();

					}
				} catch (java.sql.BatchUpdateException e_tDBOutput_1) {
					java.sql.SQLException ne_tDBOutput_1 = e_tDBOutput_1.getNextException(), sqle_tDBOutput_1 = null;
					String errormessage_tDBOutput_1;
					if (ne_tDBOutput_1 != null) {
						// build new exception to provide the original cause
						sqle_tDBOutput_1 = new java.sql.SQLException(
								e_tDBOutput_1.getMessage() + "\ncaused by: " + ne_tDBOutput_1.getMessage(),
								ne_tDBOutput_1.getSQLState(), ne_tDBOutput_1.getErrorCode(), ne_tDBOutput_1);
						errormessage_tDBOutput_1 = sqle_tDBOutput_1.getMessage();
					} else {
						errormessage_tDBOutput_1 = e_tDBOutput_1.getMessage();
					}

					System.err.println(errormessage_tDBOutput_1);

				}
				if (pstmt_tDBOutput_1 != null) {
					tmp_batchUpdateCount_tDBOutput_1 = pstmt_tDBOutput_1.getUpdateCount();

					insertedCount_tDBOutput_1

							+= (tmp_batchUpdateCount_tDBOutput_1 != -1 ? tmp_batchUpdateCount_tDBOutput_1 : 0);
				}
				if (pstmt_tDBOutput_1 != null) {

					pstmt_tDBOutput_1.close();
					resourceMap.remove("pstmt_tDBOutput_1");

				}
				resourceMap.put("statementClosed_tDBOutput_1", true);
				if (commitCounter_tDBOutput_1 > 0) {

					conn_tDBOutput_1.commit();

				}

				conn_tDBOutput_1.close();

				resourceMap.put("finish_tDBOutput_1", true);

				nb_line_deleted_tDBOutput_1 = nb_line_deleted_tDBOutput_1 + deletedCount_tDBOutput_1;
				nb_line_update_tDBOutput_1 = nb_line_update_tDBOutput_1 + updatedCount_tDBOutput_1;
				nb_line_inserted_tDBOutput_1 = nb_line_inserted_tDBOutput_1 + insertedCount_tDBOutput_1;
				nb_line_rejected_tDBOutput_1 = nb_line_rejected_tDBOutput_1 + rejectedCount_tDBOutput_1;

				globalMap.put("tDBOutput_1_NB_LINE", nb_line_tDBOutput_1);
				globalMap.put("tDBOutput_1_NB_LINE_UPDATED", nb_line_update_tDBOutput_1);
				globalMap.put("tDBOutput_1_NB_LINE_INSERTED", nb_line_inserted_tDBOutput_1);
				globalMap.put("tDBOutput_1_NB_LINE_DELETED", nb_line_deleted_tDBOutput_1);
				globalMap.put("tDBOutput_1_NB_LINE_REJECTED", nb_line_rejected_tDBOutput_1);

				if (execStat) {
					if (resourceMap.get("inIterateVComp") == null || !((Boolean) resourceMap.get("inIterateVComp"))) {
						runStat.updateStatOnConnection("sortieCsv" + iterateId, 2, 0);
					}
				}

				ok_Hash.put("tDBOutput_1", true);
				end_Hash.put("tDBOutput_1", System.currentTimeMillis());

				/**
				 * [tDBOutput_1 end ] stop
				 */

			} // end the resume

		} catch (java.lang.Exception e) {

			TalendException te = new TalendException(e, currentComponent, globalMap);

			throw te;
		} catch (java.lang.Error error) {

			runStat.stopThreadStat();

			throw error;
		} finally {

			// free memory for "tMap_1"
			globalMap.remove("tHash_Lookup_row8");

			// free memory for "tMap_1"
			globalMap.remove("tHash_Lookup_row2");

			// free memory for "tMap_1"
			globalMap.remove("tHash_Lookup_row3");

			// free memory for "tMap_1"
			globalMap.remove("tHash_Lookup_row4");

			// free memory for "tMap_1"
			globalMap.remove("tHash_Lookup_row5");

			// free memory for "tMap_1"
			globalMap.remove("tHash_Lookup_row6");

			// free memory for "tMap_1"
			globalMap.remove("tHash_Lookup_row7");

			try {

				/**
				 * [tFileInputDelimited_8 finally ] start
				 */

				currentComponent = "tFileInputDelimited_8";

				/**
				 * [tFileInputDelimited_8 finally ] stop
				 */

				/**
				 * [tMap_1 finally ] start
				 */

				currentComponent = "tMap_1";

				/**
				 * [tMap_1 finally ] stop
				 */

				/**
				 * [tDBOutput_1 finally ] start
				 */

				currentComponent = "tDBOutput_1";

				try {
					if (resourceMap.get("statementClosed_tDBOutput_1") == null) {
						java.sql.PreparedStatement pstmtToClose_tDBOutput_1 = null;
						if ((pstmtToClose_tDBOutput_1 = (java.sql.PreparedStatement) resourceMap
								.remove("pstmt_tDBOutput_1")) != null) {
							pstmtToClose_tDBOutput_1.close();
						}
					}
				} finally {
					if (resourceMap.get("finish_tDBOutput_1") == null) {
						java.sql.Connection ctn_tDBOutput_1 = null;
						if ((ctn_tDBOutput_1 = (java.sql.Connection) resourceMap.get("conn_tDBOutput_1")) != null) {
							try {
								ctn_tDBOutput_1.close();
							} catch (java.sql.SQLException sqlEx_tDBOutput_1) {
								String errorMessage_tDBOutput_1 = "failed to close the connection in tDBOutput_1 :"
										+ sqlEx_tDBOutput_1.getMessage();
								System.err.println(errorMessage_tDBOutput_1);
							}
						}
					}
				}

				/**
				 * [tDBOutput_1 finally ] stop
				 */

			} catch (java.lang.Exception e) {
				// ignore
			} catch (java.lang.Error error) {
				// ignore
			}
			resourceMap = null;
		}

		globalMap.put("tFileInputDelimited_8_SUBPROCESS_STATE", 1);
	}

	public void tFileOutputDelimited_1Process(final java.util.Map<String, Object> globalMap) throws TalendException {
		globalMap.put("tFileOutputDelimited_1_SUBPROCESS_STATE", 0);

		final boolean execStat = this.execStat;

		String iterateId = "";

		String currentComponent = "";
		java.util.Map<String, Object> resourceMap = new java.util.HashMap<String, Object>();

		try {
			// TDI-39566 avoid throwing an useless Exception
			boolean resumeIt = true;
			if (globalResumeTicket == false && resumeEntryMethodName != null) {
				String currentMethodName = new java.lang.Exception().getStackTrace()[0].getMethodName();
				resumeIt = resumeEntryMethodName.equals(currentMethodName);
			}
			if (resumeIt || globalResumeTicket) { // start the resume
				globalResumeTicket = true;

				/**
				 * [tFileOutputDelimited_1 begin ] start
				 */

				ok_Hash.put("tFileOutputDelimited_1", false);
				start_Hash.put("tFileOutputDelimited_1", System.currentTimeMillis());

				currentComponent = "tFileOutputDelimited_1";

				int tos_count_tFileOutputDelimited_1 = 0;

				String fileName_tFileOutputDelimited_1 = "";
				fileName_tFileOutputDelimited_1 = (new java.io.File(
						"C:/TEMP/TOS_DI-Win32-20190620_1446-V7.2.1/workspace/LLJ_SAE_INTEGRATIONDATAWAREHOUSE/Data/out/dimensionGeography.csv"))
								.getAbsolutePath().replace("\\", "/");
				String fullName_tFileOutputDelimited_1 = null;
				String extension_tFileOutputDelimited_1 = null;
				String directory_tFileOutputDelimited_1 = null;
				if ((fileName_tFileOutputDelimited_1.indexOf("/") != -1)) {
					if (fileName_tFileOutputDelimited_1.lastIndexOf(".") < fileName_tFileOutputDelimited_1
							.lastIndexOf("/")) {
						fullName_tFileOutputDelimited_1 = fileName_tFileOutputDelimited_1;
						extension_tFileOutputDelimited_1 = "";
					} else {
						fullName_tFileOutputDelimited_1 = fileName_tFileOutputDelimited_1.substring(0,
								fileName_tFileOutputDelimited_1.lastIndexOf("."));
						extension_tFileOutputDelimited_1 = fileName_tFileOutputDelimited_1
								.substring(fileName_tFileOutputDelimited_1.lastIndexOf("."));
					}
					directory_tFileOutputDelimited_1 = fileName_tFileOutputDelimited_1.substring(0,
							fileName_tFileOutputDelimited_1.lastIndexOf("/"));
				} else {
					if (fileName_tFileOutputDelimited_1.lastIndexOf(".") != -1) {
						fullName_tFileOutputDelimited_1 = fileName_tFileOutputDelimited_1.substring(0,
								fileName_tFileOutputDelimited_1.lastIndexOf("."));
						extension_tFileOutputDelimited_1 = fileName_tFileOutputDelimited_1
								.substring(fileName_tFileOutputDelimited_1.lastIndexOf("."));
					} else {
						fullName_tFileOutputDelimited_1 = fileName_tFileOutputDelimited_1;
						extension_tFileOutputDelimited_1 = "";
					}
					directory_tFileOutputDelimited_1 = "";
				}
				boolean isFileGenerated_tFileOutputDelimited_1 = true;
				java.io.File filetFileOutputDelimited_1 = new java.io.File(fileName_tFileOutputDelimited_1);
				globalMap.put("tFileOutputDelimited_1_FILE_NAME", fileName_tFileOutputDelimited_1);
				int nb_line_tFileOutputDelimited_1 = 0;
				int splitedFileNo_tFileOutputDelimited_1 = 0;
				int currentRow_tFileOutputDelimited_1 = 0;

				final String OUT_DELIM_tFileOutputDelimited_1 = /** Start field tFileOutputDelimited_1:FIELDSEPARATOR */
						";"/** End field tFileOutputDelimited_1:FIELDSEPARATOR */
				;

				final String OUT_DELIM_ROWSEP_tFileOutputDelimited_1 = /**
																		 * Start field
																		 * tFileOutputDelimited_1:ROWSEPARATOR
																		 */
						"\n"/** End field tFileOutputDelimited_1:ROWSEPARATOR */
				;

				// create directory only if not exists
				if (directory_tFileOutputDelimited_1 != null && directory_tFileOutputDelimited_1.trim().length() != 0) {
					java.io.File dir_tFileOutputDelimited_1 = new java.io.File(directory_tFileOutputDelimited_1);
					if (!dir_tFileOutputDelimited_1.exists()) {
						dir_tFileOutputDelimited_1.mkdirs();
					}
				}

				// routines.system.Row
				java.io.Writer outtFileOutputDelimited_1 = null;

				java.io.File fileToDelete_tFileOutputDelimited_1 = new java.io.File(fileName_tFileOutputDelimited_1);
				if (fileToDelete_tFileOutputDelimited_1.exists()) {
					fileToDelete_tFileOutputDelimited_1.delete();
				}
				outtFileOutputDelimited_1 = new java.io.BufferedWriter(new java.io.OutputStreamWriter(
						new java.io.FileOutputStream(fileName_tFileOutputDelimited_1, false), "UTF-8"));
				if (filetFileOutputDelimited_1.length() == 0) {
					outtFileOutputDelimited_1.write("Continent");
					outtFileOutputDelimited_1.write(OUT_DELIM_tFileOutputDelimited_1);
					outtFileOutputDelimited_1.write("Country");
					outtFileOutputDelimited_1.write(OUT_DELIM_tFileOutputDelimited_1);
					outtFileOutputDelimited_1.write("State");
					outtFileOutputDelimited_1.write(OUT_DELIM_tFileOutputDelimited_1);
					outtFileOutputDelimited_1.write("Region");
					outtFileOutputDelimited_1.write(OUT_DELIM_tFileOutputDelimited_1);
					outtFileOutputDelimited_1.write("Province");
					outtFileOutputDelimited_1.write(OUT_DELIM_tFileOutputDelimited_1);
					outtFileOutputDelimited_1.write("County");
					outtFileOutputDelimited_1.write(OUT_DELIM_tFileOutputDelimited_1);
					outtFileOutputDelimited_1.write("City");
					outtFileOutputDelimited_1.write(OUT_DELIM_tFileOutputDelimited_1);
					outtFileOutputDelimited_1.write("Street_ID");
					outtFileOutputDelimited_1.write(OUT_DELIM_tFileOutputDelimited_1);
					outtFileOutputDelimited_1.write("State_Code");
					outtFileOutputDelimited_1.write(OUT_DELIM_tFileOutputDelimited_1);
					outtFileOutputDelimited_1.write("Postal_Code");
					outtFileOutputDelimited_1.write(OUT_DELIM_tFileOutputDelimited_1);
					outtFileOutputDelimited_1.write("Street_Name");
					outtFileOutputDelimited_1.write(OUT_DELIM_ROWSEP_tFileOutputDelimited_1);
					outtFileOutputDelimited_1.flush();
				}

				resourceMap.put("out_tFileOutputDelimited_1", outtFileOutputDelimited_1);
				resourceMap.put("nb_line_tFileOutputDelimited_1", nb_line_tFileOutputDelimited_1);

				/**
				 * [tFileOutputDelimited_1 begin ] stop
				 */

				/**
				 * [tFileOutputDelimited_1 main ] start
				 */

				currentComponent = "tFileOutputDelimited_1";

				tos_count_tFileOutputDelimited_1++;

				/**
				 * [tFileOutputDelimited_1 main ] stop
				 */

				/**
				 * [tFileOutputDelimited_1 process_data_begin ] start
				 */

				currentComponent = "tFileOutputDelimited_1";

				/**
				 * [tFileOutputDelimited_1 process_data_begin ] stop
				 */

				/**
				 * [tFileOutputDelimited_1 process_data_end ] start
				 */

				currentComponent = "tFileOutputDelimited_1";

				/**
				 * [tFileOutputDelimited_1 process_data_end ] stop
				 */

				/**
				 * [tFileOutputDelimited_1 end ] start
				 */

				currentComponent = "tFileOutputDelimited_1";

				if (outtFileOutputDelimited_1 != null) {
					outtFileOutputDelimited_1.flush();
					outtFileOutputDelimited_1.close();
				}

				globalMap.put("tFileOutputDelimited_1_NB_LINE", nb_line_tFileOutputDelimited_1);
				globalMap.put("tFileOutputDelimited_1_FILE_NAME", fileName_tFileOutputDelimited_1);

				resourceMap.put("finish_tFileOutputDelimited_1", true);

				ok_Hash.put("tFileOutputDelimited_1", true);
				end_Hash.put("tFileOutputDelimited_1", System.currentTimeMillis());

				/**
				 * [tFileOutputDelimited_1 end ] stop
				 */
			} // end the resume

		} catch (java.lang.Exception e) {

			TalendException te = new TalendException(e, currentComponent, globalMap);

			throw te;
		} catch (java.lang.Error error) {

			runStat.stopThreadStat();

			throw error;
		} finally {

			try {

				/**
				 * [tFileOutputDelimited_1 finally ] start
				 */

				currentComponent = "tFileOutputDelimited_1";

				if (resourceMap.get("finish_tFileOutputDelimited_1") == null) {

					java.io.Writer outtFileOutputDelimited_1 = (java.io.Writer) resourceMap
							.get("out_tFileOutputDelimited_1");
					if (outtFileOutputDelimited_1 != null) {
						outtFileOutputDelimited_1.flush();
						outtFileOutputDelimited_1.close();
					}

				}

				/**
				 * [tFileOutputDelimited_1 finally ] stop
				 */
			} catch (java.lang.Exception e) {
				// ignore
			} catch (java.lang.Error error) {
				// ignore
			}
			resourceMap = null;
		}

		globalMap.put("tFileOutputDelimited_1_SUBPROCESS_STATE", 1);
	}

	public String resuming_logs_dir_path = null;
	public String resuming_checkpoint_path = null;
	public String parent_part_launcher = null;
	private String resumeEntryMethodName = null;
	private boolean globalResumeTicket = false;

	public boolean watch = false;
	// portStats is null, it means don't execute the statistics
	public Integer portStats = null;
	public int portTraces = 4334;
	public String clientHost;
	public String defaultClientHost = "localhost";
	public String contextStr = "Default";
	public boolean isDefaultContext = true;
	public String pid = "0";
	public String rootPid = null;
	public String fatherPid = null;
	public String fatherNode = null;
	public long startTime = 0;
	public boolean isChildJob = false;
	public String log4jLevel = "";

	private boolean enableLogStash;

	private boolean execStat = true;

	private ThreadLocal<java.util.Map<String, String>> threadLocal = new ThreadLocal<java.util.Map<String, String>>() {
		protected java.util.Map<String, String> initialValue() {
			java.util.Map<String, String> threadRunResultMap = new java.util.HashMap<String, String>();
			threadRunResultMap.put("errorCode", null);
			threadRunResultMap.put("status", "");
			return threadRunResultMap;
		};
	};

	private PropertiesWithType context_param = new PropertiesWithType();
	public java.util.Map<String, Object> parentContextMap = new java.util.HashMap<String, Object>();

	public String status = "";

	public static void main(String[] args) {
		final dimensionGeography dimensionGeographyClass = new dimensionGeography();

		int exitCode = dimensionGeographyClass.runJobInTOS(args);

		System.exit(exitCode);
	}

	public String[][] runJob(String[] args) {

		int exitCode = runJobInTOS(args);
		String[][] bufferValue = new String[][] { { Integer.toString(exitCode) } };

		return bufferValue;
	}

	public boolean hastBufferOutputComponent() {
		boolean hastBufferOutput = false;

		return hastBufferOutput;
	}

	public int runJobInTOS(String[] args) {
		// reset status
		status = "";

		String lastStr = "";
		for (String arg : args) {
			if (arg.equalsIgnoreCase("--context_param")) {
				lastStr = arg;
			} else if (lastStr.equals("")) {
				evalParam(arg);
			} else {
				evalParam(lastStr + " " + arg);
				lastStr = "";
			}
		}

		if (clientHost == null) {
			clientHost = defaultClientHost;
		}

		if (pid == null || "0".equals(pid)) {
			pid = TalendString.getAsciiRandomString(6);
		}

		if (rootPid == null) {
			rootPid = pid;
		}
		if (fatherPid == null) {
			fatherPid = pid;
		} else {
			isChildJob = true;
		}

		if (portStats != null) {
			// portStats = -1; //for testing
			if (portStats < 0 || portStats > 65535) {
				// issue:10869, the portStats is invalid, so this client socket can't open
				System.err.println("The statistics socket port " + portStats + " is invalid.");
				execStat = false;
			}
		} else {
			execStat = false;
		}

		try {
			// call job/subjob with an existing context, like: --context=production. if
			// without this parameter, there will use the default context instead.
			java.io.InputStream inContext = dimensionGeography.class.getClassLoader().getResourceAsStream(
					"llj_sae_integrationdatawarehouse/dimensiongeography_0_1/contexts/" + contextStr + ".properties");
			if (inContext == null) {
				inContext = dimensionGeography.class.getClassLoader()
						.getResourceAsStream("config/contexts/" + contextStr + ".properties");
			}
			if (inContext != null) {
				// defaultProps is in order to keep the original context value
				if (context != null && context.isEmpty()) {
					defaultProps.load(inContext);
					context = new ContextProperties(defaultProps);
				}

				inContext.close();
			} else if (!isDefaultContext) {
				// print info and job continue to run, for case: context_param is not empty.
				System.err.println("Could not find the context " + contextStr);
			}

			if (!context_param.isEmpty()) {
				context.putAll(context_param);
				// set types for params from parentJobs
				for (Object key : context_param.keySet()) {
					String context_key = key.toString();
					String context_type = context_param.getContextType(context_key);
					context.setContextType(context_key, context_type);

				}
			}
			class ContextProcessing {
				private void processContext_0() {
				}

				public void processAllContext() {
					processContext_0();
				}
			}

			new ContextProcessing().processAllContext();
		} catch (java.io.IOException ie) {
			System.err.println("Could not load context " + contextStr);
			ie.printStackTrace();
		}

		// get context value from parent directly
		if (parentContextMap != null && !parentContextMap.isEmpty()) {
		}

		// Resume: init the resumeUtil
		resumeEntryMethodName = ResumeUtil.getResumeEntryMethodName(resuming_checkpoint_path);
		resumeUtil = new ResumeUtil(resuming_logs_dir_path, isChildJob, rootPid);
		resumeUtil.initCommonInfo(pid, rootPid, fatherPid, projectName, jobName, contextStr, jobVersion);

		List<String> parametersToEncrypt = new java.util.ArrayList<String>();
		// Resume: jobStart
		resumeUtil.addLog("JOB_STARTED", "JOB:" + jobName, parent_part_launcher, Thread.currentThread().getId() + "",
				"", "", "", "", resumeUtil.convertToJsonText(context, parametersToEncrypt));

		if (execStat) {
			try {
				runStat.openSocket(!isChildJob);
				runStat.setAllPID(rootPid, fatherPid, pid, jobName);
				runStat.startThreadStat(clientHost, portStats);
				runStat.updateStatOnJob(RunStat.JOBSTART, fatherNode);
			} catch (java.io.IOException ioException) {
				ioException.printStackTrace();
			}
		}

		java.util.concurrent.ConcurrentHashMap<Object, Object> concurrentHashMap = new java.util.concurrent.ConcurrentHashMap<Object, Object>();
		globalMap.put("concurrentHashMap", concurrentHashMap);

		long startUsedMemory = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();
		long endUsedMemory = 0;
		long end = 0;

		startTime = System.currentTimeMillis();

		this.globalResumeTicket = true;// to run tPreJob

		this.globalResumeTicket = false;// to run others jobs

		try {
			errorCode = null;
			tFileInputDelimited_8Process(globalMap);
			if (!"failure".equals(status)) {
				status = "end";
			}
		} catch (TalendException e_tFileInputDelimited_8) {
			globalMap.put("tFileInputDelimited_8_SUBPROCESS_STATE", -1);

			e_tFileInputDelimited_8.printStackTrace();

		}

		this.globalResumeTicket = true;// to run tPostJob

		end = System.currentTimeMillis();

		if (watch) {
			System.out.println((end - startTime) + " milliseconds");
		}

		endUsedMemory = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();
		if (false) {
			System.out.println(
					(endUsedMemory - startUsedMemory) + " bytes memory increase when running : dimensionGeography");
		}

		if (execStat) {
			runStat.updateStatOnJob(RunStat.JOBEND, fatherNode);
			runStat.stopThreadStat();
		}
		int returnCode = 0;
		if (errorCode == null) {
			returnCode = status != null && status.equals("failure") ? 1 : 0;
		} else {
			returnCode = errorCode.intValue();
		}
		resumeUtil.addLog("JOB_ENDED", "JOB:" + jobName, parent_part_launcher, Thread.currentThread().getId() + "", "",
				"" + returnCode, "", "", "");

		return returnCode;

	}

	// only for OSGi env
	public void destroy() {

	}

	private java.util.Map<String, Object> getSharedConnections4REST() {
		java.util.Map<String, Object> connections = new java.util.HashMap<String, Object>();

		return connections;
	}

	private void evalParam(String arg) {
		if (arg.startsWith("--resuming_logs_dir_path")) {
			resuming_logs_dir_path = arg.substring(25);
		} else if (arg.startsWith("--resuming_checkpoint_path")) {
			resuming_checkpoint_path = arg.substring(27);
		} else if (arg.startsWith("--parent_part_launcher")) {
			parent_part_launcher = arg.substring(23);
		} else if (arg.startsWith("--watch")) {
			watch = true;
		} else if (arg.startsWith("--stat_port=")) {
			String portStatsStr = arg.substring(12);
			if (portStatsStr != null && !portStatsStr.equals("null")) {
				portStats = Integer.parseInt(portStatsStr);
			}
		} else if (arg.startsWith("--trace_port=")) {
			portTraces = Integer.parseInt(arg.substring(13));
		} else if (arg.startsWith("--client_host=")) {
			clientHost = arg.substring(14);
		} else if (arg.startsWith("--context=")) {
			contextStr = arg.substring(10);
			isDefaultContext = false;
		} else if (arg.startsWith("--father_pid=")) {
			fatherPid = arg.substring(13);
		} else if (arg.startsWith("--root_pid=")) {
			rootPid = arg.substring(11);
		} else if (arg.startsWith("--father_node=")) {
			fatherNode = arg.substring(14);
		} else if (arg.startsWith("--pid=")) {
			pid = arg.substring(6);
		} else if (arg.startsWith("--context_type")) {
			String keyValue = arg.substring(15);
			int index = -1;
			if (keyValue != null && (index = keyValue.indexOf('=')) > -1) {
				if (fatherPid == null) {
					context_param.setContextType(keyValue.substring(0, index),
							replaceEscapeChars(keyValue.substring(index + 1)));
				} else { // the subjob won't escape the especial chars
					context_param.setContextType(keyValue.substring(0, index), keyValue.substring(index + 1));
				}

			}

		} else if (arg.startsWith("--context_param")) {
			String keyValue = arg.substring(16);
			int index = -1;
			if (keyValue != null && (index = keyValue.indexOf('=')) > -1) {
				if (fatherPid == null) {
					context_param.put(keyValue.substring(0, index), replaceEscapeChars(keyValue.substring(index + 1)));
				} else { // the subjob won't escape the especial chars
					context_param.put(keyValue.substring(0, index), keyValue.substring(index + 1));
				}
			}
		} else if (arg.startsWith("--log4jLevel=")) {
			log4jLevel = arg.substring(13);
		} else if (arg.startsWith("--monitoring=")) {// for trunjob call
			enableLogStash = "true".equalsIgnoreCase(arg.substring(13));
		}

		if (!enableLogStash) {
			enableLogStash = "true".equalsIgnoreCase(System.getProperty("monitoring"));
		}
	}

	private static final String NULL_VALUE_EXPRESSION_IN_COMMAND_STRING_FOR_CHILD_JOB_ONLY = "<TALEND_NULL>";

	private final String[][] escapeChars = { { "\\\\", "\\" }, { "\\n", "\n" }, { "\\'", "\'" }, { "\\r", "\r" },
			{ "\\f", "\f" }, { "\\b", "\b" }, { "\\t", "\t" } };

	private String replaceEscapeChars(String keyValue) {

		if (keyValue == null || ("").equals(keyValue.trim())) {
			return keyValue;
		}

		StringBuilder result = new StringBuilder();
		int currIndex = 0;
		while (currIndex < keyValue.length()) {
			int index = -1;
			// judege if the left string includes escape chars
			for (String[] strArray : escapeChars) {
				index = keyValue.indexOf(strArray[0], currIndex);
				if (index >= 0) {

					result.append(keyValue.substring(currIndex, index + strArray[0].length()).replace(strArray[0],
							strArray[1]));
					currIndex = index + strArray[0].length();
					break;
				}
			}
			// if the left string doesn't include escape chars, append the left into the
			// result
			if (index < 0) {
				result.append(keyValue.substring(currIndex));
				currIndex = currIndex + keyValue.length();
			}
		}

		return result.toString();
	}

	public Integer getErrorCode() {
		return errorCode;
	}

	public String getStatus() {
		return status;
	}

	ResumeUtil resumeUtil = null;
}
/************************************************************************************************
 * 284458 characters generated by Talend Open Studio for Data Integration on the
 * 4 janvier 2023 16:38:00 CET
 ************************************************************************************************/