Giter VIP home page Giter VIP logo

ibm-cloud / cloud-sql-database Goto Github PK

View Code? Open in Web Editor NEW
9.0 5.0 19.0 43 KB

Code for a tutorial on how to provision an SQL (relational) database on the IBM Cloud, load data and use it with a Python (Flask / Jinja) web app.

Home Page: https://cloud.ibm.com/docs/solution-tutorials?topic=solution-tutorials-sql-database

License: Apache License 2.0

CSS 14.87% HTML 36.73% Python 32.08% Dockerfile 16.31%
cloud-database sql-database ibm-cloud ibm-db2 db2-warehouse python ibm-cloud-solutions ibm-cloud-cr

cloud-sql-database's People

Contributors

data-henrik avatar dependabot[bot] avatar dprosper avatar funmikesa avatar powellquiring avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cloud-sql-database's Issues

Need to clarify that the VCAP_SERVICES is different for DB2 Warehouse on Cloud and Db2 on Cloud services.

Hi Henrik,

Thanks for creating nice applications. I want to suggest a simple thing. I am not sure whether we should change the code or document it somewhere.

In worldcities.py the code states to read the VCAP_SERVICE env variable in this fashion.

db2info = json.loads(os.environ['VCAP_SERVICES'])['dashDB'][0]

However this will work only for the Db2 Warehouse on Cloud ( Previously called dashDB) and not for Db2 on Cloud ( Previously called dashDB For Transactions ). So can we specify in the document somehwhere that is anybody is using the Db2 Lite plan or any other Db2 plan , they need to modify the code read the VCAP services in the following fashion.

db2info = json.loads(os.environ['VCAP_SERVICES'])['dashDB For Transactions'][0]

Thank you.

hi getting this issue when pushing the app to bluemix

TIP: use 'cf logs worldcities --recent' for more information
FAILED

2018-06-05T19:13:57.90-0500 [APP/PROC/WEB/0] ERR Traceback (most recent call last):
2018-06-05T19:13:57.92-0500 [APP/PROC/WEB/0] ERR File "worldcities.py", line 19, in
2018-06-05T19:13:57.92-0500 [APP/PROC/WEB/0] ERR db2info = json.loads(os.environ['VCAP_SERVICES'])['dashDB'][0]
2018-06-05T19:13:57.92-0500 [APP/PROC/WEB/0] ERR KeyError: 'dashDB'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.