commit 981995396a8c68563bd6c6f938455ee8947759e7 Author: Dipanshu Kumar Date: Mon May 18 16:26:29 2026 +0530 first commit diff --git a/Employee_Master_Import.py b/Employee_Master_Import.py new file mode 100644 index 0000000..2bf9c63 --- /dev/null +++ b/Employee_Master_Import.py @@ -0,0 +1,376 @@ +import pyodbc +import pandas as pd +import clickhouse_connect +import numpy as np +from datetime import datetime +import traceback +import warnings + +# --------------------------------------------------- +# Ignore Warning +# --------------------------------------------------- +warnings.filterwarnings( + 'ignore', + 'pandas only supports SQLAlchemy connectable' +) + +print("ETL Started :", datetime.now()) + +# --------------------------------------------------- +# SQL SERVER CONNECTION +# --------------------------------------------------- +SQL_CONN_STR = ( + 'DRIVER={ODBC Driver 17 for SQL Server};' + 'SERVER=10.200.25.65;' + 'DATABASE=CPMIndiaBusinessInsight;' + 'UID=bsgteam_test;' + 'PWD=B$gt3@m#00512;' + 'TrustServerCertificate=yes;' +) + +# --------------------------------------------------- +# CLICKHOUSE CONFIG +# --------------------------------------------------- +CH_CONFIG = { + 'host': '172.188.12.194', + 'port': 8123, + 'username': 'default', + 'password': 'dipanshu_k', + 'database': 'DaburIndia_BI' +} + +# --------------------------------------------------- +# TABLE DETAILS +# --------------------------------------------------- +TABLE_NAME = 'Employee_Master' +PROJECT_ID = 41654 + +# --------------------------------------------------- +# CLEAN DATAFRAME +# --------------------------------------------------- +def clean_dataframe(df): + + try: + + # Replace NaN + df = df.replace({np.nan: None}) + + for col in df.columns: + + try: + + # --------------------------------------------------- + # HANDLE DATE COLUMNS + # --------------------------------------------------- + if 'date' in col.lower(): + + print(f"Cleaning Date Column : {col}") + + # Convert to datetime + df[col] = pd.to_datetime( + df[col], + errors='coerce' + ) + + # Remove invalid dates + df[col] = df[col].where( + (df[col].dt.year >= 1970) & + (df[col].dt.year <= 2100) + ) + + # Convert to Python Date + df[col] = df[col].apply( + lambda x: + x.date() + if pd.notnull(x) + else None + ) + + # --------------------------------------------------- + # FORCE OBJECT COLUMNS TO STRING + # --------------------------------------------------- + else: + + cleaned_col = [] + + for val in df[col]: + + # NULL + if pd.isnull(val): + + cleaned_col.append(None) + + # STRING + elif isinstance(val, str): + + cleaned_col.append(val) + + # INTEGER + elif isinstance( + val, + ( + int, + np.integer + ) + ): + + cleaned_col.append(int(val)) + + # FLOAT + elif isinstance( + val, + ( + float, + np.floating + ) + ): + + cleaned_col.append(str(val)) + + # BOOLEAN + elif isinstance(val, bool): + + cleaned_col.append(str(val)) + + # DATETIME + elif isinstance( + val, + ( + datetime, + pd.Timestamp + ) + ): + + cleaned_col.append(str(val)) + + # OTHER + else: + + cleaned_col.append(str(val)) + + df[col] = cleaned_col + + except Exception as col_error: + + print("\n===================================") + print(f"COLUMN FAILED : {col}") + print(str(col_error)) + print("===================================") + + return df + + except Exception as clean_error: + + print("\n===================================") + print("DATA CLEAN FAILED") + print(str(clean_error)) + print("===================================") + + return df + +try: + + # --------------------------------------------------- + # CONNECT SQL SERVER + # --------------------------------------------------- + sql_conn = pyodbc.connect(SQL_CONN_STR) + + print("Connected to SQL Server") + + # --------------------------------------------------- + # CONNECT CLICKHOUSE + # --------------------------------------------------- + ch_client = clickhouse_connect.get_client(**CH_CONFIG) + + print("Connected to ClickHouse") + + # --------------------------------------------------- + # QUERY + # --------------------------------------------------- + query = f""" + SELECT * + FROM dbo.[{TABLE_NAME}] + WHERE Project_Id = {PROJECT_ID} + """ + + print("\nExecuting Query:") + print(query) + + # --------------------------------------------------- + # CHUNK SIZE + # --------------------------------------------------- + chunk_size = 100000 + + total_rows = 0 + + # --------------------------------------------------- + # READ DATA + # --------------------------------------------------- + for chunk in pd.read_sql( + query, + sql_conn, + chunksize=chunk_size + ): + + try: + + print("\n===================================") + print(f"Processing {len(chunk)} Rows") + print("===================================") + + # --------------------------------------------------- + # CLEAN DATA + # --------------------------------------------------- + chunk = clean_dataframe(chunk) + + # --------------------------------------------------- + # FINAL DEBUG + # --------------------------------------------------- + print("\nFINAL COLUMN TYPES") + + for col in chunk.columns: + + sample = chunk[col].dropna() + + if len(sample) > 0: + + print( + col, + type(sample.iloc[0]), + sample.iloc[0] + ) + + # --------------------------------------------------- + # SAMPLE DATA + # --------------------------------------------------- + print("\nSAMPLE DATA") + print(chunk.head(2)) + + # --------------------------------------------------- + # INSERT INTO CLICKHOUSE + # --------------------------------------------------- + print("\nInserting into ClickHouse...") + + ch_client.insert_df( + table=TABLE_NAME, + df=chunk, + database=CH_CONFIG['database'] + ) + + total_rows += len(chunk) + + print(f"\nInserted Total Rows : {total_rows}") + + except Exception as chunk_error: + + print("\n===================================") + print("CHUNK INSERT FAILED") + print("===================================") + + print(str(chunk_error)) + + traceback.print_exc() + + # --------------------------------------------------- + # SAVE ERROR LOG + # --------------------------------------------------- + with open( + "clickhouse_chunk_error.log", + "a", + encoding="utf-8" + ) as log: + + log.write( + "\n\n=====================================" + ) + + log.write( + f"\nTIME : {datetime.now()}" + ) + + log.write( + f"\nTABLE : {TABLE_NAME}" + ) + + log.write( + f"\nERROR : {str(chunk_error)}" + ) + + log.write( + f"\nTRACEBACK :\n{traceback.format_exc()}" + ) + + log.write( + "\n=====================================" + ) + + continue + + print("\n===================================") + print("ETL COMPLETED SUCCESSFULLY") + print(f"TOTAL ROWS INSERTED : {total_rows}") + print("===================================") + +except Exception as main_error: + + print("\n===================================") + print("MAIN ERROR") + print("===================================") + + print(str(main_error)) + + traceback.print_exc() + + with open( + "clickhouse_main_error.log", + "a", + encoding="utf-8" + ) as log: + + log.write( + "\n\n=====================================" + ) + + log.write( + f"\nTIME : {datetime.now()}" + ) + + log.write( + f"\nERROR : {str(main_error)}" + ) + + log.write( + f"\nTRACEBACK :\n{traceback.format_exc()}" + ) + + log.write( + "\n=====================================" + ) + +finally: + + # --------------------------------------------------- + # CLOSE SQL SERVER + # --------------------------------------------------- + try: + + sql_conn.close() + + print("\nSQL Server Connection Closed") + + except: + pass + + # --------------------------------------------------- + # CLOSE CLICKHOUSE + # --------------------------------------------------- + try: + + ch_client.close() + + print("ClickHouse Connection Closed") + + except: + pass + +print("\nETL Finished :", datetime.now()) \ No newline at end of file diff --git a/Store_Master_Import.py b/Store_Master_Import.py new file mode 100644 index 0000000..f57c4ef --- /dev/null +++ b/Store_Master_Import.py @@ -0,0 +1,453 @@ + +import pyodbc +import pandas as pd +import clickhouse_connect +import numpy as np +from datetime import datetime +import traceback +import warnings + +# ========================================================= +# IGNORE WARNINGS +# ========================================================= +warnings.filterwarnings( + 'ignore', + 'pandas only supports SQLAlchemy connectable' +) + +print("ETL Started :", datetime.now()) + +# ========================================================= +# SQL SERVER CONNECTION +# ========================================================= +SQL_CONN_STR = ( + 'DRIVER={ODBC Driver 17 for SQL Server};' + 'SERVER=10.200.25.65;' + 'DATABASE=CPMIndiaBusinessInsight;' + 'UID=bsgteam_test;' + 'PWD=B$gt3@m#00512;' + 'TrustServerCertificate=yes;' +) + +# ========================================================= +# CLICKHOUSE CONFIG +# ========================================================= +CH_CONFIG = { + 'host': '172.188.12.194', + 'port': 8123, + 'username': 'default', + 'password': 'dipanshu_k', + 'database': 'DaburIndia_BI' +} + +# ========================================================= +# TABLE NAME +# ========================================================= +TABLE_NAME = 'Store_Master' +PROJECT_ID = 41654 + +# ========================================================= +# CLEAN DATAFRAME +# ========================================================= +def clean_dataframe(df): + + try: + + # --------------------------------------------- + # Replace NaN + # --------------------------------------------- + df = df.replace({np.nan: None}) + + # --------------------------------------------- + # Process Column Wise + # --------------------------------------------- + for col in df.columns: + + try: + + col_lower = col.lower() + + # ===================================== + # DATE COLUMNS + # ===================================== + if 'date' in col_lower: + + print(f"Cleaning Date Column : {col}") + + df[col] = pd.to_datetime( + df[col], + errors='coerce' + ) + + # Remove invalid dates + df[col] = df[col].where( + (df[col].dt.year >= 1970) & + (df[col].dt.year <= 2100) + ) + + # Convert to Python Date + df[col] = df[col].apply( + lambda x: + x.date() + if pd.notnull(x) + else None + ) + + # ===================================== + # INTEGER COLUMNS + # ===================================== + elif pd.api.types.is_integer_dtype(df[col]): + + df[col] = pd.to_numeric( + df[col], + errors='coerce' + ) + + df[col] = df[col].apply( + lambda x: + int(x) + if pd.notnull(x) + else None + ) + + # ===================================== + # FLOAT COLUMNS + # ===================================== + elif pd.api.types.is_float_dtype(df[col]): + + non_null = df[col].dropna() + + # --------------------------------- + # Convert whole float to int + # Example: + # 3240.0 -> 3240 + # --------------------------------- + if len(non_null) > 0 and ( + (non_null % 1 == 0).all() + ): + + df[col] = df[col].apply( + lambda x: + int(x) + if pd.notnull(x) + else None + ) + + else: + + df[col] = df[col].apply( + lambda x: + float(x) + if pd.notnull(x) + else None + ) + + # ===================================== + # OBJECT / STRING COLUMNS + # ===================================== + else: + + cleaned = [] + + for val in df[col]: + + # NULL + if pd.isnull(val): + + cleaned.append(None) + + # INTEGER + elif isinstance( + val, + ( + int, + np.integer + ) + ): + + cleaned.append(int(val)) + + # FLOAT + elif isinstance( + val, + ( + float, + np.floating + ) + ): + + if np.isnan(val): + + cleaned.append(None) + + else: + + # IMPORTANT FIX + # Avoid '3240.0' string issue + if val.is_integer(): + + cleaned.append(int(val)) + + else: + + cleaned.append(float(val)) + + # STRING + elif isinstance(val, str): + + cleaned.append(val.strip()) + + # BOOLEAN + elif isinstance(val, bool): + + cleaned.append(int(val)) + + # DATETIME + elif isinstance( + val, + ( + datetime, + pd.Timestamp + ) + ): + + cleaned.append(str(val)) + + # OTHER + else: + + cleaned.append(str(val)) + + df[col] = cleaned + + except Exception as col_error: + + print("\n================================") + print(f"COLUMN FAILED : {col}") + print(str(col_error)) + print("================================") + + return df + + except Exception as clean_error: + + print("\n================================") + print("DATA CLEAN FAILED") + print(str(clean_error)) + print("================================") + + return df + +# ========================================================= +# MAIN PROCESS +# ========================================================= +try: + + # ===================================================== + # CONNECT SQL SERVER + # ===================================================== + sql_conn = pyodbc.connect(SQL_CONN_STR) + + print("Connected to SQL Server") + + # ===================================================== + # CONNECT CLICKHOUSE + # ===================================================== + ch_client = clickhouse_connect.get_client(**CH_CONFIG) + + print("Connected to ClickHouse") + + # ===================================================== + # QUERY + # ===================================================== + query = f""" + SELECT * + FROM dbo.[{TABLE_NAME}] + WHERE Project_Id = {PROJECT_ID} + """ + + print("\nExecuting Query:") + print(query) + + # ===================================================== + # CHUNK SIZE + # ===================================================== + chunk_size = 100000 + + total_rows = 0 + + # ===================================================== + # READ DATA + # ===================================================== + for chunk in pd.read_sql( + query, + sql_conn, + chunksize=chunk_size + ): + + try: + + print("\n================================") + print(f"Processing {len(chunk)} Rows") + print("================================") + + # ================================================= + # CLEAN DATA + # ================================================= + chunk = clean_dataframe(chunk) + + # ================================================= + # DEBUG COLUMN TYPES + # ================================================= + print("\nCOLUMN TYPES") + + for col in chunk.columns: + + sample = chunk[col].dropna() + + if len(sample) > 0: + + print( + col, + type(sample.iloc[0]), + sample.iloc[0] + ) + + # ================================================= + # SAMPLE DATA + # ================================================= + print("\nSAMPLE DATA") + print(chunk.head(2)) + + # ================================================= + # INSERT INTO CLICKHOUSE + # ================================================= + print("\nInserting into ClickHouse...") + + ch_client.insert_df( + table=TABLE_NAME, + df=chunk, + database=CH_CONFIG['database'] + ) + + total_rows += len(chunk) + + print( + f"\nInserted Total Rows : {total_rows}" + ) + + except Exception as chunk_error: + + print("\n================================") + print("CHUNK INSERT FAILED") + print("================================") + + print(str(chunk_error)) + + traceback.print_exc() + + # ============================================= + # SAVE ERROR LOG + # ============================================= + with open( + "clickhouse_chunk_error.log", + "a", + encoding="utf-8" + ) as log: + + log.write( + "\n\n================================" + ) + + log.write( + f"\nTIME : {datetime.now()}" + ) + + log.write( + f"\nTABLE : {TABLE_NAME}" + ) + + log.write( + f"\nERROR : {str(chunk_error)}" + ) + + log.write( + f"\nTRACEBACK :\n" + f"{traceback.format_exc()}" + ) + + log.write( + "\n================================" + ) + + continue + + print("\n================================") + print("ETL COMPLETED SUCCESSFULLY") + print(f"TOTAL ROWS INSERTED : {total_rows}") + print("================================") + +# ========================================================= +# MAIN ERROR +# ========================================================= +except Exception as main_error: + + print("\n================================") + print("MAIN ERROR") + print("================================") + + print(str(main_error)) + + traceback.print_exc() + + with open( + "clickhouse_main_error.log", + "a", + encoding="utf-8" + ) as log: + + log.write( + "\n\n================================" + ) + + log.write( + f"\nTIME : {datetime.now()}" + ) + + log.write( + f"\nERROR : {str(main_error)}" + ) + + log.write( + f"\nTRACEBACK :\n" + f"{traceback.format_exc()}" + ) + + log.write( + "\n================================" + ) + +# ========================================================= +# CLOSE CONNECTIONS +# ========================================================= +finally: + + try: + + sql_conn.close() + + print("\nSQL Server Connection Closed") + + except: + pass + + try: + + ch_client.close() + + print("ClickHouse Connection Closed") + + except: + pass + +print("\nETL Finished :", datetime.now()) \ No newline at end of file diff --git a/TableCreateclickhouse.py b/TableCreateclickhouse.py new file mode 100644 index 0000000..1929cd7 --- /dev/null +++ b/TableCreateclickhouse.py @@ -0,0 +1,291 @@ + +import pyodbc +import pandas as pd +import clickhouse_connect +from datetime import datetime +import warnings + +# --------------------------------------------------- +# Suppress Pandas Warning +# --------------------------------------------------- +warnings.filterwarnings( + 'ignore', + 'pandas only supports SQLAlchemy connectable' +) + +print("SCHEMA Migration Started :", datetime.now()) + +# --------------------------------------------------- +# SQL Server Connection +# --------------------------------------------------- +SQL_CONN_STR = ( + 'DRIVER={ODBC Driver 17 for SQL Server};' + 'SERVER=10.200.25.65;' + 'DATABASE=CPMIndiaBusinessInsight;' + 'UID=bsgteam_test;' + 'PWD=B$gt3@m#00512;' + 'TrustServerCertificate=yes;' +) + +# --------------------------------------------------- +# ClickHouse Connection +# --------------------------------------------------- +CH_CONFIG = { + 'host': '172.188.12.194', + 'port': 8123, + 'username': 'default', + 'password': 'dipanshu_k', + 'database': 'DaburIndia_BI' +} + +# --------------------------------------------------- +# SQL Server → ClickHouse Datatype Mapping +# --------------------------------------------------- +DATATYPE_MAPPING = { + + 'bigint': 'Int64', + 'int': 'Int32', + 'smallint': 'Int16', + 'tinyint': 'Int8', + 'bit': 'UInt8', + + 'float': 'Float64', + 'real': 'Float32', + 'decimal': 'Float64', + 'numeric': 'Float64', + 'money': 'Float64', + + 'varchar': 'String', + 'nvarchar': 'String', + 'char': 'String', + 'nchar': 'String', + 'text': 'String', + 'ntext': 'String', + 'xml': 'String', + + 'date': 'Date32', + 'datetime': 'DateTime64', + 'datetime2': 'DateTime64', + 'smalldatetime': 'DateTime64', + + 'time': 'String', + + 'uniqueidentifier': 'String', + + 'binary': 'String', + 'varbinary': 'String' +} + +try: + + # --------------------------------------------------- + # Connect SQL Server + # --------------------------------------------------- + sql_conn = pyodbc.connect(SQL_CONN_STR) + + print("Connected to SQL Server") + + # --------------------------------------------------- + # Connect ClickHouse + # --------------------------------------------------- + ch_client = clickhouse_connect.get_client(**CH_CONFIG) + + print("Connected to ClickHouse") + + # --------------------------------------------------- + # Create Database if Not Exists + # --------------------------------------------------- + create_database_query = f""" + CREATE DATABASE IF NOT EXISTS `{CH_CONFIG['database']}` + """ + + ch_client.command(create_database_query) + + print(f"Database Verified : {CH_CONFIG['database']}") + + # --------------------------------------------------- + # Get All SQL Server Tables + # --------------------------------------------------- + table_query = """ + SELECT TABLE_NAME + FROM INFORMATION_SCHEMA.TABLES + WHERE TABLE_TYPE = 'BASE TABLE' + AND TABLE_SCHEMA = 'dbo' + ORDER BY TABLE_NAME + """ + + tables_df = pd.read_sql(table_query, sql_conn) + + tables = tables_df['TABLE_NAME'].tolist() + + print(f"Total Tables Found : {len(tables)}") + + # --------------------------------------------------- + # Process Each Table + # --------------------------------------------------- + for table_name in tables: + + try: + + print("\n===================================") + print(f"Creating Table : {table_name}") + print("===================================") + + # --------------------------------------------------- + # Safe Table Name + # --------------------------------------------------- + safe_table_name = ( + table_name + .replace('`', '') + .replace('[', '') + .replace(']', '') + ) + + # --------------------------------------------------- + # Get Table Schema + # --------------------------------------------------- + schema_query = """ + SELECT + COLUMN_NAME, + DATA_TYPE, + IS_NULLABLE + FROM INFORMATION_SCHEMA.COLUMNS + WHERE TABLE_NAME = ? + ORDER BY ORDINAL_POSITION + """ + + schema_df = pd.read_sql( + schema_query, + sql_conn, + params=[safe_table_name] + ) + + # --------------------------------------------------- + # Skip Empty Schema + # --------------------------------------------------- + if schema_df.empty: + + print(f"No Columns Found : {safe_table_name}") + continue + + # --------------------------------------------------- + # Build ClickHouse Columns + # --------------------------------------------------- + columns = [] + + for _, row in schema_df.iterrows(): + + col_name = str(row['COLUMN_NAME']).replace('`', '') + + sql_type = str(row['DATA_TYPE']).lower() + + nullable = str(row['IS_NULLABLE']) + + # --------------------------------------------------- + # Get ClickHouse Datatype + # --------------------------------------------------- + ch_type = DATATYPE_MAPPING.get( + sql_type, + 'String' + ) + + # --------------------------------------------------- + # Nullable Handling + # --------------------------------------------------- + if nullable == 'YES': + ch_type = f'Nullable({ch_type})' + + columns.append( + f"`{col_name}` {ch_type}" + ) + + # --------------------------------------------------- + # Generate CREATE TABLE Query + # --------------------------------------------------- + create_table_query = f""" + CREATE TABLE IF NOT EXISTS `{CH_CONFIG['database']}`.`{safe_table_name}` + ( + {', '.join(columns)} + ) + ENGINE = MergeTree() + ORDER BY tuple() + """ + + # --------------------------------------------------- + # Print SQL + # --------------------------------------------------- + print("\nGenerated CREATE TABLE SQL:\n") + print(create_table_query) + + # --------------------------------------------------- + # Save SQL Log + # --------------------------------------------------- + with open( + "clickhouse_schema_debug.log", + "a", + encoding="utf-8" + ) as log_file: + + log_file.write("\n\n=====================================\n") + log_file.write(f"TABLE : {safe_table_name}\n") + log_file.write(create_table_query) + log_file.write("\n=====================================\n") + + # --------------------------------------------------- + # Execute CREATE TABLE + # --------------------------------------------------- + ch_client.command(create_table_query) + + print(f"Table Created Successfully : {safe_table_name}") + + except Exception as table_error: + + print("\n===================================") + print(f"FAILED TABLE : {table_name}") + print("ERROR :", str(table_error)) + print("===================================") + + # --------------------------------------------------- + # Error Logging + # --------------------------------------------------- + with open( + "clickhouse_schema_error.log", + "a", + encoding="utf-8" + ) as error_log: + + error_log.write("\n\n=====================================\n") + error_log.write(f"TABLE : {table_name}\n") + error_log.write(f"ERROR : {str(table_error)}\n") + error_log.write("=====================================\n") + + continue + + print("\n===================================") + print("ALL TABLE STRUCTURES CREATED") + print("===================================") + +except Exception as e: + + print("\n===================================") + print("MAIN ERROR :", str(e)) + print("===================================") + +finally: + + # --------------------------------------------------- + # Close Connections + # --------------------------------------------------- + try: + sql_conn.close() + print("SQL Server Connection Closed") + except: + pass + + try: + ch_client.close() + print("ClickHouse Connection Closed") + except: + pass + +print("Finished :", datetime.now()) diff --git a/aa.js b/aa.js new file mode 100644 index 0000000..5b8c401 --- /dev/null +++ b/aa.js @@ -0,0 +1 @@ +kwjhefyieafutokklkk \ No newline at end of file diff --git a/clickhouse_chunk_error.log b/clickhouse_chunk_error.log new file mode 100644 index 0000000..8ef732d --- /dev/null +++ b/clickhouse_chunk_error.log @@ -0,0 +1,206 @@ + + +===================================== +TIME : 2026-05-18 13:21:13.727572 +TABLE : Employee_Master +ERROR : object of type 'float' has no len() +TRACEBACK : +Traceback (most recent call last): + File "d:\Python Code\Data_migrate_to_clickhouse.py", line 228, in + ch_client.insert( + ~~~~~~~~~~~~~~~~^ + table=TABLE_NAME, + ^^^^^^^^^^^^^^^^^ + ...<2 lines>... + database=CH_CONFIG['database'] + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ) + ^ + File "C:\Users\dipanshuk\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\clickhouse_connect\driver\client.py", line 977, in insert + context.data = data + ^^^^^^^^^^^^ + File "C:\Users\dipanshuk\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\clickhouse_connect\driver\insert.py", line 97, in data + self.block_row_count = self._calc_block_size() + ~~~~~~~~~~~~~~~~~~~~~^^ + File "C:\Users\dipanshuk\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\clickhouse_connect\driver\insert.py", line 119, in _calc_block_size + d_size = d_type.data_size(sample) + File "C:\Users\dipanshuk\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\clickhouse_connect\datatypes\base.py", line 108, in data_size + d_size = self._data_size(sample) + File "C:\Users\dipanshuk\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\clickhouse_connect\datatypes\string.py", line 31, in _data_size + total += len(x) + ~~~^^^ +TypeError: object of type 'float' has no len() + +===================================== + +===================================== +TIME : 2026-05-18 13:25:28.924657 +TABLE : Employee_Master +ERROR : object of type 'float' has no len() +TRACEBACK : +Traceback (most recent call last): + File "d:\Python Code\Data_migrate_to_clickhouse.py", line 240, in + ch_client.insert( + ~~~~~~~~~~~~~~~~^ + table=TABLE_NAME, + ^^^^^^^^^^^^^^^^^ + ...<2 lines>... + database=CH_CONFIG['database'] + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ) + ^ + File "C:\Users\dipanshuk\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\clickhouse_connect\driver\client.py", line 977, in insert + context.data = data + ^^^^^^^^^^^^ + File "C:\Users\dipanshuk\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\clickhouse_connect\driver\insert.py", line 97, in data + self.block_row_count = self._calc_block_size() + ~~~~~~~~~~~~~~~~~~~~~^^ + File "C:\Users\dipanshuk\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\clickhouse_connect\driver\insert.py", line 119, in _calc_block_size + d_size = d_type.data_size(sample) + File "C:\Users\dipanshuk\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\clickhouse_connect\datatypes\base.py", line 108, in data_size + d_size = self._data_size(sample) + File "C:\Users\dipanshuk\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\clickhouse_connect\datatypes\string.py", line 31, in _data_size + total += len(x) + ~~~^^^ +TypeError: object of type 'float' has no len() + +===================================== + +===================================== +TIME : 2026-05-18 13:28:12.319405 +TABLE : Employee_Master +ERROR : object of type 'float' has no len() +TRACEBACK : +Traceback (most recent call last): + File "d:\Python Code\Data_migrate_to_clickhouse.py", line 240, in + ch_client.insert( + ~~~~~~~~~~~~~~~~^ + table=TABLE_NAME, + ^^^^^^^^^^^^^^^^^ + ...<2 lines>... + database=CH_CONFIG['database'] + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ) + ^ + File "C:\Users\dipanshuk\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\clickhouse_connect\driver\client.py", line 977, in insert + context.data = data + ^^^^^^^^^^^^ + File "C:\Users\dipanshuk\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\clickhouse_connect\driver\insert.py", line 97, in data + self.block_row_count = self._calc_block_size() + ~~~~~~~~~~~~~~~~~~~~~^^ + File "C:\Users\dipanshuk\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\clickhouse_connect\driver\insert.py", line 119, in _calc_block_size + d_size = d_type.data_size(sample) + File "C:\Users\dipanshuk\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\clickhouse_connect\datatypes\base.py", line 108, in data_size + d_size = self._data_size(sample) + File "C:\Users\dipanshuk\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\clickhouse_connect\datatypes\string.py", line 31, in _data_size + total += len(x) + ~~~^^^ +TypeError: object of type 'float' has no len() + +===================================== + +===================================== +TIME : 2026-05-18 13:50:45.035193 +TABLE : cpm_city_master +ERROR : invalid literal for int() with base 10: '3240.0' +TRACEBACK : +Traceback (most recent call last): + File "d:\Python Code\Data_migrate_to_clickhouse.py", line 254, in + ch_client.insert_df( + ~~~~~~~~~~~~~~~~~~~^ + table=TABLE_NAME, + ^^^^^^^^^^^^^^^^^ + df=chunk, + ^^^^^^^^^ + database=CH_CONFIG['database'] + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ) + ^ + File "C:\Users\dipanshuk\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\clickhouse_connect\driver\client.py", line 1013, in insert_df + return self.insert(table, + ~~~~~~~~~~~^^^^^^^ + df, + ^^^ + ...<5 lines>... + transport_settings=transport_settings, + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + context=context) + ^^^^^^^^^^^^^^^^ + File "C:\Users\dipanshuk\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\clickhouse_connect\driver\client.py", line 978, in insert + return self.data_insert(context) + ~~~~~~~~~~~~~~~~^^^^^^^^^ + File "C:\Users\dipanshuk\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\clickhouse_connect\driver\httpclient.py", line 347, in data_insert + response = self._raw_request(block_gen, params, headers, error_handler=error_handler, server_wait=False) + File "C:\Users\dipanshuk\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\clickhouse_connect\driver\httpclient.py", line 569, in _raw_request + error_handler(response) + ~~~~~~~~~~~~~^^^^^^^^^^ + File "C:\Users\dipanshuk\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\clickhouse_connect\driver\httpclient.py", line 331, in error_handler + raise ex + File "C:\Users\dipanshuk\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\clickhouse_connect\driver\transform.py", line 114, in chunk_gen + col_type.write_column(data, output, context) + ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\dipanshuk\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\clickhouse_connect\datatypes\base.py", line 216, in write_column + self.write_column_data(column, dest, ctx) + ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^ + File "C:\Users\dipanshuk\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\clickhouse_connect\datatypes\base.py", line 231, in write_column_data + self._write_column_binary(column, dest, ctx) + ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^ + File "C:\Users\dipanshuk\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\clickhouse_connect\datatypes\numeric.py", line 29, in _write_column_binary + column = [int(x) if x else 0 for x in column] + ~~~^^^ +ValueError: invalid literal for int() with base 10: '3240.0' + +===================================== + +===================================== +TIME : 2026-05-18 15:13:42.747872 +TABLE : cpm_city_master +ERROR : invalid literal for int() with base 10: '3240.0' +TRACEBACK : +Traceback (most recent call last): + File "d:\Python Code\City_Master_Import.py", line 256, in + ch_client.insert_df( + ~~~~~~~~~~~~~~~~~~~^ + table=TABLE_NAME, + ^^^^^^^^^^^^^^^^^ + df=chunk, + ^^^^^^^^^ + database=CH_CONFIG['database'] + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ) + ^ + File "C:\Users\dipanshuk\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\clickhouse_connect\driver\client.py", line 1013, in insert_df + return self.insert(table, + ~~~~~~~~~~~^^^^^^^ + df, + ^^^ + ...<5 lines>... + transport_settings=transport_settings, + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + context=context) + ^^^^^^^^^^^^^^^^ + File "C:\Users\dipanshuk\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\clickhouse_connect\driver\client.py", line 978, in insert + return self.data_insert(context) + ~~~~~~~~~~~~~~~~^^^^^^^^^ + File "C:\Users\dipanshuk\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\clickhouse_connect\driver\httpclient.py", line 347, in data_insert + response = self._raw_request(block_gen, params, headers, error_handler=error_handler, server_wait=False) + File "C:\Users\dipanshuk\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\clickhouse_connect\driver\httpclient.py", line 569, in _raw_request + error_handler(response) + ~~~~~~~~~~~~~^^^^^^^^^^ + File "C:\Users\dipanshuk\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\clickhouse_connect\driver\httpclient.py", line 331, in error_handler + raise ex + File "C:\Users\dipanshuk\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\clickhouse_connect\driver\transform.py", line 114, in chunk_gen + col_type.write_column(data, output, context) + ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\dipanshuk\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\clickhouse_connect\datatypes\base.py", line 216, in write_column + self.write_column_data(column, dest, ctx) + ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^ + File "C:\Users\dipanshuk\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\clickhouse_connect\datatypes\base.py", line 231, in write_column_data + self._write_column_binary(column, dest, ctx) + ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^ + File "C:\Users\dipanshuk\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\clickhouse_connect\datatypes\numeric.py", line 29, in _write_column_binary + column = [int(x) if x else 0 for x in column] + ~~~^^^ +ValueError: invalid literal for int() with base 10: '3240.0' + +===================================== \ No newline at end of file diff --git a/clickhouse_error.log b/clickhouse_error.log new file mode 100644 index 0000000..7a6cc6f --- /dev/null +++ b/clickhouse_error.log @@ -0,0 +1,64 @@ + + +================================= +TIME : 2026-05-18 13:15:13.522883 +ERROR : object of type 'float' has no len() +Traceback (most recent call last): + File "d:\Python Code\Data_migrate_to_clickhouse.py", line 194, in + ch_client.insert( + ~~~~~~~~~~~~~~~~^ + table=TABLE_NAME, + ^^^^^^^^^^^^^^^^^ + ...<2 lines>... + database=CH_CONFIG['database'] + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ) + ^ + File "C:\Users\dipanshuk\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\clickhouse_connect\driver\client.py", line 977, in insert + context.data = data + ^^^^^^^^^^^^ + File "C:\Users\dipanshuk\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\clickhouse_connect\driver\insert.py", line 97, in data + self.block_row_count = self._calc_block_size() + ~~~~~~~~~~~~~~~~~~~~~^^ + File "C:\Users\dipanshuk\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\clickhouse_connect\driver\insert.py", line 119, in _calc_block_size + d_size = d_type.data_size(sample) + File "C:\Users\dipanshuk\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\clickhouse_connect\datatypes\base.py", line 108, in data_size + d_size = self._data_size(sample) + File "C:\Users\dipanshuk\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\clickhouse_connect\datatypes\string.py", line 31, in _data_size + total += len(x) + ~~~^^^ +TypeError: object of type 'float' has no len() + +================================= + + +================================= +TIME : 2026-05-18 13:17:54.779420 +ERROR : object of type 'float' has no len() +Traceback (most recent call last): + File "d:\Python Code\Data_migrate_to_clickhouse.py", line 194, in + ch_client.insert( + ~~~~~~~~~~~~~~~~^ + table=TABLE_NAME, + ^^^^^^^^^^^^^^^^^ + ...<2 lines>... + database=CH_CONFIG['database'] + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ) + ^ + File "C:\Users\dipanshuk\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\clickhouse_connect\driver\client.py", line 977, in insert + context.data = data + ^^^^^^^^^^^^ + File "C:\Users\dipanshuk\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\clickhouse_connect\driver\insert.py", line 97, in data + self.block_row_count = self._calc_block_size() + ~~~~~~~~~~~~~~~~~~~~~^^ + File "C:\Users\dipanshuk\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\clickhouse_connect\driver\insert.py", line 119, in _calc_block_size + d_size = d_type.data_size(sample) + File "C:\Users\dipanshuk\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\clickhouse_connect\datatypes\base.py", line 108, in data_size + d_size = self._data_size(sample) + File "C:\Users\dipanshuk\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\clickhouse_connect\datatypes\string.py", line 31, in _data_size + total += len(x) + ~~~^^^ +TypeError: object of type 'float' has no len() + +================================= diff --git a/clickhouse_main_error.log b/clickhouse_main_error.log new file mode 100644 index 0000000..ec9c176 --- /dev/null +++ b/clickhouse_main_error.log @@ -0,0 +1,24 @@ + + +===================================== +TIME : 2026-05-18 13:49:49.650758 +ERROR : name 'PROJECT_ID' is not defined +TRACEBACK : +Traceback (most recent call last): + File "d:\Python Code\Data_migrate_to_clickhouse.py", line 193, in + WHERE Project_Id = {PROJECT_ID} + ^^^^^^^^^^ +NameError: name 'PROJECT_ID' is not defined + +===================================== + +===================================== +TIME : 2026-05-18 15:03:23.790219 +ERROR : ('08001', '[08001] [Microsoft][ODBC Driver 17 for SQL Server]TCP Provider: Timeout error [258]. (258) (SQLDriverConnect); [08001] [Microsoft][ODBC Driver 17 for SQL Server]Login timeout expired (0); [08001] [Microsoft][ODBC Driver 17 for SQL Server]Unable to complete login process due to delay in login response (258)') +TRACEBACK : +Traceback (most recent call last): + File "d:\Python Code\City_Master_Import.py", line 178, in + sql_conn = pyodbc.connect(SQL_CONN_STR) +pyodbc.OperationalError: ('08001', '[08001] [Microsoft][ODBC Driver 17 for SQL Server]TCP Provider: Timeout error [258]. (258) (SQLDriverConnect); [08001] [Microsoft][ODBC Driver 17 for SQL Server]Login timeout expired (0); [08001] [Microsoft][ODBC Driver 17 for SQL Server]Unable to complete login process due to delay in login response (258)') + +===================================== \ No newline at end of file diff --git a/clickhouse_schema_debug.log b/clickhouse_schema_debug.log new file mode 100644 index 0000000..2fb95bf --- /dev/null +++ b/clickhouse_schema_debug.log @@ -0,0 +1,2990 @@ + + +===================================== +TABLE : _Login_Backup + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`_Login_Backup` + ( + `pk` Int32, `project_id` Int32, `employee_id` Int32, `login_date` Date32, `login_time` String, `process_id` Nullable(Int32), `first_store_in_time` Nullable(String), `last_store_out_time` Nullable(String), `update_date` Date32, `update_by` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : additional_visibility + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`additional_visibility` + ( + `Id` Int64, `project_id` Int32, `Mid` Nullable(Int64), `emp_id` Int32, `store_id` Int32, `storetype_id` Int32, `channel_id` Int32, `chain_id` Int32, `camera_allowed` String, `visit_date` Date32, `is_present` String, `brand_id` Int32, `display_id` Int32, `Remarks` Nullable(String), `image_url` Nullable(String), `created_date` Date32, `created_by` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Attendance + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Attendance` + ( + `MID` Nullable(Int64), `pk` Int32, `project_id` Int32, `employee_id` Int32, `position_code` Nullable(String), `legacy_code` Nullable(String), `supervisor_id` Int32, `date_of_join` Nullable(Date32), `date_of_resign` Nullable(Date32), `visit_date` Date32, `parinaam_attendance` String, `hr_attendance` Nullable(String), `field_team_attendance` Nullable(String), `remarks` Nullable(String), `update_date` Date32, `update_by` String, `Unique_Id` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Attendance Codes + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Attendance Codes` + ( + `ID` Int32, `Code` String, `Remarks` String, `Present` Float64, `Leave` Float64, `Absent` Float64, `Target` Float64 + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Attendance_Sup + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Attendance_Sup` + ( + `Id` Int64, `Project_Id` Nullable(Int32), `EmpId` Nullable(Int32), `UserName` Nullable(String), `Position_Code` Nullable(String), `Legacy_code` Nullable(String), `CityId` Nullable(Int32), `DesignationId` Nullable(Int32), `DOJ` Nullable(Date32), `DOR` Nullable(Date32), `VisitDate` Nullable(Date32), `Parinaam_Attendance` Nullable(String), `UpdateDate` Nullable(Date32), `UpdateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : bu_leads + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`bu_leads` + ( + `project_id` Nullable(Int32), `project_name` Nullable(String), `email_id` Nullable(String), `bu_name` Nullable(String), `user_status` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Category_Compliance + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Category_Compliance` + ( + `pk` Int64, `project_id` Int32, `store_id` Int32, `employee_id` Int32, `visit_date` Date32, `supervisor_id` Int32, `channel_id` Int32, `chain_id` Int32, `storetype_id` Int32, `category_id` Nullable(Int32), `category_name` Nullable(String), `category_definition_id` Nullable(Int32), `category_definition_name` Nullable(String), `question_id` Nullable(Int32), `question` Nullable(String), `question_answer` Nullable(String), `score` Nullable(Int32), `image1` Nullable(String), `image2` Nullable(String), `auditor_name` Nullable(String), `audit_date` Nullable(Date32), `audit_time` Nullable(String), `update_date` Date32, `update_by` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Category_Execution + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Category_Execution` + ( + `Id` Int64, `ProjectId` Int32, `MID` Nullable(Int64), `StoreId` Int32, `EMPID` Int32, `VisitDate` Date32, `SupervisorId` Int32, `ManagerId` Nullable(Int32), `RegionId` Nullable(Int32), `StateId` Nullable(Int32), `CityId` Nullable(Int32), `ChainId` Nullable(Int32), `ChannelId` Nullable(Int32), `StoreTypeId` Nullable(Int32), `StoreCategoryId` Nullable(Int32), `StoreClassId` Nullable(Int32), `DistributorId` Nullable(Int32), `CategoryId` Nullable(Int32), `CategoryName` Nullable(String), `CategoryDefinitionId` Nullable(Int32), `CategoryDefinitionName` Nullable(String), `Present` Nullable(String), `ReasonId` Nullable(Int16), `Reason` Nullable(String), `Image1` Nullable(String), `Image2` Nullable(String), `Updatedate` Nullable(DateTime64), `UpdateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : chain_type + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`chain_type` + ( + `project_id` Int32, `chain_id` Int32, `chain_name` String, `chain_type` String, `storetype_id` Nullable(Int32), `storetype_name` Nullable(String), `display_order` Nullable(Int32), `created_date` Date32, `created_by` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : ChatBot + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`ChatBot` + ( + `Id` Int64, `Project_Id` Int32, `Mid` Nullable(Int64), `SuperVisorId` Int32, `EmpID` Int32, `StoreId` Int32, `ChainId` Int32, `ChannelId` Int32, `StoreTypeId` Int32, `StoreCategoryId` Int32, `StoreClassId` Int32, `VisitDate` Date32, `OTP` Nullable(String), `OTP_Exist` Nullable(UInt8), `CreateDate` DateTime64, `CreateBy` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : ChatBot_Data + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`ChatBot_Data` + ( + `Id` Int64, `ProjectId` Int32, `MobileNo` Nullable(String), `Q1` Nullable(String), `Q2` Nullable(String), `CouponCode` Nullable(String), `DateAndTime` Nullable(String), `Createdate` Nullable(DateTime64), `CreateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : ChatBot_Data_ROW + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`ChatBot_Data_ROW` + ( + `Id` Int64, `ProjectId` Int32, `TimeStamp` Nullable(String), `MobileNo` Nullable(String), `UserName` Nullable(String), `StartSurvey` Nullable(String), `AgeGroup` Nullable(String), `Experiencesensitivity` Nullable(String), `UseSensodyne` Nullable(String), `RandomCode` Nullable(String), `ConsiderPurchasingSensodyne` Nullable(String), `Q1` Nullable(String), `Q2` Nullable(String), `InsertTimeStamp` Nullable(DateTime64), `Createdate` Nullable(DateTime64), `CreateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Comp_visibility + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Comp_visibility` + ( + `Id` Int64, `project_id` Int32, `Mid` Nullable(Int64), `emp_id` Int32, `store_id` Int32, `storetype_id` Int32, `channel_id` Int32, `chain_id` Int32, `camera_allowed` String, `visit_date` Date32, `is_present` String, `brand_id` Int32, `display_id` Int32, `Remarks` Nullable(String), `image_url` Nullable(String), `created_date` Date32, `created_by` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Contact Conversion + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Contact Conversion` + ( + `Id` Int64, `project_id` Int32, `Mid` Nullable(Int64), `emp_id` Int32, `store_id` Int32, `storetype_id` Int32, `channel_id` Int32, `chain_id` Int32, `visit_date` Date32, `total_contact` Int32, `total_convert` Int32, `created_date` Date32, `created_by` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Coverage + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Coverage` + ( + `pk` Int32, `project_id` Int32, `store_id` Int32, `employee_id` Int32, `visit_date` Date32, `in_time` Nullable(String), `out_time` Nullable(String), `duration_in_minutes` Nullable(Int32), `is_covered` Nullable(String), `is_executed` Nullable(String), `reason_remarks` Nullable(String), `detailed_reason_remarks` Nullable(String), `storetype_id` Nullable(Int32), `asm_area_id` Nullable(String), `supervisor_id` Nullable(Int32), `coverage_type` Nullable(String), `distance_in_meters` Nullable(Float64), `update_date` Date32, `update_by` String, `reasonId` Nullable(Int32), `camera_allow` Nullable(UInt8), `MID` Nullable(Int64), `data_upload_status` Nullable(String), `app_time` Nullable(String), `app_version` Nullable(Float64), `checkout_time` Nullable(String), `Unique_Id` Nullable(String), `Unique_EmpID` Nullable(String), `Unique_StoreID` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : coverage_remarks + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`coverage_remarks` + ( + `Id` Int64, `project_id` Int32, `reason_id` Int32, `reason_remarks` String, `detailed_reason_remarks` Nullable(String), `reason_type` Nullable(String), `reason_type_id` Nullable(Int32) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Coverage_Sup + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Coverage_Sup` + ( + `Id` Int64, `Project_Id` Nullable(Int32), `Mid` Int64, `StoreId` Nullable(Int32), `EmpId` Nullable(Int32), `MerchnadiserId` Nullable(Int32), `Visitdate` Nullable(Date32), `InTime` Nullable(String), `OutTime` Nullable(String), `duration_in_minutes` Nullable(Int32), `Latitude` Nullable(Float64), `Longitude` Nullable(Float64), `ReasonId` Nullable(Int32), `CityId` Nullable(Int32), `ChainId` Nullable(Int32), `StoretypeId` Nullable(Int32), `StoreCategoryId` Nullable(Int32), `StoreClassId` Nullable(Int32), `Deviation` Nullable(Int32), `UploadStatus` Nullable(String), `CheckInImage` Nullable(String), `AppVersion` Nullable(String), `is_covered` Nullable(String), `is_executed` Nullable(String), `camera_allow` Nullable(UInt8), `UpdateDate` Nullable(Date32), `UpdateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : cpm_city_master + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`cpm_city_master` + ( + `id` Int32, `cpm_city_code` String, `cpm_city_code_old` Nullable(String), `city` String, `state_id` Int32, `state_code` String, `state` String, `region_id` Int32, `region_code` String, `region` String, `country_id` Nullable(Int32), `country_code` Nullable(String), `country` Nullable(String), `alternate_city_name` Nullable(String), `type_of_city` Nullable(String), `tier_type` Nullable(String), `parent_city_district` Nullable(String), `population` Nullable(String), `share_point_list_id` Nullable(Int32) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : cpm_store_type + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`cpm_store_type` + ( + `store_type_id` Nullable(Int32), `store_type` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : dax_generator + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`dax_generator` + ( + `english_query` Nullable(String), `dax_code` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : display_master + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`display_master` + ( + `Id` Int64, `project_id` Int32, `display_id` Int32, `display_code` Nullable(String), `display_name` String, `display_ref_url` Nullable(String), `created_date` Date32, `created_by` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : employee_daily_wages + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`employee_daily_wages` + ( + `project_id` Int32, `project_name` String, `designation_id` Int32, `designation` String, `employee_role` String, `daily_wages` Float64, `from_date` Date32, `to_date` Nullable(Date32) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : employee_grooming + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`employee_grooming` + ( + `pk` Nullable(Int32), `project_id` Nullable(Int32), `employee_id` Nullable(Int32), `designation` Nullable(String), `supervisor_id` Nullable(Int32), `visit_date` Nullable(Date32), `grooming_name` Nullable(String), `audit_status` Nullable(String), `audit_reason_id` Nullable(Int32), `reason` Nullable(String), `image_url_1` Nullable(String), `image_url_2` Nullable(String), `image_url_3` Nullable(String), `image_url_4` Nullable(String), `image_url_5` Nullable(String), `image_url_6` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Employee_Master + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Employee_Master` + ( + `project_id` Int64, `region_id` Nullable(Int64), `region` Nullable(String), `state_id` Nullable(Int64), `state` Nullable(String), `city_id` Nullable(Int64), `city` Nullable(String), `employee_id` Int64, `employee_name` String, `gender` Nullable(String), `employee_type` Nullable(String), `designation_id` Nullable(Int64), `designation` Nullable(String), `employee_role` Nullable(String), `manager_id` Nullable(Int64), `manager_name` Nullable(String), `employee_legacy_code` Nullable(String), `employee_joining_date` Nullable(Date32), `employee_resign_date` Nullable(Date32), `employee_status` Nullable(String), `position_code` Nullable(String), `employee_working_role` Nullable(String), `Unique_Employee_ID` Nullable(String), `channel_id` Nullable(Int32), `channel_name` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : exceptions + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`exceptions` + ( + `project_id` Int32, `kpi_name` String, `table_name` String, `column_name` String, `column_value` Int32, `from_date` Date32, `to_date` Nullable(Date32) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : GyanCast_Data + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`GyanCast_Data` + ( + `Id` Int32, `ProjectId` Nullable(Int32), `ProjectName` Nullable(String), `EmpId` Nullable(Int32), `EmployeeName` Nullable(String), `Designation` Nullable(String), `PlayDuration` Nullable(String), `TrainingStatus` Nullable(String), `TId` Nullable(Int32), `TrainingId` Nullable(Int32), `Topic` Nullable(String), `CompleteDate` Nullable(Date32), `TrainingContentId` Nullable(Int32), `QuestionId` Nullable(Int32), `Question` Nullable(String), `AnswerId` Nullable(Int32), `Answer` Nullable(String), `RightAnswer` Nullable(UInt8), `CreateDate` Nullable(Date32), `CreateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : GyanCast_Master_Language + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`GyanCast_Master_Language` + ( + `pk` Int32, `LanguageId` Int32, `Language` Nullable(String), `UploadDate` Nullable(DateTime64) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : GyanCast_Master_MediaType + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`GyanCast_Master_MediaType` + ( + `pk` Int32, `MediaTypeId` Nullable(Int32), `MediaType` Nullable(String), `UploadDate` Nullable(DateTime64) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : GyanCast_Master_Training + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`GyanCast_Master_Training` + ( + `pk` Int32, `TrainingId` Nullable(Int32), `MediaTypeId` Nullable(Int32), `Topic` Nullable(String), `Description` Nullable(String), `StartDate` Nullable(Date32), `EndDate` Nullable(Date32), `TrainingNo` Nullable(String), `UploadDate` Nullable(DateTime64) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : GyanCast_Master_TrainingDocs + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`GyanCast_Master_TrainingDocs` + ( + `pk` Int32, `TrainingContentId` Nullable(Int32), `TrainingId` Nullable(Int32), `LanguageId` Nullable(Int32), `TrainingUrl` Nullable(String), `Duration` Nullable(Float64), `Thumnail` Nullable(String), `UploadDate` Nullable(DateTime64) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : GyanCast_Master_TrainingQuestion + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`GyanCast_Master_TrainingQuestion` + ( + `pk` Int32, `QuestionId` Nullable(Int32), `Question` Nullable(String), `QuestionTypeId` Nullable(Int32), `TrainingId` Nullable(Int32), `UploadDate` Nullable(DateTime64) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : GyanCast_Master_TrainingQuestionAnswer + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`GyanCast_Master_TrainingQuestionAnswer` + ( + `pk` Int32, `AnswerId` Nullable(Int32), `Answer` Nullable(String), `QuestionId` Nullable(Int32), `RightAnswer` Nullable(UInt8), `UploadDate` Nullable(DateTime64) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Gyancast_Training + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Gyancast_Training` + ( + `pk` Int32, `project_id` Nullable(Int32), `TrainingId` Nullable(Int32), `MediaTypeId` Nullable(Int32), `TrainingContentId` Nullable(Int32), `LanguageId` Nullable(Int32), `TrainingUrl` Nullable(String), `Duration` Nullable(Float64), `CompleteDate` Nullable(Date32), `EmpId` Nullable(Int32), `Designation` Nullable(String), `PlayDuration` Nullable(String), `TrainingStatus` Nullable(String), `VideoAudioStatus` Nullable(String), `UploadDate` Nullable(DateTime64) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Gyancast_TrainingQues + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Gyancast_TrainingQues` + ( + `pk` Int32, `project_id` Nullable(Int32), `TrainingId` Nullable(Int32), `TrainingNo` Nullable(String), `Topic` Nullable(String), `Description` Nullable(String), `StartDate` Nullable(Date32), `EndDate` Nullable(Date32), `TrainingContentId` Nullable(Int32), `TrainingUrl` Nullable(String), `Duration` Nullable(Float64), `CompleteDate` Nullable(Date32), `EmpId` Nullable(Int32), `Designation` Nullable(String), `PlayDuration` Nullable(String), `TrainingStatus` Nullable(String), `QuestionId` Nullable(Int32), `Question` Nullable(String), `AnswerId` Nullable(Int32), `Answer` Nullable(String), `RightAnswer` Nullable(Int32), `UploadDate` Nullable(DateTime64) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Head Count + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Head Count` + ( + `project_id` Int32, `project_name` Nullable(String), `channel_id` Nullable(Int32), `Channel` String, `region_id` Int32, `region_name` String, `position_code` String, `designation_id` Int32, `designation_name` String, `designation_code` String, `position_code_new` String, `Status` String, `start_date` Date32, `end_date` Nullable(Date32), `employee_role` String, `is_temp_code` Int32, `update_date` Nullable(Date32), `update_by` Nullable(String), `ticket_id` Nullable(String), `reference_store_id` Nullable(Int32) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : HulTea_Attendance + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`HulTea_Attendance` + ( + `MID` Nullable(Int64), `pk` Int32, `project_id` Int32, `employee_id` Int32, `position_code` Nullable(String), `legacy_code` Nullable(String), `supervisor_id` Int32, `date_of_join` Nullable(Date32), `date_of_resign` Nullable(Date32), `visit_date` Date32, `parinaam_attendance` String, `hr_attendance` Nullable(String), `field_team_attendance` Nullable(String), `remarks` Nullable(String), `update_date` Date32, `update_by` String, `Unique_Id` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : HulTea_Coverage + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`HulTea_Coverage` + ( + `pk` Int32, `project_id` Int32, `store_id` Int32, `employee_id` Int32, `visit_date` Date32, `in_time` Nullable(String), `out_time` Nullable(String), `duration_in_minutes` Nullable(Int32), `is_covered` Nullable(String), `is_executed` Nullable(String), `reason_remarks` Nullable(String), `detailed_reason_remarks` Nullable(String), `storetype_id` Nullable(Int32), `asm_area_id` Nullable(String), `supervisor_id` Nullable(Int32), `coverage_type` Nullable(String), `distance_in_meters` Nullable(Float64), `update_date` Date32, `update_by` String, `reasonId` Nullable(Int32), `camera_allow` Nullable(UInt8), `MID` Nullable(Int64), `data_upload_status` Nullable(String), `app_time` Nullable(String), `app_version` Nullable(Float64), `checkout_time` Nullable(String), `Unique_Id` Nullable(String), `Unique_EmpID` Nullable(String), `Unique_StoreID` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : HulTea_Journey_Plan + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`HulTea_Journey_Plan` + ( + `Id` Int64, `project_id` Int32, `store_id` Int32, `employee_id` Int32, `visit_date` Date32, `process_id` Nullable(Int32), `CreateDate` Date32, `CreateBy` Nullable(String), `UpdateDate` Date32, `UpdateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : HulTea_Login + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`HulTea_Login` + ( + `pk` Int32, `project_id` Int32, `employee_id` Int32, `login_date` Date32, `login_time` String, `process_id` Nullable(Int32), `first_store_in_time` Nullable(String), `last_store_out_time` Nullable(String), `update_date` Date32, `update_by` String, `Unique_Id` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : HulTea_MissedCall + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`HulTea_MissedCall` + ( + `Id` Int64, `ProjectId` Nullable(Int32), `Mid` Int64, `StoreId` Nullable(Int32), `EmpId` Nullable(Int32), `Visitdate` Nullable(Date32), `BrandId` Nullable(Int32), `Purchase` Nullable(UInt8), `NoPurchaseReason` Nullable(String), `SMSCode` Nullable(String), `SMSStatus` Nullable(String), `RejectReason` Nullable(String), `CreateDate` Nullable(Date32), `CreateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : HulTea_Sales + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`HulTea_Sales` + ( + `Id` Int64, `Project_Id` Int32, `Mid` Nullable(Int64), `SuperVisorId` Int32, `EmpID` Int32, `StoreId` Int32, `ChainId` Int32, `ChannelId` Int32, `StoreTypeId` Int32, `VisitDate` Date32, `ProductId` Int32, `MSL` Int32, `PTR` Float64, `MRP` Float64, `Sale` Int32, `Value` Float64, `CreateDate` DateTime64, `CreateBy` String, `SalesType` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : HulTea_Stock_Details + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`HulTea_Stock_Details` + ( + `pk` Int32, `project_id` Int32, `MID` Nullable(Int64), `supervisor_id` Int32, `employee_id` Int32, `store_id` Int32, `VisitDate` Nullable(Date32), `storetype_id` Int32, `store_category_id` Nullable(Int32), `product_id` Int32, `MSL` String, `MBQ` Int32, `opening_stock` Nullable(Int32), `mid_day_stock` Nullable(Int32), `closing_stock` Nullable(Int32), `Stock_Qty` Int32, `offtake` Nullable(Int32), `damagedstock` Nullable(Int32), `loststock` Nullable(Int32), `expirystock` Nullable(Int32), `skuavailability` String, `update_date` Date32, `update_by` String, `StockType` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : HulTea_Web_Logins + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`HulTea_Web_Logins` + ( + `Id` Int64, `project_id` Int32, `supervisor_id` Int32, `supervisor_name` String, `emp_id` Int32, `employee_name` String, `designation` String, `date` Date32, `time` String, `activity_name` String, `activity_type` String, `right_name` String, `CreateDate` Nullable(DateTime64), `CreateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Journey_Plan + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Journey_Plan` + ( + `Id` Int64, `project_id` Int32, `store_id` Int32, `employee_id` Int32, `visit_date` Date32, `process_id` Nullable(Int32), `CreateDate` Date32, `CreateBy` Nullable(String), `UpdateDate` Date32, `UpdateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : JourneyPlan_Storewise_Sup + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`JourneyPlan_Storewise_Sup` + ( + `Id` Int64, `ProjectId` Nullable(Int32), `StoreId` Nullable(Int32), `EmpId` Nullable(Int32), `Visitdate` Nullable(Date32), `Deviation` Nullable(Int32), `UpdateDate` Nullable(Date32), `UpdateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : KPI Benchmark + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`KPI Benchmark` + ( + `project_id` Int32, `kpi_name` String, `start_range` Float64, `end_range` Float64, `score_range` Float64 + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : KPI RAG Bands + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`KPI RAG Bands` + ( + `Project ID` Nullable(Int32), `Project Name` Nullable(String), `KPI_Name` Nullable(String), `Category ID` Nullable(Int32), `Category Name` Nullable(String), `Sub Category ID` Nullable(Int32), `Sub Category Name` Nullable(String), `Brand ID` Nullable(Int32), `Brand Name` Nullable(String), `Band_1` Nullable(Float64), `Band_2` Nullable(Float64) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : KPI RAG Icons + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`KPI RAG Icons` + ( + `Icon ID` Nullable(Int32), `Icon Name` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Login + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Login` + ( + `pk` Int32, `project_id` Int32, `employee_id` Int32, `login_date` Date32, `login_time` String, `process_id` Nullable(Int32), `first_store_in_time` Nullable(String), `last_store_out_time` Nullable(String), `update_date` Date32, `update_by` String, `Unique_Id` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Login_Sup + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Login_Sup` + ( + `Id` Int32, `ProjectId` Int32, `EmployeeId` Int32, `LoginDate` Date32, `logintime` String, `First_store_in_time` Nullable(String), `Last_store_out_time` Nullable(String), `UpdateDate` Date32, `UpdateBy` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Mapping_StorePromotion + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Mapping_StorePromotion` + ( + `ID` Int64, `Project_Id` Int32, `StoreId` Nullable(Int32), `PromotionDefinitionid` Nullable(Int32), `Fromdate` Nullable(Date32), `Todate` Nullable(Date32), `CreateDate` Nullable(DateTime64), `CreateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Mapping_StoreVisibility + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Mapping_StoreVisibility` + ( + `ID` Int64, `Project_Id` Int32, `StoreId` Nullable(Int32), `VisibilityDefinitionid` Nullable(Int32), `Fromdate` Nullable(Date32), `Todate` Nullable(Date32), `CreateDate` Nullable(DateTime64), `CreateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Master_CategoryDefinition + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Master_CategoryDefinition` + ( + `project_id` Int64, `categorydefinitionid` Int32, `categoryid` Int32, `categorydefinitioncode` Nullable(String), `categorydefinitionname` Nullable(String), `CreateDate` Nullable(DateTime64), `createby` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Master_OQAD_Question + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Master_OQAD_Question` + ( + `Id` Int64, `UniqueId` Nullable(String), `ProjectId` Nullable(Int32), `QuestionCategoryId` Int32, `QuestionCategory` Nullable(String), `QuestionId` Nullable(Int32), `Question` Nullable(String), `AnswerId` Nullable(Int32), `Answer` Nullable(String), `Right_Answer` Nullable(String), `Fromdate` Nullable(Date32), `Todate` Nullable(Date32), `UpdateDate` Nullable(DateTime64), `UpdateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Master_PaidVisibility_Remarks + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Master_PaidVisibility_Remarks` + ( + `project_id` Nullable(Int32), `ReasonId` Nullable(Int32), `Reason` Nullable(String), `Group` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Master_ProductBrand + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Master_ProductBrand` + ( + `Project_Id` Int32, `Brand_Id` Int64, `SubCategory_Id` Int64, `Brand_Code` Nullable(String), `Brand_Name` Nullable(String), `Brand_Sequence` Nullable(Int32), `Company_Id` Nullable(Int32), `CreateDate` Nullable(DateTime64), `CreateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Master_ProductCategory + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Master_ProductCategory` + ( + `Project_Id` Int32, `Category_Id` Int32, `Category_Name` String, `Category_Code` Nullable(String), `Category_Sequence` Nullable(Int32), `CreateDate` Nullable(DateTime64), `CreateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Master_ProductSubCategory + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Master_ProductSubCategory` + ( + `Project_Id` Nullable(Int32), `SubCategory_Id` Int32, `SubCategory_Name` String, `SubCategory_Code` Nullable(String), `Category_Id` Int32, `SubCategory_Sequence` Nullable(Int32), `CreateDate` Nullable(DateTime64), `CreateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Master_PromotionDefinition + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Master_PromotionDefinition` + ( + `Id` Int64, `Project_id` Int32, `PromotionDefinitionid` Int32, `PromotionDefinitionName` Nullable(String), `CreateDate` Nullable(DateTime64), `Createby` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Master_PromotionQuestion + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Master_PromotionQuestion` + ( + `Id` Int64, `Project_id` Int32, `PromoQuestionId` Nullable(String), `PromoQuestionName` Nullable(String), `CreateDate` Nullable(DateTime64), `CreateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Master_SalesTerritory + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Master_SalesTerritory` + ( + `project_id` Int32, `StLayerOneId` Nullable(Int32), `StLayerOneCode` Nullable(String), `StLayerOneName` Nullable(String), `StLayerTwoId` Nullable(Int32), `StLayerTwoCode` Nullable(String), `StLayerTwoName` Nullable(String), `StLayerThreeId` Nullable(Int32), `StLayerThreeCode` Nullable(String), `StLayerThreeName` Nullable(String), `StLayerFourId` Nullable(Int32), `StLayerFourCode` Nullable(String), `StLayerFourName` Nullable(String), `CreateDate` Nullable(DateTime64), `CreateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Master_Salesterritorylayer + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Master_Salesterritorylayer` + ( + `Id` Int64, `ProjectId` Nullable(Int32), `StLayerOneId` Nullable(Int32), `StLayerOneName` Nullable(String), `StLayerTwoId` Nullable(Int32), `StLayerTwoName` Nullable(String), `StLayerThreeId` Nullable(Int32), `StLayerThreeName` Nullable(String), `StLayerFourId` Nullable(Int32), `StLayerFourName` Nullable(String), `CreateDate` Nullable(DateTime64), `CreateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Master_TrainingQuestionAnswer + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Master_TrainingQuestionAnswer` + ( + `QuestionId` Nullable(Int32), `Question` Nullable(String), `QuestionTypeId` Nullable(Int32), `QuestionType` Nullable(String), `AnswerId` Nullable(Int32), `Answer` Nullable(String), `RightAnswer` Nullable(UInt8), `CreateDate` Nullable(Date32), `CreateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Master_VisibilityDefinition + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Master_VisibilityDefinition` + ( + `Id` Int64, `Project_id` Int32, `VisibilityDefinitionid` Int32, `VisibilityDefinitionName` Nullable(String), `CreateDate` Nullable(DateTime64), `Createby` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Master_VisibilityReason + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Master_VisibilityReason` + ( + `Id` Int64, `ProjectId` Nullable(Int32), `MenuId` Nullable(Int32), `ReasonId` Nullable(Int32), `Reason` Nullable(String), `CreateDate` Nullable(DateTime64), `Createby` Nullable(String), `ReasonGroup` Nullable(String), `ReasonGroupID` Nullable(Int32) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Master_Window + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Master_Window` + ( + `Id` Int64, `ProjectId` Int32, `WindowId` Nullable(Int32), `WindowTypeId` Nullable(Int32), `WindowCode` Nullable(String), `WindowName` Nullable(String), `WindowRefImage` Nullable(String), `WindowIcon` Nullable(String), `WindowRefImagePopUp` Nullable(UInt8), `WindowSequence` Nullable(Int32), `CreateDate` Nullable(DateTime64), `CreateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Master_WindowDefinition + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Master_WindowDefinition` + ( + `Id` Int64, `project_id` Int32, `windowdefinitionid` Int32, `windowdefinitioncode` Nullable(String), `windowdefinitionname` Nullable(String), `CreateDate` Nullable(DateTime64), `Createby` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Master_WindowDefintion + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Master_WindowDefintion` + ( + `project_id` Int64, `windowdefinitionid` Int32, `windowid` Int32, `windowdefinitioncode` Nullable(String), `windowdefinitionname` Nullable(String), `CreateDate` Nullable(DateTime64), `createby` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Master_WindowQuestion + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Master_WindowQuestion` + ( + `Id` Int64, `Project_id` Int32, `WindowQuestionId` Int32, `WindowQuestionName` Nullable(String), `WindowQuestionTypeId` Nullable(Int32), `WindowQuestionType` Nullable(String), `CreateDate` Nullable(DateTime64), `Createby` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Master_WindowQuestionAnswer + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Master_WindowQuestionAnswer` + ( + `Id` Int64, `Project_id` Int32, `WindowQuestionId` Int32, `WindowAnswerId` Int32, `WindowAnswer` Nullable(String), `CreateDate` Nullable(DateTime64), `Createby` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : MissedCall + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`MissedCall` + ( + `Id` Int64, `ProjectId` Nullable(Int32), `Mid` Int64, `StoreId` Nullable(Int32), `EmpId` Nullable(Int32), `Visitdate` Nullable(Date32), `BrandId` Nullable(Int32), `Purchase` Nullable(UInt8), `NoPurchaseReason` Nullable(String), `SMSCode` Nullable(String), `SMSStatus` Nullable(String), `RejectReason` Nullable(String), `CreateDate` Nullable(Date32), `CreateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : MissedCall Target + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`MissedCall Target` + ( + `project_id` Int32, `store_id` Int32, `brand_id` Int32, `from_date` Date32, `to_date` Date32, `misscall_target` Int32, `update_date` Date32, `update_by` String, `ticket_id` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : mt_store_master + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`mt_store_master` + ( + `ID` Nullable(Float64), `insight_store_id` Nullable(String), `insight_store_id_old` Nullable(String), `country_id` Nullable(Float64), `country_code` Nullable(String), `country` Nullable(String), `region_id` Nullable(Float64), `region_code` Nullable(String), `region` Nullable(String), `state_id` Nullable(Float64), `state_code` Nullable(String), `state` Nullable(String), `city` Nullable(String), `cpm_city_id` Nullable(String), `tier_city` Nullable(String), `chain_type` Nullable(String), `keyaccount_old` Nullable(String), `keyaccount_cd` Nullable(String), `keyaccount` Nullable(String), `storetype` Nullable(String), `store_name` Nullable(String), `address` Nullable(String), `area` Nullable(String), `pincode` Nullable(Float64), `longitude` Nullable(Float64), `latitude` Nullable(Float64) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : my_subscriptions_ssrs + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`my_subscriptions_ssrs` + ( + `ProjectID` Int32, `ProjectName` String, `ReportName` Nullable(String), `ToEmailAddress` String, `CCEmailAddress` Nullable(String), `BccEmailAddress` Nullable(String), `ReplyToEmailAddress` Nullable(String), `IncludeReport` Nullable(UInt8), `RenderFormat` Nullable(String), `Priority` Nullable(String), `Subject` Nullable(String), `Comment` Nullable(String), `IncludeLink` Nullable(UInt8), `Active` Nullable(UInt8) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : OQaD + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`OQaD` + ( + `pk` Int32, `project_id` Int32, `employee_id` Int32, `process_id` Nullable(Int32), `visit_date` Date32, `question_category_id` Int32, `question_category` Nullable(String), `question_sub_category_id` Nullable(Int32), `question_sub_category` Nullable(String), `question_id` Int32, `question` Nullable(String), `answer_id` Nullable(Int32), `answer` Nullable(String), `correct_answer` Nullable(String), `update_date` Date32, `update_by` String, `designation_id` Nullable(Int32) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : OQaD Target + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`OQaD Target` + ( + `project_id` Int32, `project_name` String, `designation_id` Int32, `designation` String, `employee_role` String, `oqad_target` Int32, `from_date` Date32, `to_date` Date32 + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : OQaD_New + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`OQaD_New` + ( + `pk` Int32, `project_id` Int32, `employee_id` Int32, `process_id` Nullable(Int32), `visit_date` Date32, `question_category_id` Int32, `question_category` Nullable(String), `question_sub_category_id` Nullable(Int32), `question_sub_category` Nullable(String), `question_id` Int32, `question` Nullable(String), `answer_id` Nullable(Int32), `answer` Nullable(String), `correct_answer` Nullable(String), `Emp_Answer` Nullable(String), `update_date` Date32, `update_by` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Order + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Order` + ( + `Id` Int64, `Project_Id` Int32, `Mid` Nullable(Int64), `SuperVisorId` Int32, `EmpID` Int32, `StoreId` Int32, `ChainId` Int32, `ChannelId` Int32, `StoreTypeId` Int32, `VisitDate` Date32, `OrderId` Int32, `Present` Nullable(UInt8), `SystemPO` Nullable(String), `StorePO` Nullable(String), `ContactName` Nullable(String), `ContactNo` Nullable(String), `ProductId` Int32, `OrderQTY` Nullable(Int32), `Updatedate` Nullable(DateTime64), `UpdateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : OrderStatus + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`OrderStatus` + ( + `Id` Int64, `Project_Id` Int32, `Mid` Nullable(Int64), `SuperVisorId` Int32, `EmpID` Int32, `StoreId` Int32, `ChainId` Int32, `ChannelId` Int32, `StoreTypeId` Int32, `VisitDate` Date32, `OrderId` Int32, `SystemPO` Nullable(String), `StorePO` Nullable(String), `ContactName` Nullable(String), `ContactNo` Nullable(String), `Present` Nullable(UInt8), `ProductId` Int32, `OrderQTY` Nullable(Int32), `UpdateDate` Nullable(DateTime64), `UpdateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : PaidVisibility + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`PaidVisibility` + ( + `MID` Nullable(Int64), `pk` Int64, `project_id` Int32, `store_id` Int32, `employee_id` Int32, `visit_date` Date32, `supervisor_id` Int32, `channel_id` Int32, `chain_id` Int32, `storetype_id` Int32, `MenuId` Int32, `MenuName` String, `Visibility_Id` Nullable(Int32), `Visibility_Name` Nullable(String), `Visibility_definition_id` Nullable(Int32), `Visibility_definition_name` Nullable(String), `Visibility_deatils_id` Nullable(Int32), `Visibility_deatils` Nullable(String), `Visibility_value_name` Nullable(String), `Visibility_type` Nullable(String), `present` String, `ReasonId` Nullable(Int32), `reason` Nullable(String), `VisibilityQuestion` Nullable(String), `VisibilityAnswer` Nullable(String), `image1` Nullable(String), `image2` Nullable(String), `update_date` DateTime64, `update_by` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : PaidVisibility_Compliance + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`PaidVisibility_Compliance` + ( + `pk` Int64, `project_id` Int32, `store_id` Int32, `employee_id` Int32, `visit_date` Date32, `supervisor_id` Int32, `channel_id` Int32, `chain_id` Int32, `storetype_id` Int32, `visibility_id` Nullable(Int32), `visibility_name` Nullable(String), `visibility_definition_id` Nullable(Int32), `visibility_definition_name` Nullable(String), `question_id` Nullable(Int32), `question` Nullable(String), `question_answer` Nullable(String), `score` Nullable(Int32), `image1` Nullable(String), `image2` Nullable(String), `auditor_name` Nullable(String), `audit_date` Nullable(Date32), `audit_time` Nullable(String), `update_date` Date32, `update_by` String, `PaidVisibilityDetailsId` Nullable(Int32), `PaidVisibilityDetails` Nullable(String), `Paid_VisiValueName` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : PaidVisibility_Master + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`PaidVisibility_Master` + ( + `project_id` Int32, `store_id` Int32, `visibility_Id` Int32, `visibility_name` String, `CreateDate` DateTime64, `CreateBy` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Project_Master + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Project_Master` + ( + `project_id` Int32, `project_name` String, `project_channel_order` Nullable(Int32), `project_channel` Nullable(String), `project_type_order` Nullable(Int32), `project_type` Nullable(String), `project_status` Nullable(String), `start_date` Nullable(Date32), `end_date` Nullable(Date32) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Promotion + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Promotion` + ( + `MID` Nullable(Int64), `pk` Int64, `project_id` Int32, `store_id` Int32, `employee_id` Int32, `visit_date` Date32, `supervisor_id` Int32, `channel_id` Int32, `chain_id` Int32, `storetype_id` Int32, `promo_definition_id` Nullable(Int32), `promo_definition_name` Nullable(String), `promotion_deatils_id` Nullable(Int32), `promotion_deatils` Nullable(String), `promotion_value_id` Nullable(Int32), `promotion_value_name` Nullable(String), `promotion_type` Nullable(String), `present` Nullable(String), `reason` Nullable(String), `PromoQuestion` Nullable(String), `PromoAnswer` Nullable(String), `stock` Nullable(String), `pop` Nullable(String), `running` Nullable(String), `backing_sheet` Nullable(String), `promotion_status` Nullable(String), `actual_price` Nullable(Float64), `offer_price` Nullable(Float64), `image1` Nullable(String), `image2` Nullable(String), `update_date` DateTime64, `update_by` String, `ReasonId` Nullable(Int32), `AssortmentStatus` Nullable(String), `SellingPrice` Nullable(String), `Actual Selling Price` Nullable(String), `SellingPriceGap` Nullable(String), `PromotionOfferStatus` Nullable(String), `Stock Available?` Nullable(String), `Promo Talker Available?` Nullable(String), `Stock Available?-Image` Nullable(String), `Promo Talker Available?-Image` Nullable(String), `msl` Nullable(Int32), `ArticleCode` Nullable(String), `StockQty` Nullable(Int32), `mbq` Nullable(Int32), `PromoQuestionId` Nullable(Int32) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : record count + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`record count` + ( + `Project ID` Nullable(Int32), `KPI Name` Nullable(String), `Visit_Date` Nullable(Date32), `Record Count` Nullable(Int32), `Update Date` Nullable(Date32), `Update Time` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Report_Configuration + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Report_Configuration` + ( + `project_id` Int32, `project_name` String, `logo_url` Nullable(String), `canvas_bg` Nullable(String), `wallpaper_bg` Nullable(String), `column_bar1` Nullable(String), `column_bar2` Nullable(String), `title_text` Nullable(String), `title_bg` Nullable(String), `line_colour` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : report_users + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`report_users` + ( + `project_id` Int32, `project_name` String, `user_email_id` String, `user_name` String, `region_id` Int32, `state_id` Int32, `chain_id` Int32, `user_status` String, `report_type` String, `user_company` String, `update_date` Date32, `update_by` String, `ticket_id` Nullable(String), `start_date` Nullable(Date32), `end_date` Nullable(Date32) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Reports Catalog + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Reports Catalog` + ( + `ID` Nullable(Int32), `KPI` Nullable(String), `ReportName` Nullable(String), `ReportDetail` Nullable(String), `ReportPath` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Sales + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Sales` + ( + `Id` Int64, `Project_Id` Int32, `Mid` Nullable(Int64), `SuperVisorId` Int32, `EmpID` Int32, `StoreId` Int32, `ChainId` Int32, `ChannelId` Int32, `StoreTypeId` Int32, `VisitDate` Date32, `ProductId` Int32, `MSL` Int32, `PTR` Float64, `MRP` Float64, `Sale` Int32, `Value` Float64, `CreateDate` DateTime64, `CreateBy` String, `SalesType` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Sales_Category + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Sales_Category` + ( + `Project_Id` Nullable(Int32), `Mid` Nullable(Int64), `SuperVisorId` Nullable(Int32), `EmpID` Nullable(Int32), `StoreId` Nullable(Int32), `ChainId` Nullable(Int32), `ChannelId` Nullable(Int32), `StoreTypeId` Nullable(Int32), `VisitDate` Nullable(Date32), `HeaderDetails` Nullable(String), `HeaderDetailsID` Nullable(Int32), `MSL` Nullable(Int32), `PTR` Nullable(Float64), `MRP` Nullable(Float64), `SaleQty` Nullable(Int32), `Sales_Value` Nullable(Float64), `SalesType` Nullable(String), `CreateDate` Nullable(DateTime64), `CreateBy` Nullable(String), `ticket_id` Nullable(Int64) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Sales_External + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Sales_External` + ( + `Id` Int64, `Project_Id` Int32, `Store_Id` Int32, `Emp_id` Int32, `Category_Id` Int32, `SubCategory_Id` Int32, `Visit_Date` Nullable(Date32), `Product_id` Int32, `MSL` Int32, `PTR` Float64, `MRP` Float64, `SalesQty` Int32, `SalesValue` Float64, `SalesType` String, `CreateDate` DateTime64, `CreateBy` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Sales_POS + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Sales_POS` + ( + `Project_Id` Int32, `Mid` Int64, `SuperVisorId` Int32, `EmpID` Int32, `StoreId` Int32, `ChainId` Int32, `ChannelId` Int32, `StoreTypeId` Int32, `VisitDate` Date32, `ProductId` Int32, `MSL` Nullable(Int32), `PTR` Float64, `MRP` Nullable(Float64), `SaleQty` Float64, `Sales_Value` Nullable(Float64), `SalesType` String, `CreateDate` DateTime64, `CreateBy` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Sales_Target_Store + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Sales_Target_Store` + ( + `Id` Int64, `Project_Id` Int32, `Store_Id` Int32, `From_Date` Date32, `To_Date` Date32, `Sales_Target_Value` Float64, `Sales_Target_Volume` Int32, `CreateDate` DateTime64, `CreateBy` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : SalesFocusPackTarget + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`SalesFocusPackTarget` + ( + `Id` Int64, `project_id` Int32, `store_id` Int32, `focus_pack_name` String, `product_id` Int32, `value_target` Float64, `target_type` String, `from_date` Date32, `to_date` Date32, `CreateDate` Date32, `CreateBy` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : SalesTarget + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`SalesTarget` + ( + `Id` Int64, `project_id` Int32, `store_id` Int32, `category_id` Int32, `from_date` Date32, `to_date` Date32, `sales_target_value` Float64, `sales_target_volume` Int32, `CreateDate` DateTime64, `CreateBy` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : SalesTargetSubCategory + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`SalesTargetSubCategory` + ( + `Id` Int64, `project_id` Int32, `store_id` Int32, `subcategory_id` Int32, `from_date` Date32, `to_date` Date32, `sales_target_value` Float64, `sales_target_volume` Int32, `CreateDate` DateTime64, `CreateBy` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : SKU Master + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`SKU Master` + ( + `pk` Int32, `project_id` Int32, `category_id` Nullable(Int32), `category_code` Nullable(String), `Category_name` Nullable(String), `sub_category_id` Nullable(Int32), `sub_category_code` Nullable(String), `sub_category_name` Nullable(String), `brand_id` Nullable(Int32), `brand_code` Nullable(String), `brand_name` Nullable(String), `sub_brand_id` Nullable(Int32), `sub_brand_code` Nullable(String), `sub_brand_name` Nullable(String), `product_id` Nullable(Int32), `product_name` Nullable(String), `product_code` Nullable(String), `parent_product_id` Nullable(String), `parent_product_name` Nullable(String), `pack_id` Nullable(String), `pack_name` Nullable(String), `division_id` Nullable(String), `division_name` Nullable(String), `mrp` Nullable(Float64), `flavour_id` Nullable(Int32), `flavour` Nullable(String), `grammage` Nullable(String), `product_sequence` Nullable(Int32), `case_size` Nullable(Float64), `product_wgt_type` Nullable(String), `company_name` Nullable(String), `is_competitor` Nullable(UInt8), `ptr` Nullable(Float64), `update_date` Nullable(Date32), `update_by` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : SOS_IR + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`SOS_IR` + ( + `pk` Int32, `project_id` Int32, `MID` Nullable(Int64), `employee_id` Int32, `store_id` Int32, `visit_date` Date32, `storetype_id` Nullable(Int32), `channel_id` Nullable(Int32), `SOSHeaderDeatils` Nullable(String), `SOSHeaderID` Int32, `SOSHeaderName` Nullable(String), `Total_Base_Length` Nullable(Float64), `Total_Product_Length` Nullable(Float64), `Target` Nullable(Float64), `update_date` Date32, `update_by` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : SOS_OneApp + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`SOS_OneApp` + ( + `pk` Int32, `project_id` Int32, `MID` Nullable(Int64), `employee_id` Int32, `store_id` Int32, `visit_date` Date32, `storetype_id` Nullable(Int32), `channel_id` Nullable(Int32), `SOSDefinitionName` Nullable(String), `SOSHeaderDeatils` Nullable(String), `SOSHeaderName` Nullable(String), `SOSHeaderID` Int32, `SOSChildDeatils` Nullable(String), `SOSChildName` Nullable(String), `SOSChildID` Int32, `SOSHeaderFacing` Nullable(Float64), `ChildTotalFacing` Nullable(Float64), `ChildSelfFacing` Nullable(Float64), `SOSTarget` Nullable(Float64), `update_date` Date32, `update_by` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Stock_Details + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Stock_Details` + ( + `pk` Int32, `project_id` Int32, `MID` Nullable(Int64), `supervisor_id` Int32, `employee_id` Int32, `store_id` Int32, `VisitDate` Nullable(Date32), `storetype_id` Int32, `store_category_id` Nullable(Int32), `product_id` Int32, `MSL` String, `MBQ` Int32, `opening_stock` Nullable(Int32), `mid_day_stock` Nullable(Int32), `closing_stock` Nullable(Int32), `Stock_Qty` Int32, `offtake` Nullable(Int32), `damagedstock` Nullable(Int32), `loststock` Nullable(Int32), `expirystock` Nullable(Int32), `skuavailability` String, `update_date` Date32, `update_by` String, `StockType` Nullable(String), `GroupId` Nullable(Int32) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Stock_Details_IR + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Stock_Details_IR` + ( + `pk` Int32, `project_id` Int32, `MID` Nullable(Int64), `supervisor_id` Int32, `employee_id` Int32, `store_id` Int32, `VisitDate` Nullable(Date32), `storetype_id` Int32, `store_category_id` Nullable(Int32), `Product_Id` Nullable(Int32), `MSL` Nullable(Int32), `MBQ` Nullable(Int32), `Stock_Qty` Nullable(Int32), `skuavailability` Nullable(String), `StockType` Nullable(String), `update_date` Date32, `update_by` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Store_Master + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Store_Master` + ( + `project_id` Int64, `project_name` Nullable(String), `region_id` Int64, `region` String, `state_id` Int64, `state` String, `city_id` Nullable(Int64), `city` Nullable(String), `cpm_city_id` Nullable(String), `channel_id` Nullable(Int64), `channel` Nullable(String), `distributor_id` Nullable(Int64), `distributor_name` Nullable(String), `keyaccount_id` Nullable(Int64), `keyaccount` Nullable(String), `insight_store_id` Nullable(String), `client_store_code` Nullable(String), `asm_area_id` Nullable(String), `asm_area_name` Nullable(String), `so_bde_area_id` Nullable(String), `so_bde_area` Nullable(String), `longitude` Nullable(Float64), `latitude` Nullable(Float64), `store_category_id` Nullable(Int64), `store_category` Nullable(String), `store_type_id` Nullable(Int64), `store_type` Nullable(String), `store_classification_id` Nullable(Int64), `store_classification` Nullable(String), `StLayerFourId` Nullable(Int32), `store_id` Int64, `store_name` String, `address` Nullable(String), `pin_code` Nullable(String), `is_pharmacy_store` Nullable(String), `Unique_Store_ID` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Store_Type + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Store_Type` + ( + `project_id` Int32, `store_type_id` Int32, `store_type` String, `cpm_store_type_id` Int32, `cpm_store_type` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Survey + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Survey` + ( + `Id` Int64, `Project_Id` Nullable(Int32), `Mid` Nullable(Int64), `SuperVisorId` Nullable(Int32), `EmpID` Nullable(Int32), `StoreId` Nullable(Int32), `VisitDate` Nullable(Date32), `StoreTypeId` Nullable(Int32), `ChainId` Nullable(Int32), `CategoryId` Nullable(Int32), `Category` Nullable(String), `SubCategoryId` Nullable(Int32), `SubCategory` Nullable(String), `SurveyId` Nullable(Int32), `SurveyName` Nullable(String), `QuestionId` Nullable(Int32), `Question` Nullable(String), `Answer` Nullable(String), `CreateDate` Nullable(DateTime64), `CreateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Survey Target + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Survey Target` + ( + `project_id` Int32, `store_id` Int32, `survey_id` Nullable(Int32), `survey_name` Nullable(String), `demo_target` Int32, `conversion_target` Int32, `demo_target_days` Int32, `total_demo_target` Nullable(Int32), `from_date` Date32, `to_date` Date32, `ticket_id` Nullable(String), `CreateDate` Nullable(DateTime64), `CreateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : SVG Fluent Icons + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`SVG Fluent Icons` + ( + `id` Nullable(Int32), `icon_name` Nullable(String), `image_url` Nullable(String), `icon_style` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : sysdiagrams + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`sysdiagrams` + ( + `name` String, `principal_id` Int32, `diagram_id` Int32, `version` Nullable(Int32), `definition` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : TEMP_POSALEDELETEUPDATE + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`TEMP_POSALEDELETEUPDATE` + ( + `ID` Int64, `ProjectId` Int32, `MID` Int64, `PRODUCTID` Int64, `SALEQTY` Nullable(Int32), `SALEVALUE` Nullable(Float64) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Web Logins + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Web Logins` + ( + `Id` Int64, `project_id` Int32, `supervisor_id` Int32, `supervisor_name` String, `emp_id` Int32, `employee_name` String, `designation` String, `date` Date32, `time` String, `activity_name` String, `activity_type` String, `right_name` String, `CreateDate` Nullable(DateTime64), `CreateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : weightage_pss + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`weightage_pss` + ( + `project_id` Nullable(Int32), `key_account_id` Nullable(Int32), `key_account_name` Nullable(String), `pss_case` Nullable(Int32), `pss_calculation_options` Nullable(String), `pss_calculation_sub_options` Nullable(String), `kpi_name` Nullable(String), `kpi_weightage` Nullable(Float64), `osa_present` Nullable(UInt8), `sos_present` Nullable(UInt8), `promo_present` Nullable(UInt8), `paid_visibility_present` Nullable(UInt8), `from_date` Nullable(Date32), `to_date` Nullable(Date32), `remarks` Nullable(String), `update_date` Nullable(Date32), `update_by` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Window_Compliance + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Window_Compliance` + ( + `pk` Int64, `project_id` Int32, `store_id` Int32, `employee_id` Int32, `visit_date` Date32, `supervisor_id` Int32, `channel_id` Int32, `chain_id` Int32, `storetype_id` Int32, `window_id` Nullable(Int32), `window_name` Nullable(String), `window_definition_id` Nullable(Int32), `window_definition_name` Nullable(String), `question_id` Nullable(Int32), `question` Nullable(String), `question_answer` Nullable(String), `score` Nullable(Int32), `image1` Nullable(String), `image2` Nullable(String), `auditor_name` Nullable(String), `audit_date` Nullable(Date32), `audit_time` Nullable(String), `update_date` Date32, `update_by` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Window_Execution + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Window_Execution` + ( + `Id` Int64, `ProjectId` Int32, `MID` Nullable(Int64), `StoreId` Int32, `EMPID` Int32, `VisitDate` Date32, `SupervisorId` Int32, `ManagerId` Nullable(Int32), `RegionId` Nullable(Int32), `StateId` Nullable(Int32), `CityId` Nullable(Int32), `ChainId` Nullable(Int32), `ChannelId` Nullable(Int32), `StoreTypeId` Nullable(Int32), `StoreCategoryId` Nullable(Int32), `StoreClassId` Nullable(Int32), `DistributorId` Nullable(Int32), `WindowId` Nullable(Int32), `WindowName` Nullable(String), `WindowDefinitionId` Nullable(Int32), `WindowDefinitionName` Nullable(String), `WindowDetailsId` Nullable(Int32), `WindowDetails` Nullable(String), `WindowValueName` Nullable(String), `MenuId` Nullable(Int32), `Menuname` Nullable(String), `Present` Nullable(String), `ReasonId` Nullable(Int16), `Reason` Nullable(String), `Image1` Nullable(String), `Image2` Nullable(String), `Updatedate` Nullable(DateTime64), `UpdateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : WindowCategory_Compliance_Parameter + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`WindowCategory_Compliance_Parameter` + ( + `project_id` Int32, `storetype_id` Int32, `storetype` String, `compliance_type` String, `window_definition_id` Int32, `window_definition_name` String, `question_id` Int32, `question` String, `expected_answer` String, `comparision_type` String, `from_date` Date32, `to_date` Nullable(Date32), `update_date` Date32, `update_by` String, `ticket_id` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : WindowCategory_Compliance_Target + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`WindowCategory_Compliance_Target` + ( + `project_id` Int32, `store_type_id` Int32, `comp_target` Int32, `from_date` Date32, `to_date` Nullable(Date32) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : WindowCheklist + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`WindowCheklist` + ( + `Id` Int64, `ProjectId` Int32, `StoreId` Int32, `EMPID` Int32, `VisitDate` Date32, `SupervisorId` Nullable(Int32), `ManagerId` Nullable(Int32), `RegionId` Nullable(Int32), `StateId` Nullable(Int32), `CityId` Nullable(Int32), `ChainId` Nullable(Int32), `ChannelId` Nullable(Int32), `StoreTypeId` Nullable(Int32), `StoreCategoryId` Nullable(Int32), `StoreClassId` Nullable(Int32), `DistributorId` Nullable(Int32), `WindowDefinitionId` Nullable(Int32), `WindowDetailsId` Nullable(Int32), `WindowDetails` Nullable(String), `WindowValueName` Nullable(String), `WindowQuestionId` Nullable(Int32), `WindowQuestionName` Nullable(String), `WindowAnswerId` Nullable(Int32), `WindowAnswername` Nullable(String), `Updatedate` Nullable(DateTime64), `UpdateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : _Login_Backup + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`_Login_Backup` + ( + `pk` Int32, `project_id` Int32, `employee_id` Int32, `login_date` Date32, `login_time` String, `process_id` Nullable(Int32), `first_store_in_time` Nullable(String), `last_store_out_time` Nullable(String), `update_date` Date32, `update_by` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : additional_visibility + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`additional_visibility` + ( + `Id` Int64, `project_id` Int32, `Mid` Nullable(Int64), `emp_id` Int32, `store_id` Int32, `storetype_id` Int32, `channel_id` Int32, `chain_id` Int32, `camera_allowed` String, `visit_date` Date32, `is_present` String, `brand_id` Int32, `display_id` Int32, `Remarks` Nullable(String), `image_url` Nullable(String), `created_date` Date32, `created_by` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Attendance + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Attendance` + ( + `MID` Nullable(Int64), `pk` Int32, `project_id` Int32, `employee_id` Int32, `position_code` Nullable(String), `legacy_code` Nullable(String), `supervisor_id` Int32, `date_of_join` Nullable(Date32), `date_of_resign` Nullable(Date32), `visit_date` Date32, `parinaam_attendance` String, `hr_attendance` Nullable(String), `field_team_attendance` Nullable(String), `remarks` Nullable(String), `update_date` Date32, `update_by` String, `Unique_Id` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Attendance Codes + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Attendance Codes` + ( + `ID` Int32, `Code` String, `Remarks` String, `Present` Float64, `Leave` Float64, `Absent` Float64, `Target` Float64 + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Attendance_Sup + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Attendance_Sup` + ( + `Id` Int64, `Project_Id` Nullable(Int32), `EmpId` Nullable(Int32), `UserName` Nullable(String), `Position_Code` Nullable(String), `Legacy_code` Nullable(String), `CityId` Nullable(Int32), `DesignationId` Nullable(Int32), `DOJ` Nullable(Date32), `DOR` Nullable(Date32), `VisitDate` Nullable(Date32), `Parinaam_Attendance` Nullable(String), `UpdateDate` Nullable(Date32), `UpdateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : bu_leads + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`bu_leads` + ( + `project_id` Nullable(Int32), `project_name` Nullable(String), `email_id` Nullable(String), `bu_name` Nullable(String), `user_status` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Category_Compliance + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Category_Compliance` + ( + `pk` Int64, `project_id` Int32, `store_id` Int32, `employee_id` Int32, `visit_date` Date32, `supervisor_id` Int32, `channel_id` Int32, `chain_id` Int32, `storetype_id` Int32, `category_id` Nullable(Int32), `category_name` Nullable(String), `category_definition_id` Nullable(Int32), `category_definition_name` Nullable(String), `question_id` Nullable(Int32), `question` Nullable(String), `question_answer` Nullable(String), `score` Nullable(Int32), `image1` Nullable(String), `image2` Nullable(String), `auditor_name` Nullable(String), `audit_date` Nullable(Date32), `audit_time` Nullable(String), `update_date` Date32, `update_by` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Category_Execution + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Category_Execution` + ( + `Id` Int64, `ProjectId` Int32, `MID` Nullable(Int64), `StoreId` Int32, `EMPID` Int32, `VisitDate` Date32, `SupervisorId` Int32, `ManagerId` Nullable(Int32), `RegionId` Nullable(Int32), `StateId` Nullable(Int32), `CityId` Nullable(Int32), `ChainId` Nullable(Int32), `ChannelId` Nullable(Int32), `StoreTypeId` Nullable(Int32), `StoreCategoryId` Nullable(Int32), `StoreClassId` Nullable(Int32), `DistributorId` Nullable(Int32), `CategoryId` Nullable(Int32), `CategoryName` Nullable(String), `CategoryDefinitionId` Nullable(Int32), `CategoryDefinitionName` Nullable(String), `Present` Nullable(String), `ReasonId` Nullable(Int16), `Reason` Nullable(String), `Image1` Nullable(String), `Image2` Nullable(String), `Updatedate` Nullable(DateTime64), `UpdateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : chain_type + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`chain_type` + ( + `project_id` Int32, `chain_id` Int32, `chain_name` String, `chain_type` String, `storetype_id` Nullable(Int32), `storetype_name` Nullable(String), `display_order` Nullable(Int32), `created_date` Date32, `created_by` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : ChatBot + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`ChatBot` + ( + `Id` Int64, `Project_Id` Int32, `Mid` Nullable(Int64), `SuperVisorId` Int32, `EmpID` Int32, `StoreId` Int32, `ChainId` Int32, `ChannelId` Int32, `StoreTypeId` Int32, `StoreCategoryId` Int32, `StoreClassId` Int32, `VisitDate` Date32, `OTP` Nullable(String), `OTP_Exist` Nullable(UInt8), `CreateDate` DateTime64, `CreateBy` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : ChatBot_Data + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`ChatBot_Data` + ( + `Id` Int64, `ProjectId` Int32, `MobileNo` Nullable(String), `Q1` Nullable(String), `Q2` Nullable(String), `CouponCode` Nullable(String), `DateAndTime` Nullable(String), `Createdate` Nullable(DateTime64), `CreateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : ChatBot_Data_ROW + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`ChatBot_Data_ROW` + ( + `Id` Int64, `ProjectId` Int32, `TimeStamp` Nullable(String), `MobileNo` Nullable(String), `UserName` Nullable(String), `StartSurvey` Nullable(String), `AgeGroup` Nullable(String), `Experiencesensitivity` Nullable(String), `UseSensodyne` Nullable(String), `RandomCode` Nullable(String), `ConsiderPurchasingSensodyne` Nullable(String), `Q1` Nullable(String), `Q2` Nullable(String), `InsertTimeStamp` Nullable(DateTime64), `Createdate` Nullable(DateTime64), `CreateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Comp_visibility + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Comp_visibility` + ( + `Id` Int64, `project_id` Int32, `Mid` Nullable(Int64), `emp_id` Int32, `store_id` Int32, `storetype_id` Int32, `channel_id` Int32, `chain_id` Int32, `camera_allowed` String, `visit_date` Date32, `is_present` String, `brand_id` Int32, `display_id` Int32, `Remarks` Nullable(String), `image_url` Nullable(String), `created_date` Date32, `created_by` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Contact Conversion + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Contact Conversion` + ( + `Id` Int64, `project_id` Int32, `Mid` Nullable(Int64), `emp_id` Int32, `store_id` Int32, `storetype_id` Int32, `channel_id` Int32, `chain_id` Int32, `visit_date` Date32, `total_contact` Int32, `total_convert` Int32, `created_date` Date32, `created_by` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Coverage + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Coverage` + ( + `pk` Int32, `project_id` Int32, `store_id` Int32, `employee_id` Int32, `visit_date` Date32, `in_time` Nullable(String), `out_time` Nullable(String), `duration_in_minutes` Nullable(Int32), `is_covered` Nullable(String), `is_executed` Nullable(String), `reason_remarks` Nullable(String), `detailed_reason_remarks` Nullable(String), `storetype_id` Nullable(Int32), `asm_area_id` Nullable(String), `supervisor_id` Nullable(Int32), `coverage_type` Nullable(String), `distance_in_meters` Nullable(Float64), `update_date` Date32, `update_by` String, `reasonId` Nullable(Int32), `camera_allow` Nullable(UInt8), `MID` Nullable(Int64), `data_upload_status` Nullable(String), `app_time` Nullable(String), `app_version` Nullable(Float64), `checkout_time` Nullable(String), `Unique_Id` Nullable(String), `Unique_EmpID` Nullable(String), `Unique_StoreID` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : coverage_remarks + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`coverage_remarks` + ( + `Id` Int64, `project_id` Int32, `reason_id` Int32, `reason_remarks` String, `detailed_reason_remarks` Nullable(String), `reason_type` Nullable(String), `reason_type_id` Nullable(Int32) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Coverage_Sup + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Coverage_Sup` + ( + `Id` Int64, `Project_Id` Nullable(Int32), `Mid` Int64, `StoreId` Nullable(Int32), `EmpId` Nullable(Int32), `MerchnadiserId` Nullable(Int32), `Visitdate` Nullable(Date32), `InTime` Nullable(String), `OutTime` Nullable(String), `duration_in_minutes` Nullable(Int32), `Latitude` Nullable(Float64), `Longitude` Nullable(Float64), `ReasonId` Nullable(Int32), `CityId` Nullable(Int32), `ChainId` Nullable(Int32), `StoretypeId` Nullable(Int32), `StoreCategoryId` Nullable(Int32), `StoreClassId` Nullable(Int32), `Deviation` Nullable(Int32), `UploadStatus` Nullable(String), `CheckInImage` Nullable(String), `AppVersion` Nullable(String), `is_covered` Nullable(String), `is_executed` Nullable(String), `camera_allow` Nullable(UInt8), `UpdateDate` Nullable(Date32), `UpdateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : cpm_city_master + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`cpm_city_master` + ( + `id` Int32, `cpm_city_code` String, `cpm_city_code_old` Nullable(String), `city` String, `state_id` Int32, `state_code` String, `state` String, `region_id` Int32, `region_code` String, `region` String, `country_id` Nullable(Int32), `country_code` Nullable(String), `country` Nullable(String), `alternate_city_name` Nullable(String), `type_of_city` Nullable(String), `tier_type` Nullable(String), `parent_city_district` Nullable(String), `population` Nullable(String), `share_point_list_id` Nullable(Int32) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : cpm_store_type + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`cpm_store_type` + ( + `store_type_id` Nullable(Int32), `store_type` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : dax_generator + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`dax_generator` + ( + `english_query` Nullable(String), `dax_code` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : display_master + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`display_master` + ( + `Id` Int64, `project_id` Int32, `display_id` Int32, `display_code` Nullable(String), `display_name` String, `display_ref_url` Nullable(String), `created_date` Date32, `created_by` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : employee_daily_wages + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`employee_daily_wages` + ( + `project_id` Int32, `project_name` String, `designation_id` Int32, `designation` String, `employee_role` String, `daily_wages` Float64, `from_date` Date32, `to_date` Nullable(Date32) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : employee_grooming + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`employee_grooming` + ( + `pk` Nullable(Int32), `project_id` Nullable(Int32), `employee_id` Nullable(Int32), `designation` Nullable(String), `supervisor_id` Nullable(Int32), `visit_date` Nullable(Date32), `grooming_name` Nullable(String), `audit_status` Nullable(String), `audit_reason_id` Nullable(Int32), `reason` Nullable(String), `image_url_1` Nullable(String), `image_url_2` Nullable(String), `image_url_3` Nullable(String), `image_url_4` Nullable(String), `image_url_5` Nullable(String), `image_url_6` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Employee_Master + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Employee_Master` + ( + `project_id` Int64, `region_id` Nullable(Int64), `region` Nullable(String), `state_id` Nullable(Int64), `state` Nullable(String), `city_id` Nullable(Int64), `city` Nullable(String), `employee_id` Int64, `employee_name` String, `gender` Nullable(String), `employee_type` Nullable(String), `designation_id` Nullable(Int64), `designation` Nullable(String), `employee_role` Nullable(String), `manager_id` Nullable(Int64), `manager_name` Nullable(String), `employee_legacy_code` Nullable(String), `employee_joining_date` Nullable(Date32), `employee_resign_date` Nullable(Date32), `employee_status` Nullable(String), `position_code` Nullable(String), `employee_working_role` Nullable(String), `Unique_Employee_ID` Nullable(String), `channel_id` Nullable(Int32), `channel_name` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : exceptions + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`exceptions` + ( + `project_id` Int32, `kpi_name` String, `table_name` String, `column_name` String, `column_value` Int32, `from_date` Date32, `to_date` Nullable(Date32) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : GyanCast_Data + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`GyanCast_Data` + ( + `Id` Int32, `ProjectId` Nullable(Int32), `ProjectName` Nullable(String), `EmpId` Nullable(Int32), `EmployeeName` Nullable(String), `Designation` Nullable(String), `PlayDuration` Nullable(String), `TrainingStatus` Nullable(String), `TId` Nullable(Int32), `TrainingId` Nullable(Int32), `Topic` Nullable(String), `CompleteDate` Nullable(Date32), `TrainingContentId` Nullable(Int32), `QuestionId` Nullable(Int32), `Question` Nullable(String), `AnswerId` Nullable(Int32), `Answer` Nullable(String), `RightAnswer` Nullable(UInt8), `CreateDate` Nullable(Date32), `CreateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : GyanCast_Master_Language + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`GyanCast_Master_Language` + ( + `pk` Int32, `LanguageId` Int32, `Language` Nullable(String), `UploadDate` Nullable(DateTime64) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : GyanCast_Master_MediaType + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`GyanCast_Master_MediaType` + ( + `pk` Int32, `MediaTypeId` Nullable(Int32), `MediaType` Nullable(String), `UploadDate` Nullable(DateTime64) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : GyanCast_Master_Training + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`GyanCast_Master_Training` + ( + `pk` Int32, `TrainingId` Nullable(Int32), `MediaTypeId` Nullable(Int32), `Topic` Nullable(String), `Description` Nullable(String), `StartDate` Nullable(Date32), `EndDate` Nullable(Date32), `TrainingNo` Nullable(String), `UploadDate` Nullable(DateTime64) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : GyanCast_Master_TrainingDocs + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`GyanCast_Master_TrainingDocs` + ( + `pk` Int32, `TrainingContentId` Nullable(Int32), `TrainingId` Nullable(Int32), `LanguageId` Nullable(Int32), `TrainingUrl` Nullable(String), `Duration` Nullable(Float64), `Thumnail` Nullable(String), `UploadDate` Nullable(DateTime64) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : GyanCast_Master_TrainingQuestion + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`GyanCast_Master_TrainingQuestion` + ( + `pk` Int32, `QuestionId` Nullable(Int32), `Question` Nullable(String), `QuestionTypeId` Nullable(Int32), `TrainingId` Nullable(Int32), `UploadDate` Nullable(DateTime64) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : GyanCast_Master_TrainingQuestionAnswer + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`GyanCast_Master_TrainingQuestionAnswer` + ( + `pk` Int32, `AnswerId` Nullable(Int32), `Answer` Nullable(String), `QuestionId` Nullable(Int32), `RightAnswer` Nullable(UInt8), `UploadDate` Nullable(DateTime64) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Gyancast_Training + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Gyancast_Training` + ( + `pk` Int32, `project_id` Nullable(Int32), `TrainingId` Nullable(Int32), `MediaTypeId` Nullable(Int32), `TrainingContentId` Nullable(Int32), `LanguageId` Nullable(Int32), `TrainingUrl` Nullable(String), `Duration` Nullable(Float64), `CompleteDate` Nullable(Date32), `EmpId` Nullable(Int32), `Designation` Nullable(String), `PlayDuration` Nullable(String), `TrainingStatus` Nullable(String), `VideoAudioStatus` Nullable(String), `UploadDate` Nullable(DateTime64) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Gyancast_TrainingQues + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Gyancast_TrainingQues` + ( + `pk` Int32, `project_id` Nullable(Int32), `TrainingId` Nullable(Int32), `TrainingNo` Nullable(String), `Topic` Nullable(String), `Description` Nullable(String), `StartDate` Nullable(Date32), `EndDate` Nullable(Date32), `TrainingContentId` Nullable(Int32), `TrainingUrl` Nullable(String), `Duration` Nullable(Float64), `CompleteDate` Nullable(Date32), `EmpId` Nullable(Int32), `Designation` Nullable(String), `PlayDuration` Nullable(String), `TrainingStatus` Nullable(String), `QuestionId` Nullable(Int32), `Question` Nullable(String), `AnswerId` Nullable(Int32), `Answer` Nullable(String), `RightAnswer` Nullable(Int32), `UploadDate` Nullable(DateTime64) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Head Count + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Head Count` + ( + `project_id` Int32, `project_name` Nullable(String), `channel_id` Nullable(Int32), `Channel` String, `region_id` Int32, `region_name` String, `position_code` String, `designation_id` Int32, `designation_name` String, `designation_code` String, `position_code_new` String, `Status` String, `start_date` Date32, `end_date` Nullable(Date32), `employee_role` String, `is_temp_code` Int32, `update_date` Nullable(Date32), `update_by` Nullable(String), `ticket_id` Nullable(String), `reference_store_id` Nullable(Int32) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : HulTea_Attendance + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`HulTea_Attendance` + ( + `MID` Nullable(Int64), `pk` Int32, `project_id` Int32, `employee_id` Int32, `position_code` Nullable(String), `legacy_code` Nullable(String), `supervisor_id` Int32, `date_of_join` Nullable(Date32), `date_of_resign` Nullable(Date32), `visit_date` Date32, `parinaam_attendance` String, `hr_attendance` Nullable(String), `field_team_attendance` Nullable(String), `remarks` Nullable(String), `update_date` Date32, `update_by` String, `Unique_Id` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : HulTea_Coverage + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`HulTea_Coverage` + ( + `pk` Int32, `project_id` Int32, `store_id` Int32, `employee_id` Int32, `visit_date` Date32, `in_time` Nullable(String), `out_time` Nullable(String), `duration_in_minutes` Nullable(Int32), `is_covered` Nullable(String), `is_executed` Nullable(String), `reason_remarks` Nullable(String), `detailed_reason_remarks` Nullable(String), `storetype_id` Nullable(Int32), `asm_area_id` Nullable(String), `supervisor_id` Nullable(Int32), `coverage_type` Nullable(String), `distance_in_meters` Nullable(Float64), `update_date` Date32, `update_by` String, `reasonId` Nullable(Int32), `camera_allow` Nullable(UInt8), `MID` Nullable(Int64), `data_upload_status` Nullable(String), `app_time` Nullable(String), `app_version` Nullable(Float64), `checkout_time` Nullable(String), `Unique_Id` Nullable(String), `Unique_EmpID` Nullable(String), `Unique_StoreID` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : HulTea_Journey_Plan + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`HulTea_Journey_Plan` + ( + `Id` Int64, `project_id` Int32, `store_id` Int32, `employee_id` Int32, `visit_date` Date32, `process_id` Nullable(Int32), `CreateDate` Date32, `CreateBy` Nullable(String), `UpdateDate` Date32, `UpdateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : HulTea_Login + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`HulTea_Login` + ( + `pk` Int32, `project_id` Int32, `employee_id` Int32, `login_date` Date32, `login_time` String, `process_id` Nullable(Int32), `first_store_in_time` Nullable(String), `last_store_out_time` Nullable(String), `update_date` Date32, `update_by` String, `Unique_Id` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : HulTea_MissedCall + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`HulTea_MissedCall` + ( + `Id` Int64, `ProjectId` Nullable(Int32), `Mid` Int64, `StoreId` Nullable(Int32), `EmpId` Nullable(Int32), `Visitdate` Nullable(Date32), `BrandId` Nullable(Int32), `Purchase` Nullable(UInt8), `NoPurchaseReason` Nullable(String), `SMSCode` Nullable(String), `SMSStatus` Nullable(String), `RejectReason` Nullable(String), `CreateDate` Nullable(Date32), `CreateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : HulTea_Sales + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`HulTea_Sales` + ( + `Id` Int64, `Project_Id` Int32, `Mid` Nullable(Int64), `SuperVisorId` Int32, `EmpID` Int32, `StoreId` Int32, `ChainId` Int32, `ChannelId` Int32, `StoreTypeId` Int32, `VisitDate` Date32, `ProductId` Int32, `MSL` Int32, `PTR` Float64, `MRP` Float64, `Sale` Int32, `Value` Float64, `CreateDate` DateTime64, `CreateBy` String, `SalesType` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : HulTea_Stock_Details + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`HulTea_Stock_Details` + ( + `pk` Int32, `project_id` Int32, `MID` Nullable(Int64), `supervisor_id` Int32, `employee_id` Int32, `store_id` Int32, `VisitDate` Nullable(Date32), `storetype_id` Int32, `store_category_id` Nullable(Int32), `product_id` Int32, `MSL` String, `MBQ` Int32, `opening_stock` Nullable(Int32), `mid_day_stock` Nullable(Int32), `closing_stock` Nullable(Int32), `Stock_Qty` Int32, `offtake` Nullable(Int32), `damagedstock` Nullable(Int32), `loststock` Nullable(Int32), `expirystock` Nullable(Int32), `skuavailability` String, `update_date` Date32, `update_by` String, `StockType` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : HulTea_Web_Logins + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`HulTea_Web_Logins` + ( + `Id` Int64, `project_id` Int32, `supervisor_id` Int32, `supervisor_name` String, `emp_id` Int32, `employee_name` String, `designation` String, `date` Date32, `time` String, `activity_name` String, `activity_type` String, `right_name` String, `CreateDate` Nullable(DateTime64), `CreateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Journey_Plan + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Journey_Plan` + ( + `Id` Int64, `project_id` Int32, `store_id` Int32, `employee_id` Int32, `visit_date` Date32, `process_id` Nullable(Int32), `CreateDate` Date32, `CreateBy` Nullable(String), `UpdateDate` Date32, `UpdateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : JourneyPlan_Storewise_Sup + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`JourneyPlan_Storewise_Sup` + ( + `Id` Int64, `ProjectId` Nullable(Int32), `StoreId` Nullable(Int32), `EmpId` Nullable(Int32), `Visitdate` Nullable(Date32), `Deviation` Nullable(Int32), `UpdateDate` Nullable(Date32), `UpdateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : KPI Benchmark + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`KPI Benchmark` + ( + `project_id` Int32, `kpi_name` String, `start_range` Float64, `end_range` Float64, `score_range` Float64 + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : KPI RAG Bands + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`KPI RAG Bands` + ( + `Project ID` Nullable(Int32), `Project Name` Nullable(String), `KPI_Name` Nullable(String), `Category ID` Nullable(Int32), `Category Name` Nullable(String), `Sub Category ID` Nullable(Int32), `Sub Category Name` Nullable(String), `Brand ID` Nullable(Int32), `Brand Name` Nullable(String), `Band_1` Nullable(Float64), `Band_2` Nullable(Float64) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : KPI RAG Icons + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`KPI RAG Icons` + ( + `Icon ID` Nullable(Int32), `Icon Name` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Login + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Login` + ( + `pk` Int32, `project_id` Int32, `employee_id` Int32, `login_date` Date32, `login_time` String, `process_id` Nullable(Int32), `first_store_in_time` Nullable(String), `last_store_out_time` Nullable(String), `update_date` Date32, `update_by` String, `Unique_Id` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Login_Sup + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Login_Sup` + ( + `Id` Int32, `ProjectId` Int32, `EmployeeId` Int32, `LoginDate` Date32, `logintime` String, `First_store_in_time` Nullable(String), `Last_store_out_time` Nullable(String), `UpdateDate` Date32, `UpdateBy` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Mapping_StorePromotion + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Mapping_StorePromotion` + ( + `ID` Int64, `Project_Id` Int32, `StoreId` Nullable(Int32), `PromotionDefinitionid` Nullable(Int32), `Fromdate` Nullable(Date32), `Todate` Nullable(Date32), `CreateDate` Nullable(DateTime64), `CreateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Mapping_StoreVisibility + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Mapping_StoreVisibility` + ( + `ID` Int64, `Project_Id` Int32, `StoreId` Nullable(Int32), `VisibilityDefinitionid` Nullable(Int32), `Fromdate` Nullable(Date32), `Todate` Nullable(Date32), `CreateDate` Nullable(DateTime64), `CreateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Master_CategoryDefinition + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Master_CategoryDefinition` + ( + `project_id` Int64, `categorydefinitionid` Int32, `categoryid` Int32, `categorydefinitioncode` Nullable(String), `categorydefinitionname` Nullable(String), `CreateDate` Nullable(DateTime64), `createby` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Master_OQAD_Question + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Master_OQAD_Question` + ( + `Id` Int64, `UniqueId` Nullable(String), `ProjectId` Nullable(Int32), `QuestionCategoryId` Int32, `QuestionCategory` Nullable(String), `QuestionId` Nullable(Int32), `Question` Nullable(String), `AnswerId` Nullable(Int32), `Answer` Nullable(String), `Right_Answer` Nullable(String), `Fromdate` Nullable(Date32), `Todate` Nullable(Date32), `UpdateDate` Nullable(DateTime64), `UpdateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Master_PaidVisibility_Remarks + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Master_PaidVisibility_Remarks` + ( + `project_id` Nullable(Int32), `ReasonId` Nullable(Int32), `Reason` Nullable(String), `Group` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Master_ProductBrand + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Master_ProductBrand` + ( + `Project_Id` Int32, `Brand_Id` Int64, `SubCategory_Id` Int64, `Brand_Code` Nullable(String), `Brand_Name` Nullable(String), `Brand_Sequence` Nullable(Int32), `Company_Id` Nullable(Int32), `CreateDate` Nullable(DateTime64), `CreateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Master_ProductCategory + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Master_ProductCategory` + ( + `Project_Id` Int32, `Category_Id` Int32, `Category_Name` String, `Category_Code` Nullable(String), `Category_Sequence` Nullable(Int32), `CreateDate` Nullable(DateTime64), `CreateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Master_ProductSubCategory + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Master_ProductSubCategory` + ( + `Project_Id` Nullable(Int32), `SubCategory_Id` Int32, `SubCategory_Name` String, `SubCategory_Code` Nullable(String), `Category_Id` Int32, `SubCategory_Sequence` Nullable(Int32), `CreateDate` Nullable(DateTime64), `CreateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Master_PromotionDefinition + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Master_PromotionDefinition` + ( + `Id` Int64, `Project_id` Int32, `PromotionDefinitionid` Int32, `PromotionDefinitionName` Nullable(String), `CreateDate` Nullable(DateTime64), `Createby` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Master_PromotionQuestion + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Master_PromotionQuestion` + ( + `Id` Int64, `Project_id` Int32, `PromoQuestionId` Nullable(String), `PromoQuestionName` Nullable(String), `CreateDate` Nullable(DateTime64), `CreateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Master_SalesTerritory + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Master_SalesTerritory` + ( + `project_id` Int32, `StLayerOneId` Nullable(Int32), `StLayerOneCode` Nullable(String), `StLayerOneName` Nullable(String), `StLayerTwoId` Nullable(Int32), `StLayerTwoCode` Nullable(String), `StLayerTwoName` Nullable(String), `StLayerThreeId` Nullable(Int32), `StLayerThreeCode` Nullable(String), `StLayerThreeName` Nullable(String), `StLayerFourId` Nullable(Int32), `StLayerFourCode` Nullable(String), `StLayerFourName` Nullable(String), `CreateDate` Nullable(DateTime64), `CreateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Master_Salesterritorylayer + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Master_Salesterritorylayer` + ( + `Id` Int64, `ProjectId` Nullable(Int32), `StLayerOneId` Nullable(Int32), `StLayerOneName` Nullable(String), `StLayerTwoId` Nullable(Int32), `StLayerTwoName` Nullable(String), `StLayerThreeId` Nullable(Int32), `StLayerThreeName` Nullable(String), `StLayerFourId` Nullable(Int32), `StLayerFourName` Nullable(String), `CreateDate` Nullable(DateTime64), `CreateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Master_TrainingQuestionAnswer + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Master_TrainingQuestionAnswer` + ( + `QuestionId` Nullable(Int32), `Question` Nullable(String), `QuestionTypeId` Nullable(Int32), `QuestionType` Nullable(String), `AnswerId` Nullable(Int32), `Answer` Nullable(String), `RightAnswer` Nullable(UInt8), `CreateDate` Nullable(Date32), `CreateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Master_VisibilityDefinition + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Master_VisibilityDefinition` + ( + `Id` Int64, `Project_id` Int32, `VisibilityDefinitionid` Int32, `VisibilityDefinitionName` Nullable(String), `CreateDate` Nullable(DateTime64), `Createby` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Master_VisibilityReason + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Master_VisibilityReason` + ( + `Id` Int64, `ProjectId` Nullable(Int32), `MenuId` Nullable(Int32), `ReasonId` Nullable(Int32), `Reason` Nullable(String), `CreateDate` Nullable(DateTime64), `Createby` Nullable(String), `ReasonGroup` Nullable(String), `ReasonGroupID` Nullable(Int32) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Master_Window + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Master_Window` + ( + `Id` Int64, `ProjectId` Int32, `WindowId` Nullable(Int32), `WindowTypeId` Nullable(Int32), `WindowCode` Nullable(String), `WindowName` Nullable(String), `WindowRefImage` Nullable(String), `WindowIcon` Nullable(String), `WindowRefImagePopUp` Nullable(UInt8), `WindowSequence` Nullable(Int32), `CreateDate` Nullable(DateTime64), `CreateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Master_WindowDefinition + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Master_WindowDefinition` + ( + `Id` Int64, `project_id` Int32, `windowdefinitionid` Int32, `windowdefinitioncode` Nullable(String), `windowdefinitionname` Nullable(String), `CreateDate` Nullable(DateTime64), `Createby` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Master_WindowDefintion + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Master_WindowDefintion` + ( + `project_id` Int64, `windowdefinitionid` Int32, `windowid` Int32, `windowdefinitioncode` Nullable(String), `windowdefinitionname` Nullable(String), `CreateDate` Nullable(DateTime64), `createby` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Master_WindowQuestion + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Master_WindowQuestion` + ( + `Id` Int64, `Project_id` Int32, `WindowQuestionId` Int32, `WindowQuestionName` Nullable(String), `WindowQuestionTypeId` Nullable(Int32), `WindowQuestionType` Nullable(String), `CreateDate` Nullable(DateTime64), `Createby` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Master_WindowQuestionAnswer + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Master_WindowQuestionAnswer` + ( + `Id` Int64, `Project_id` Int32, `WindowQuestionId` Int32, `WindowAnswerId` Int32, `WindowAnswer` Nullable(String), `CreateDate` Nullable(DateTime64), `Createby` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : MissedCall + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`MissedCall` + ( + `Id` Int64, `ProjectId` Nullable(Int32), `Mid` Int64, `StoreId` Nullable(Int32), `EmpId` Nullable(Int32), `Visitdate` Nullable(Date32), `BrandId` Nullable(Int32), `Purchase` Nullable(UInt8), `NoPurchaseReason` Nullable(String), `SMSCode` Nullable(String), `SMSStatus` Nullable(String), `RejectReason` Nullable(String), `CreateDate` Nullable(Date32), `CreateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : MissedCall Target + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`MissedCall Target` + ( + `project_id` Int32, `store_id` Int32, `brand_id` Int32, `from_date` Date32, `to_date` Date32, `misscall_target` Int32, `update_date` Date32, `update_by` String, `ticket_id` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : mt_store_master + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`mt_store_master` + ( + `ID` Nullable(Float64), `insight_store_id` Nullable(String), `insight_store_id_old` Nullable(String), `country_id` Nullable(Float64), `country_code` Nullable(String), `country` Nullable(String), `region_id` Nullable(Float64), `region_code` Nullable(String), `region` Nullable(String), `state_id` Nullable(Float64), `state_code` Nullable(String), `state` Nullable(String), `city` Nullable(String), `cpm_city_id` Nullable(String), `tier_city` Nullable(String), `chain_type` Nullable(String), `keyaccount_old` Nullable(String), `keyaccount_cd` Nullable(String), `keyaccount` Nullable(String), `storetype` Nullable(String), `store_name` Nullable(String), `address` Nullable(String), `area` Nullable(String), `pincode` Nullable(Float64), `longitude` Nullable(Float64), `latitude` Nullable(Float64) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : my_subscriptions_ssrs + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`my_subscriptions_ssrs` + ( + `ProjectID` Int32, `ProjectName` String, `ReportName` Nullable(String), `ToEmailAddress` String, `CCEmailAddress` Nullable(String), `BccEmailAddress` Nullable(String), `ReplyToEmailAddress` Nullable(String), `IncludeReport` Nullable(UInt8), `RenderFormat` Nullable(String), `Priority` Nullable(String), `Subject` Nullable(String), `Comment` Nullable(String), `IncludeLink` Nullable(UInt8), `Active` Nullable(UInt8) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : OQaD + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`OQaD` + ( + `pk` Int32, `project_id` Int32, `employee_id` Int32, `process_id` Nullable(Int32), `visit_date` Date32, `question_category_id` Int32, `question_category` Nullable(String), `question_sub_category_id` Nullable(Int32), `question_sub_category` Nullable(String), `question_id` Int32, `question` Nullable(String), `answer_id` Nullable(Int32), `answer` Nullable(String), `correct_answer` Nullable(String), `update_date` Date32, `update_by` String, `designation_id` Nullable(Int32) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : OQaD Target + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`OQaD Target` + ( + `project_id` Int32, `project_name` String, `designation_id` Int32, `designation` String, `employee_role` String, `oqad_target` Int32, `from_date` Date32, `to_date` Date32 + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : OQaD_New + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`OQaD_New` + ( + `pk` Int32, `project_id` Int32, `employee_id` Int32, `process_id` Nullable(Int32), `visit_date` Date32, `question_category_id` Int32, `question_category` Nullable(String), `question_sub_category_id` Nullable(Int32), `question_sub_category` Nullable(String), `question_id` Int32, `question` Nullable(String), `answer_id` Nullable(Int32), `answer` Nullable(String), `correct_answer` Nullable(String), `Emp_Answer` Nullable(String), `update_date` Date32, `update_by` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Order + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Order` + ( + `Id` Int64, `Project_Id` Int32, `Mid` Nullable(Int64), `SuperVisorId` Int32, `EmpID` Int32, `StoreId` Int32, `ChainId` Int32, `ChannelId` Int32, `StoreTypeId` Int32, `VisitDate` Date32, `OrderId` Int32, `Present` Nullable(UInt8), `SystemPO` Nullable(String), `StorePO` Nullable(String), `ContactName` Nullable(String), `ContactNo` Nullable(String), `ProductId` Int32, `OrderQTY` Nullable(Int32), `Updatedate` Nullable(DateTime64), `UpdateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : OrderStatus + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`OrderStatus` + ( + `Id` Int64, `Project_Id` Int32, `Mid` Nullable(Int64), `SuperVisorId` Int32, `EmpID` Int32, `StoreId` Int32, `ChainId` Int32, `ChannelId` Int32, `StoreTypeId` Int32, `VisitDate` Date32, `OrderId` Int32, `SystemPO` Nullable(String), `StorePO` Nullable(String), `ContactName` Nullable(String), `ContactNo` Nullable(String), `Present` Nullable(UInt8), `ProductId` Int32, `OrderQTY` Nullable(Int32), `UpdateDate` Nullable(DateTime64), `UpdateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : PaidVisibility + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`PaidVisibility` + ( + `MID` Nullable(Int64), `pk` Int64, `project_id` Int32, `store_id` Int32, `employee_id` Int32, `visit_date` Date32, `supervisor_id` Int32, `channel_id` Int32, `chain_id` Int32, `storetype_id` Int32, `MenuId` Int32, `MenuName` String, `Visibility_Id` Nullable(Int32), `Visibility_Name` Nullable(String), `Visibility_definition_id` Nullable(Int32), `Visibility_definition_name` Nullable(String), `Visibility_deatils_id` Nullable(Int32), `Visibility_deatils` Nullable(String), `Visibility_value_name` Nullable(String), `Visibility_type` Nullable(String), `present` String, `ReasonId` Nullable(Int32), `reason` Nullable(String), `VisibilityQuestion` Nullable(String), `VisibilityAnswer` Nullable(String), `image1` Nullable(String), `image2` Nullable(String), `update_date` DateTime64, `update_by` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : PaidVisibility_Compliance + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`PaidVisibility_Compliance` + ( + `pk` Int64, `project_id` Int32, `store_id` Int32, `employee_id` Int32, `visit_date` Date32, `supervisor_id` Int32, `channel_id` Int32, `chain_id` Int32, `storetype_id` Int32, `visibility_id` Nullable(Int32), `visibility_name` Nullable(String), `visibility_definition_id` Nullable(Int32), `visibility_definition_name` Nullable(String), `question_id` Nullable(Int32), `question` Nullable(String), `question_answer` Nullable(String), `score` Nullable(Int32), `image1` Nullable(String), `image2` Nullable(String), `auditor_name` Nullable(String), `audit_date` Nullable(Date32), `audit_time` Nullable(String), `update_date` Date32, `update_by` String, `PaidVisibilityDetailsId` Nullable(Int32), `PaidVisibilityDetails` Nullable(String), `Paid_VisiValueName` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : PaidVisibility_Master + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`PaidVisibility_Master` + ( + `project_id` Int32, `store_id` Int32, `visibility_Id` Int32, `visibility_name` String, `CreateDate` DateTime64, `CreateBy` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Project_Master + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Project_Master` + ( + `project_id` Int32, `project_name` String, `project_channel_order` Nullable(Int32), `project_channel` Nullable(String), `project_type_order` Nullable(Int32), `project_type` Nullable(String), `project_status` Nullable(String), `start_date` Nullable(Date32), `end_date` Nullable(Date32) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Promotion + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Promotion` + ( + `MID` Nullable(Int64), `pk` Int64, `project_id` Int32, `store_id` Int32, `employee_id` Int32, `visit_date` Date32, `supervisor_id` Int32, `channel_id` Int32, `chain_id` Int32, `storetype_id` Int32, `promo_definition_id` Nullable(Int32), `promo_definition_name` Nullable(String), `promotion_deatils_id` Nullable(Int32), `promotion_deatils` Nullable(String), `promotion_value_id` Nullable(Int32), `promotion_value_name` Nullable(String), `promotion_type` Nullable(String), `present` Nullable(String), `reason` Nullable(String), `PromoQuestion` Nullable(String), `PromoAnswer` Nullable(String), `stock` Nullable(String), `pop` Nullable(String), `running` Nullable(String), `backing_sheet` Nullable(String), `promotion_status` Nullable(String), `actual_price` Nullable(Float64), `offer_price` Nullable(Float64), `image1` Nullable(String), `image2` Nullable(String), `update_date` DateTime64, `update_by` String, `ReasonId` Nullable(Int32), `AssortmentStatus` Nullable(String), `SellingPrice` Nullable(String), `Actual Selling Price` Nullable(String), `SellingPriceGap` Nullable(String), `PromotionOfferStatus` Nullable(String), `Stock Available?` Nullable(String), `Promo Talker Available?` Nullable(String), `Stock Available?-Image` Nullable(String), `Promo Talker Available?-Image` Nullable(String), `msl` Nullable(Int32), `ArticleCode` Nullable(String), `StockQty` Nullable(Int32), `mbq` Nullable(Int32), `PromoQuestionId` Nullable(Int32) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : record count + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`record count` + ( + `Project ID` Nullable(Int32), `KPI Name` Nullable(String), `Visit_Date` Nullable(Date32), `Record Count` Nullable(Int32), `Update Date` Nullable(Date32), `Update Time` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Report_Configuration + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Report_Configuration` + ( + `project_id` Int32, `project_name` String, `logo_url` Nullable(String), `canvas_bg` Nullable(String), `wallpaper_bg` Nullable(String), `column_bar1` Nullable(String), `column_bar2` Nullable(String), `title_text` Nullable(String), `title_bg` Nullable(String), `line_colour` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : report_users + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`report_users` + ( + `project_id` Int32, `project_name` String, `user_email_id` String, `user_name` String, `region_id` Int32, `state_id` Int32, `chain_id` Int32, `user_status` String, `report_type` String, `user_company` String, `update_date` Date32, `update_by` String, `ticket_id` Nullable(String), `start_date` Nullable(Date32), `end_date` Nullable(Date32) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Reports Catalog + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Reports Catalog` + ( + `ID` Nullable(Int32), `KPI` Nullable(String), `ReportName` Nullable(String), `ReportDetail` Nullable(String), `ReportPath` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Sales + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Sales` + ( + `Id` Int64, `Project_Id` Int32, `Mid` Nullable(Int64), `SuperVisorId` Int32, `EmpID` Int32, `StoreId` Int32, `ChainId` Int32, `ChannelId` Int32, `StoreTypeId` Int32, `VisitDate` Date32, `ProductId` Int32, `MSL` Int32, `PTR` Float64, `MRP` Float64, `Sale` Int32, `Value` Float64, `CreateDate` DateTime64, `CreateBy` String, `SalesType` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Sales_Category + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Sales_Category` + ( + `Project_Id` Nullable(Int32), `Mid` Nullable(Int64), `SuperVisorId` Nullable(Int32), `EmpID` Nullable(Int32), `StoreId` Nullable(Int32), `ChainId` Nullable(Int32), `ChannelId` Nullable(Int32), `StoreTypeId` Nullable(Int32), `VisitDate` Nullable(Date32), `HeaderDetails` Nullable(String), `HeaderDetailsID` Nullable(Int32), `MSL` Nullable(Int32), `PTR` Nullable(Float64), `MRP` Nullable(Float64), `SaleQty` Nullable(Int32), `Sales_Value` Nullable(Float64), `SalesType` Nullable(String), `CreateDate` Nullable(DateTime64), `CreateBy` Nullable(String), `ticket_id` Nullable(Int64) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Sales_External + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Sales_External` + ( + `Id` Int64, `Project_Id` Int32, `Store_Id` Int32, `Emp_id` Int32, `Category_Id` Int32, `SubCategory_Id` Int32, `Visit_Date` Nullable(Date32), `Product_id` Int32, `MSL` Int32, `PTR` Float64, `MRP` Float64, `SalesQty` Int32, `SalesValue` Float64, `SalesType` String, `CreateDate` DateTime64, `CreateBy` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Sales_POS + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Sales_POS` + ( + `Project_Id` Int32, `Mid` Int64, `SuperVisorId` Int32, `EmpID` Int32, `StoreId` Int32, `ChainId` Int32, `ChannelId` Int32, `StoreTypeId` Int32, `VisitDate` Date32, `ProductId` Int32, `MSL` Nullable(Int32), `PTR` Float64, `MRP` Nullable(Float64), `SaleQty` Float64, `Sales_Value` Nullable(Float64), `SalesType` String, `CreateDate` DateTime64, `CreateBy` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Sales_Target_Store + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Sales_Target_Store` + ( + `Id` Int64, `Project_Id` Int32, `Store_Id` Int32, `From_Date` Date32, `To_Date` Date32, `Sales_Target_Value` Float64, `Sales_Target_Volume` Int32, `CreateDate` DateTime64, `CreateBy` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : SalesFocusPackTarget + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`SalesFocusPackTarget` + ( + `Id` Int64, `project_id` Int32, `store_id` Int32, `focus_pack_name` String, `product_id` Int32, `value_target` Float64, `target_type` String, `from_date` Date32, `to_date` Date32, `CreateDate` Date32, `CreateBy` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : SalesTarget + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`SalesTarget` + ( + `Id` Int64, `project_id` Int32, `store_id` Int32, `category_id` Int32, `from_date` Date32, `to_date` Date32, `sales_target_value` Float64, `sales_target_volume` Int32, `CreateDate` DateTime64, `CreateBy` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : SalesTargetSubCategory + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`SalesTargetSubCategory` + ( + `Id` Int64, `project_id` Int32, `store_id` Int32, `subcategory_id` Int32, `from_date` Date32, `to_date` Date32, `sales_target_value` Float64, `sales_target_volume` Int32, `CreateDate` DateTime64, `CreateBy` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : SKU Master + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`SKU Master` + ( + `pk` Int32, `project_id` Int32, `category_id` Nullable(Int32), `category_code` Nullable(String), `Category_name` Nullable(String), `sub_category_id` Nullable(Int32), `sub_category_code` Nullable(String), `sub_category_name` Nullable(String), `brand_id` Nullable(Int32), `brand_code` Nullable(String), `brand_name` Nullable(String), `sub_brand_id` Nullable(Int32), `sub_brand_code` Nullable(String), `sub_brand_name` Nullable(String), `product_id` Nullable(Int32), `product_name` Nullable(String), `product_code` Nullable(String), `parent_product_id` Nullable(String), `parent_product_name` Nullable(String), `pack_id` Nullable(String), `pack_name` Nullable(String), `division_id` Nullable(String), `division_name` Nullable(String), `mrp` Nullable(Float64), `flavour_id` Nullable(Int32), `flavour` Nullable(String), `grammage` Nullable(String), `product_sequence` Nullable(Int32), `case_size` Nullable(Float64), `product_wgt_type` Nullable(String), `company_name` Nullable(String), `is_competitor` Nullable(UInt8), `ptr` Nullable(Float64), `update_date` Nullable(Date32), `update_by` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : SOS_IR + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`SOS_IR` + ( + `pk` Int32, `project_id` Int32, `MID` Nullable(Int64), `employee_id` Int32, `store_id` Int32, `visit_date` Date32, `storetype_id` Nullable(Int32), `channel_id` Nullable(Int32), `SOSHeaderDeatils` Nullable(String), `SOSHeaderID` Int32, `SOSHeaderName` Nullable(String), `Total_Base_Length` Nullable(Float64), `Total_Product_Length` Nullable(Float64), `Target` Nullable(Float64), `update_date` Date32, `update_by` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : SOS_OneApp + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`SOS_OneApp` + ( + `pk` Int32, `project_id` Int32, `MID` Nullable(Int64), `employee_id` Int32, `store_id` Int32, `visit_date` Date32, `storetype_id` Nullable(Int32), `channel_id` Nullable(Int32), `SOSDefinitionName` Nullable(String), `SOSHeaderDeatils` Nullable(String), `SOSHeaderName` Nullable(String), `SOSHeaderID` Int32, `SOSChildDeatils` Nullable(String), `SOSChildName` Nullable(String), `SOSChildID` Int32, `SOSHeaderFacing` Nullable(Float64), `ChildTotalFacing` Nullable(Float64), `ChildSelfFacing` Nullable(Float64), `SOSTarget` Nullable(Float64), `update_date` Date32, `update_by` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Stock_Details + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Stock_Details` + ( + `pk` Int32, `project_id` Int32, `MID` Nullable(Int64), `supervisor_id` Int32, `employee_id` Int32, `store_id` Int32, `VisitDate` Nullable(Date32), `storetype_id` Int32, `store_category_id` Nullable(Int32), `product_id` Int32, `MSL` String, `MBQ` Int32, `opening_stock` Nullable(Int32), `mid_day_stock` Nullable(Int32), `closing_stock` Nullable(Int32), `Stock_Qty` Int32, `offtake` Nullable(Int32), `damagedstock` Nullable(Int32), `loststock` Nullable(Int32), `expirystock` Nullable(Int32), `skuavailability` String, `update_date` Date32, `update_by` String, `StockType` Nullable(String), `GroupId` Nullable(Int32) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Stock_Details_IR + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Stock_Details_IR` + ( + `pk` Int32, `project_id` Int32, `MID` Nullable(Int64), `supervisor_id` Int32, `employee_id` Int32, `store_id` Int32, `VisitDate` Nullable(Date32), `storetype_id` Int32, `store_category_id` Nullable(Int32), `Product_Id` Nullable(Int32), `MSL` Nullable(Int32), `MBQ` Nullable(Int32), `Stock_Qty` Nullable(Int32), `skuavailability` Nullable(String), `StockType` Nullable(String), `update_date` Date32, `update_by` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Store_Master + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Store_Master` + ( + `project_id` Int64, `project_name` Nullable(String), `region_id` Int64, `region` String, `state_id` Int64, `state` String, `city_id` Nullable(Int64), `city` Nullable(String), `cpm_city_id` Nullable(String), `channel_id` Nullable(Int64), `channel` Nullable(String), `distributor_id` Nullable(Int64), `distributor_name` Nullable(String), `keyaccount_id` Nullable(Int64), `keyaccount` Nullable(String), `insight_store_id` Nullable(String), `client_store_code` Nullable(String), `asm_area_id` Nullable(String), `asm_area_name` Nullable(String), `so_bde_area_id` Nullable(String), `so_bde_area` Nullable(String), `longitude` Nullable(Float64), `latitude` Nullable(Float64), `store_category_id` Nullable(Int64), `store_category` Nullable(String), `store_type_id` Nullable(Int64), `store_type` Nullable(String), `store_classification_id` Nullable(Int64), `store_classification` Nullable(String), `StLayerFourId` Nullable(Int32), `store_id` Int64, `store_name` String, `address` Nullable(String), `pin_code` Nullable(String), `is_pharmacy_store` Nullable(String), `Unique_Store_ID` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Store_Type + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Store_Type` + ( + `project_id` Int32, `store_type_id` Int32, `store_type` String, `cpm_store_type_id` Int32, `cpm_store_type` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Survey + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Survey` + ( + `Id` Int64, `Project_Id` Nullable(Int32), `Mid` Nullable(Int64), `SuperVisorId` Nullable(Int32), `EmpID` Nullable(Int32), `StoreId` Nullable(Int32), `VisitDate` Nullable(Date32), `StoreTypeId` Nullable(Int32), `ChainId` Nullable(Int32), `CategoryId` Nullable(Int32), `Category` Nullable(String), `SubCategoryId` Nullable(Int32), `SubCategory` Nullable(String), `SurveyId` Nullable(Int32), `SurveyName` Nullable(String), `QuestionId` Nullable(Int32), `Question` Nullable(String), `Answer` Nullable(String), `CreateDate` Nullable(DateTime64), `CreateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Survey Target + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Survey Target` + ( + `project_id` Int32, `store_id` Int32, `survey_id` Nullable(Int32), `survey_name` Nullable(String), `demo_target` Int32, `conversion_target` Int32, `demo_target_days` Int32, `total_demo_target` Nullable(Int32), `from_date` Date32, `to_date` Date32, `ticket_id` Nullable(String), `CreateDate` Nullable(DateTime64), `CreateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : SVG Fluent Icons + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`SVG Fluent Icons` + ( + `id` Nullable(Int32), `icon_name` Nullable(String), `image_url` Nullable(String), `icon_style` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : sysdiagrams + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`sysdiagrams` + ( + `name` String, `principal_id` Int32, `diagram_id` Int32, `version` Nullable(Int32), `definition` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : TEMP_POSALEDELETEUPDATE + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`TEMP_POSALEDELETEUPDATE` + ( + `ID` Int64, `ProjectId` Int32, `MID` Int64, `PRODUCTID` Int64, `SALEQTY` Nullable(Int32), `SALEVALUE` Nullable(Float64) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Web Logins + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Web Logins` + ( + `Id` Int64, `project_id` Int32, `supervisor_id` Int32, `supervisor_name` String, `emp_id` Int32, `employee_name` String, `designation` String, `date` Date32, `time` String, `activity_name` String, `activity_type` String, `right_name` String, `CreateDate` Nullable(DateTime64), `CreateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : weightage_pss + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`weightage_pss` + ( + `project_id` Nullable(Int32), `key_account_id` Nullable(Int32), `key_account_name` Nullable(String), `pss_case` Nullable(Int32), `pss_calculation_options` Nullable(String), `pss_calculation_sub_options` Nullable(String), `kpi_name` Nullable(String), `kpi_weightage` Nullable(Float64), `osa_present` Nullable(UInt8), `sos_present` Nullable(UInt8), `promo_present` Nullable(UInt8), `paid_visibility_present` Nullable(UInt8), `from_date` Nullable(Date32), `to_date` Nullable(Date32), `remarks` Nullable(String), `update_date` Nullable(Date32), `update_by` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Window_Compliance + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Window_Compliance` + ( + `pk` Int64, `project_id` Int32, `store_id` Int32, `employee_id` Int32, `visit_date` Date32, `supervisor_id` Int32, `channel_id` Int32, `chain_id` Int32, `storetype_id` Int32, `window_id` Nullable(Int32), `window_name` Nullable(String), `window_definition_id` Nullable(Int32), `window_definition_name` Nullable(String), `question_id` Nullable(Int32), `question` Nullable(String), `question_answer` Nullable(String), `score` Nullable(Int32), `image1` Nullable(String), `image2` Nullable(String), `auditor_name` Nullable(String), `audit_date` Nullable(Date32), `audit_time` Nullable(String), `update_date` Date32, `update_by` String + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : Window_Execution + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`Window_Execution` + ( + `Id` Int64, `ProjectId` Int32, `MID` Nullable(Int64), `StoreId` Int32, `EMPID` Int32, `VisitDate` Date32, `SupervisorId` Int32, `ManagerId` Nullable(Int32), `RegionId` Nullable(Int32), `StateId` Nullable(Int32), `CityId` Nullable(Int32), `ChainId` Nullable(Int32), `ChannelId` Nullable(Int32), `StoreTypeId` Nullable(Int32), `StoreCategoryId` Nullable(Int32), `StoreClassId` Nullable(Int32), `DistributorId` Nullable(Int32), `WindowId` Nullable(Int32), `WindowName` Nullable(String), `WindowDefinitionId` Nullable(Int32), `WindowDefinitionName` Nullable(String), `WindowDetailsId` Nullable(Int32), `WindowDetails` Nullable(String), `WindowValueName` Nullable(String), `MenuId` Nullable(Int32), `Menuname` Nullable(String), `Present` Nullable(String), `ReasonId` Nullable(Int16), `Reason` Nullable(String), `Image1` Nullable(String), `Image2` Nullable(String), `Updatedate` Nullable(DateTime64), `UpdateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : WindowCategory_Compliance_Parameter + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`WindowCategory_Compliance_Parameter` + ( + `project_id` Int32, `storetype_id` Int32, `storetype` String, `compliance_type` String, `window_definition_id` Int32, `window_definition_name` String, `question_id` Int32, `question` String, `expected_answer` String, `comparision_type` String, `from_date` Date32, `to_date` Nullable(Date32), `update_date` Date32, `update_by` String, `ticket_id` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : WindowCategory_Compliance_Target + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`WindowCategory_Compliance_Target` + ( + `project_id` Int32, `store_type_id` Int32, `comp_target` Int32, `from_date` Date32, `to_date` Nullable(Date32) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +===================================== + + +===================================== +TABLE : WindowCheklist + + CREATE TABLE IF NOT EXISTS `DaburIndia_BI`.`WindowCheklist` + ( + `Id` Int64, `ProjectId` Int32, `StoreId` Int32, `EMPID` Int32, `VisitDate` Date32, `SupervisorId` Nullable(Int32), `ManagerId` Nullable(Int32), `RegionId` Nullable(Int32), `StateId` Nullable(Int32), `CityId` Nullable(Int32), `ChainId` Nullable(Int32), `ChannelId` Nullable(Int32), `StoreTypeId` Nullable(Int32), `StoreCategoryId` Nullable(Int32), `StoreClassId` Nullable(Int32), `DistributorId` Nullable(Int32), `WindowDefinitionId` Nullable(Int32), `WindowDetailsId` Nullable(Int32), `WindowDetails` Nullable(String), `WindowValueName` Nullable(String), `WindowQuestionId` Nullable(Int32), `WindowQuestionName` Nullable(String), `WindowAnswerId` Nullable(Int32), `WindowAnswername` Nullable(String), `Updatedate` Nullable(DateTime64), `UpdateBy` Nullable(String) + ) + ENGINE = MergeTree() + ORDER BY tuple() + +=====================================