Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin
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
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ekaterina
wendelin
Commits
dafc3497
Commit
dafc3497
authored
Nov 18, 2020
by
Ekaterina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_wendelin_tutorial: add script to create ingestion based on given data stream
parent
b75f75ce
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
181 additions
and
0 deletions
+181
-0
bt5/erp5_wendelin_tutorial/PathTemplateItem/portal_skins/erp5_wendelin_data_lake/Ingestion_ingestDataStream.py
...ins/erp5_wendelin_data_lake/Ingestion_ingestDataStream.py
+13
-0
bt5/erp5_wendelin_tutorial/PathTemplateItem/portal_skins/erp5_wendelin_data_lake/Ingestion_ingestDataStream.xml
...ns/erp5_wendelin_data_lake/Ingestion_ingestDataStream.xml
+62
-0
bt5/erp5_wendelin_tutorial/PathTemplateItem/test_page_module/wendelin_Tutorial_Howto_Create_Data_Supply.html
...ge_module/wendelin_Tutorial_Howto_Create_Data_Supply.html
+16
-0
bt5/erp5_wendelin_tutorial/PathTemplateItem/test_page_module/wendelin_Tutorial_Howto_Create_Data_Supply.xml
...age_module/wendelin_Tutorial_Howto_Create_Data_Supply.xml
+90
-0
No files found.
bt5/erp5_wendelin_tutorial/PathTemplateItem/portal_skins/erp5_wendelin_data_lake/Ingestion_ingestDataStream.py
0 → 100644
View file @
dafc3497
"""Create ingestion with data from stream"""
portal
=
context
.
getPortalObject
()
request
=
portal
.
REQUEST
index
=
reference
.
index
(
'-'
)
stream_reference
=
reference
ingestion_reference
=
reference
[:
index
]
+
'.'
+
reference
[
index
+
1
:
len
(
reference
)]
request
.
environ
[
'REQUEST_METHOD'
]
=
'POST'
request
.
set
(
'reference'
,
ingestion_reference
)
request
.
set
(
'data_chunk'
,
portal
.
data_stream_module
.
get
(
stream_reference
).
getData
())
portal
.
portal_ingestion_policies
.
default
.
ingest
()
return
'Data ingested'
bt5/erp5_wendelin_tutorial/PathTemplateItem/portal_skins/erp5_wendelin_data_lake/Ingestion_ingestDataStream.xml
0 → 100644
View file @
dafc3497
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
reference
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Ingestion_ingestDataStream
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_wendelin_tutorial/PathTemplateItem/test_page_module/wendelin_Tutorial_Howto_Create_Data_Supply.html
View file @
dafc3497
...
...
@@ -774,6 +774,22 @@
<td>
//input[@value="out_stream"]
</td>
<td></td>
</tr>
<tr>
<td>
open
</td>
<td>
${base_url}/portal_skins/erp5_wendelin_data_lake/Ingestion_ingestDataStream?reference=sensor_1-sample-environment-raw-data
</td>
<td></td>
</tr>
<tr>
<td>
pause
</td>
<td>
60000
</td>
<td></td>
</tr>
<tr>
<td>
openAndWait
</td>
<td>
${base_url}/web_site_module/default_wendelin_front/
</td>
<td></td>
</tr>
</tbody>
</table>
</test>
...
...
bt5/erp5_wendelin_tutorial/PathTemplateItem/test_page_module/wendelin_Tutorial_Howto_Create_Data_Supply.xml
View file @
dafc3497
...
...
@@ -1262,6 +1262,96 @@
</value>
</item>
</dictionary>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
edit
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
987.52110.18068.47377
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
<value>
<string>
current
</string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<reference
id=
"4.1"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1605695472.94
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
edit
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
988.3543.14148.28723
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
<value>
<string>
current
</string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<reference
id=
"4.1"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1605695510.59
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
...
...
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