Skip to content

Commit

Permalink
Change Timeframe for GDP Sample
Browse files Browse the repository at this point in the history
Change Timeframe for GDP Sample
  • Loading branch information
MariusWirtz committed Apr 26, 2018
1 parent f7d70ba commit dbdece8
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions Load Data/gdp to cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@
import math
from TM1py.Services import TM1Service

raw_data = quandl.get("FRED/GDP")
data_raw = quandl.get("FRED/GDP")
data = data_raw.ix["1990-01-01":"2017-12-31"]

# create cellset and push it to Econ Cube
cellset = {}
for tmstp, row_data in raw_data.iterrows():
for tmstp, row_data in data.iterrows():
# time mapping: YYYY-MM-DD to YYYY and QQ
year = tmstp.year
quarter = 'Q' + str(math.ceil(tmstp.month/3.))
Expand All @@ -32,4 +33,3 @@
tm1.cubes.cells.write_values('TM1py Econ', cellset)



2 changes: 1 addition & 1 deletion Other/transactionlog delta requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
config = configparser.ConfigParser()
config.read('..\config.ini')

import time

import time
from TM1py import TM1Service

cube_source = "Retail"
Expand Down
2 changes: 1 addition & 1 deletion Query Data/query data through mdx view.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
tm1.cubes.views.create(view=mdx_view)

# Get view content
content = tm1.cubes.cells.get_view_content(cube_name=mdx_view.cube, view_name=mdx_view.name)
content = tm1.cubes.cells.execute_view(cube_name=mdx_view.cube, view_name=mdx_view.name)

# Print content
print(content)
Expand Down
16 changes: 8 additions & 8 deletions config.ini
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[tm1srv01]
address=localhost
port=8802
address=10.77.19.60
port=12354
user=admin
password=
ssl=true
password=apple
ssl=True

[tm1srv02]
address=localhost
port=8002
address=10.77.19.60
port=9699
user=admin
password=
ssl=true
password=apple
ssl=False

0 comments on commit dbdece8

Please sign in to comment.