Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
olapy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
olapy
Commits
8635deb6
Commit
8635deb6
authored
Jul 18, 2017
by
mouadh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
format
parent
9f3a6365
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
221 additions
and
83 deletions
+221
-83
olapy/core/services/xmla.py
olapy/core/services/xmla.py
+31
-3
olapy/core/services/xmla_discover_tools.py
olapy/core/services/xmla_discover_tools.py
+190
-80
No files found.
olapy/core/services/xmla.py
View file @
8635deb6
...
...
@@ -2,6 +2,7 @@
from
__future__
import
absolute_import
,
division
,
print_function
import
xmlwitch
import
os
from
datetime
import
datetime
from
os.path
import
expanduser
...
...
@@ -158,11 +159,16 @@ class XmlaProviderService(ServiceBase):
if
request
.
Command
.
Statement
==
''
:
# check if command contains a query
return
etree
.
fromstring
(
"""
xml
=
xmlwitch
.
Builder
()
# xml.return return reserved of course
xml
.
root
(
xmlns
=
"urn:schemas-microsoft-com:xml-analysis:empty"
)
return
"""
<return>
<root xmlns="urn:schemas-microsoft-com:xml-analysis:empty"/>
{0}
</return>
"""
)
"""
.
format
(
str
(
xml
)
)
else
:
XmlaProviderService
.
discover_tools
.
change_catalogue
(
request
.
Properties
.
PropertyList
.
Catalog
)
...
...
@@ -171,6 +177,28 @@ class XmlaProviderService(ServiceBase):
df
=
executer
.
execute_mdx
()
xmla_tools
=
XmlaExecuteTools
(
executer
)
# xml = xmlwitch.Builder()
# with xml.OlapInfo(xmla_tools.generate_cell_info()):
# with xml.CubeInfo:
# with xml.Cube:
# xml.CubeName('Sales')
# xml.LastDataUpdate(datetime.now().strftime('%Y-%m-%dT%H:%M:%S'),
# xmlns="http://schemas.microsoft.com/analysisservices/2003/engine")
# xml.LastSchemaUpdate(datetime.now().strftime('%Y-%m-%dT%H:%M:%S'),
# xmlns="http://schemas.microsoft.com/analysisservices/2003/engine")
# xml.AxesInfo(xmla_tools.generate_axes_info(df),
# xmla_tools.generate_axes_info_slicer(df))
#
# xml.Axes(xmla_tools.generate_xs0(df),
# xmla_tools.generate_slicer_axis(df))
#
# xml.CellData(xmla_tools.generate_cell_data(df))
return
etree
.
fromstring
(
"""
<return>
<root xmlns="urn:schemas-microsoft-com:xml-analysis:mddataset"
...
...
olapy/core/services/xmla_discover_tools.py
View file @
8635deb6
This diff is collapsed.
Click to expand it.
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