Creating a C3ServerConnection in jupyter notebook


#1

In general, if I want to make a c3 server connection, the content I have been able to find tells me to do so using this format:

C3ServerConnection(“https://my-environment.c3iot.com”,“tenant”,“tag”, timing=False)

I’m not sure what to enter in for “my-environment”. If the info in my tag page in my console looks like this:

  • env: browser
  • protocol: https
  • hostname: companyname-dev2-projectname-prod.c3iot.ai
  • port:
  • tenant: companyname
  • tag: prod
  • makeValidate: true
  • makeDeeply: true
  • locale: en-US
  • currency: USD
  • minify: true
  • debug: false
  • streamRpc: false
  • hostUrl: https://companyname-dev2-projectname-prod.c3iot.ai
  • compatibility: true
  • username: usr@companyname.com
  • vanityUrlHost: companyname-dev2-projectname-prod.c3iot.ai

How do I fill in the “my-environment” part of this url? Is it something I can determine from the above information, or is more needed?

Thanks!


#2

looking at your host url, the environment should be companyname-dev2-projectname-prod


#3

Thats what I was thinking before, however it kept throwing this error:

ConnectionError: HTTPSConnectionPool(host=‘companyname-dev2-projectname-prod.c3-e.com’, port=443): Max retries exceeded with url: /version/1 (Caused by NewConnectionError(’<urllib3.connection.VerifiedHTTPSConnection object at 0x7fd3cc89d750>: Failed to establish a new connection: [Errno -2] Name or service not known’,))

from the call:

c3 = typesys.C3ServerConnection(“https://companyname-dev2-projectname-prod.c3-e.com”,“companyname”,“prod”)


#4

how do you connect to the console on this environment? you should use that same hostname/domain.


#5

I’m a bit lost/not quite familiar with what that means (sorry, first time trying to access this data via Jupyter notebook – a different looking method was used for the lightbulb demo projects in the training).


#6

How did you get to the page where do you see the information listed above? use the hostname/domain of the page (which is what I was refer as console)


#7

Oh yeah, sorry, the page (with the real names) is
https://3m-dev2-inventoryanalysis-prod.c3iot.ai/static/console/


#8

ok so you should try with 3m-dev2-inventoryanalysis-prod.c3iot.ai, I think no need to add the prefix https


#9

Running it, looks like it didn’t get mad immediately. Thanks!

Also, in general, with the Jupyter notebook: is it setup such that I can look at the production data without disrupting the customers using the apps in production?


#10

I think it would better if you run your ad hoc analysis on QA rather than prod.