How to connect a calc sheet using pyodbc interface - pyodbc

Is there already a pyodbc interface to connect to the (libreoffice) calc sheets. I can see there is one for micro$oft excel but not for the former.
I am building a data visualisation tool (very premature and scaffolding) for the blender 3D modelling tool
https://blenderartists.org/t/bui-blender-user-interface-scientific-visualisation/1244457
and would like to connect for now the calc to blender through pyodbc
possible?
KR
Hewi

Related

connect to snowflake via odbc driver on mac m1

According to this, if I read this correctly, Tableau desktop on a Mac M1 cannot use the snowflake ODBC driver. Is this still true? Generally, my ODBC driver for snowflake works.
PS:
#aek I still get:
in Tableau. I installed:
2.25.3 snowflake_odbc_mac-2.25.3.dmg mac64
and configured odbc.ini files and everything appears to work fine in:
If I run (as suggested here):
"/Library/Application Support/iODBC/bin/iodbctest"
I get:
1: SQLDriverConnect = [iODBC][Driver Manager]dlopen(/opt/snowflake/snowflakeodbc/lib/universal/libSnowflake.dylib, 0x0006): tried: '/opt/snowflake/snowflakeodbc/lib/universal/libSnowflake.dylib' (fat file, but missing compatible architecture (have 'i386,x86_64', need 'arm64')) (0) SQLSTATE=00000
2: SQLDriverConnect = [iODBC][Driver Manager]Specified driver could not be loaded (0) SQLSTATE=IM003
Is there anything I can/have to do that Tableau recognised the driver?
Yes, this is still true (for v. 2022.3). According to the spec, Tableau Desktop still works in emulation mode. The application and driver must have the same architecture. So for Tableau Desktop, you need to use the Mac64 version of the driver, as the article suggests.
Edit: How to make it working.
The native Snowflake connector in Tableau will try to use the "OS architecture appropriate" driver. Which is not the case for an x64 app running on ARM. Therefore, when configuring the connection, instead of choosing Snowflake from the list, you should use Other Databases (ODBC) and select the Snowflake DSN configured with the Mac64 version of the driver accordingly to the doc.

Differences between using Sagemaker notebook vs Glue (Sagemaker) notebook

I have a Machine Learning job I want to run with Sagemaker. For data preparation and transformation, I am using some numpy and pandas steps to transform them with notebook.
I noticed AWS Glue have both Sagemaker and Zeppelin notebook which can be created via development endpoint
There isn't much info online i could find what's the difference and benefit of using one over another (i.e. Sagemaker notebook and import from s3 vs creating notebook from Glue)
From what i researched and tried it seems that i can achieve same thing with both:
Sagemaker notebook and import directly from s3 + further python code to process the data
Glue (need to crawl and create dataset) as shown here, create dev endpoint and use similar script to process the data.
Anyone able to shed light on this?
The question isn't clear but let me explain this point.
When you launch a Glue Development endpoint you can attach either a SageMaker notebook or Zeppelin notebook. Both will be created and configured by Glue and your script will be executed on the Glue Dev endpoint.
If your question is "what is the difference between a SageMaker notebook created from Glue console and a SageMaker notebook created from SageMaker console?
When you create a notebook instance from Glue console, the created notebook will always have public internet access enabled. This blog explains the difference between the networking configurations with SM notebooks. You cannot also create the notebook with a specific disk size but you can stop the notebook once it's created and increase disk size.
If your question is "what is the difference between SageMaker notebook and Zeppelin notebooks?"
The answer is the first one used Jupter (very popular) while the second one uses Zeppelin.
If your question is "what is the difference between using only a SageMaker notebook versus using SM notebook + Glue dev Endpoint?"
The answer is: if you are running normal pandas + numpy without using Spark, SM notebook is much cheaper (if you use small instance type and if your data is relatively small). However, if you are trying to process a large dataset and you are planning to use spark, then SM notebook + Glue Dev endpoint will be the best option to develop the job which will be executed later as a Glue Job (transformation job) (server less).
SM notebook is like running python code on an EC2 instance versus SM notebook + Glue which is used to develop ETL jobs which you can launch to process deltas.
If you are using only numpy and pandas, functions-wise it doesn't make a real difference. But it depends on your data as well, if you want to work with data sitting in a Glue table it would be easier to work with Zeppelin notebooks via an endpoint.
Costwise I am pretty sure that Sagemaker is less expensive.

3D Graph Network Topology Unknown search command fit

I am new to splunk so I will try to be as clear as possible. I wanted to test the visualization of networkx graphs in Splunk 3D Graph Network Topology App. I was able to load the csv file of the graph successfully and I can see the data and the graph visualization. However, when I run community detection algorithm, it shows me the following error:
Unknown search command: 'fit'
Can somebody help me fix the issue please, thanks.
Make sure you have the prerequisite apps installed, especially the Machine Learning Toolkit, which provides the fit command. See https://splunkbase.splunk.com/app/4611/#/details.

Connecting R to Osisoft Pi Historian

I'm trying to connect R to Osisoft Pi Historian with no success. Has anyone done this before or is there a package I can install?
This simple script doesn't return any connections, I haven't used RODBC so could be way off track, thanks for any suggestions.
library(RODBC)
x <- odbcDataSources()
Do you have the OSIsoft PI ODBC driver installed on your system?
Have you checked out OSIsofts own whitepaper
Integrating the PI System with R
Im assuming you are using R Console only? in which case there are examples in the bottom of the article.
I previously used R Dot Net and the AF SDK to process PI data in R,
Many ways to skin the cat...

From R to scala: Importing Libraries

I came from R and I am trying to use scala to explore the possibilities to do data science. I don't have any background in programming or computer science, my background is pretty much statistical. So far I am only using scala from the REPL, which I like because it reminds my of the R console.
I am encountering problems when I am trying to import new libraries. In R, within the R console, I would just type
library(tidyverse)
In scala I am trying to do something similar, however it doesn't really work. Here what I see:
Welcome to Scala 2.12.6 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_172).
Type in expressions for evaluation. Or try :help.
scala> import org.apache.spark.mllib.linalg.vectors
<console>:11: error: object apache is not a member of package org
import org.apache.spark.mllib.linalg.vectors
^
What am I doing wrong?
Thanks
Apache Spark is not a simple package that you can import from the standard Scala library, but rather somewhat of an ecosystem on its own, consisting of JARs with Java/Scala API's, cluster managers, distributed file systems, various launcher scripts and interactive shells (for Scala, but e.g. also for Python).
It's not a single interactive script that you run on your computer. It's rather a complex conglomerate of cooperating programs running on a cluster.
You have several options:
Use SBT: declare spark as a dependency in build.sbt, run it in standalone-mode from the SBT console or as properly built project, with run
Essentially same as 1., but use Ammonite with $ivy imports for managing dependencies.
Just go to the Spark website and follow installation instructions there. Among many other things, it should sooner or later give you a script that starts an interactive Scala REPL with all the dependencies that are needed to run Spark jobs.
I'd suggest to go right to step 3. and download Spark from here.

Resources