Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
ut-adx-data-push
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
suryakant
ut-adx-data-push
Commits
10333fe8
Commit
10333fe8
authored
Aug 01, 2023
by
suryakant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CSV-Kairos-ADX Data Push
parent
43a0965d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3519 additions
and
3245 deletions
+3519
-3245
Data/Kairos/kairos_iot_hub_data.csv
Data/Kairos/kairos_iot_hub_data.csv
+3508
-3240
main.py
main.py
+11
-5
No files found.
Data/Kairos/kairos_iot_hub_data.csv
View file @
10333fe8
This source diff could not be displayed because it is too large. You can
view the blob
instead.
main.py
View file @
10333fe8
...
@@ -7,7 +7,7 @@ from azure.iot.device import IoTHubDeviceClient
...
@@ -7,7 +7,7 @@ from azure.iot.device import IoTHubDeviceClient
from
kairos_to_IoT_Hub_data_push
import
KairosDataPush
from
kairos_to_IoT_Hub_data_push
import
KairosDataPush
# COMMON CONSTANTS
# COMMON CONSTANTS
TIME_INTERVAL
=
6
0
TIME_INTERVAL
=
3
0
EQUIPMENT
=
"Equipment"
EQUIPMENT
=
"Equipment"
MACHINE
=
"Machine"
MACHINE
=
"Machine"
PARAMETER_NAME_KEY
=
"Parameter Name"
PARAMETER_NAME_KEY
=
"Parameter Name"
...
@@ -70,9 +70,15 @@ class SDKIoTHubIntegration:
...
@@ -70,9 +70,15 @@ class SDKIoTHubIntegration:
# Getting Data from Kairos and Creating CSV from the Tag Data
# Getting Data from Kairos and Creating CSV from the Tag Data
csv_excel_path
,
column_list
=
self
.
kairos_data_obj
.
getting_kairos_data
(
csv_excel_path
,
column_list
=
self
.
kairos_data_obj
.
getting_kairos_data
(
excel_file_path
=
EXCEL_FILE_PATH
)
excel_file_path
=
EXCEL_FILE_PATH
)
try
:
tag_list
,
kairos_data_df
=
self
.
kairos_data_obj
.
reading_csv_excel_file
(
tag_list
,
kairos_data_df
=
self
.
kairos_data_obj
.
\
csv_excel_path
=
csv_excel_path
)
reading_csv_excel_file
(
csv_excel_path
=
csv_excel_path
)
except
:
print
(
"Exception:- "
)
tag_list
,
kairos_data_df
=
self
.
kairos_data_obj
.
\
reading_csv_excel_file
(
csv_excel_path
=
"Data/Kairos/kairos_iot_hub_data.csv"
)
# Iterating over each data in data_sheet
# Iterating over each data in data_sheet
for
each_row
in
range
(
len
(
data_sheet_df
)):
for
each_row
in
range
(
len
(
data_sheet_df
)):
...
@@ -163,7 +169,7 @@ class SDKIoTHubIntegration:
...
@@ -163,7 +169,7 @@ class SDKIoTHubIntegration:
}
}
else
:
else
:
final_json
[
DATA_KEY
][
each_columns
]
=
{
final_json
[
DATA_KEY
][
each_columns
]
=
{
VAL_KEY
:
None
,
VAL_KEY
:
0
,
DQ_KEY
:
2
,
DQ_KEY
:
2
,
TA_KEY
:
str
(
self
.
mapping_json
[
each_columns
][
TA_KEY
:
str
(
self
.
mapping_json
[
each_columns
][
TA_KEY
])
.
replace
(
" "
,
""
)
.
replace
(
TA_KEY
])
.
replace
(
" "
,
""
)
.
replace
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment