How to upgrade SQLite in AWS MWAA Airflow? - amazon-web-services

I am using yfinance library to get some values like market_cap.
Code:-
import yfinance as yf
com = yf.Ticker('1140.SR')
print(com.fast_info['market_cap'])
I've updated the library to latest version i.e. 0.2.9 locally and on AWS MWAA Apache Airflow.
Locally, I'm able to run the code.
But on Amazon MWAA Airflow, I'm getting an error 'near "without": syntax error'.
Based on my searching, I believe, that the issue is because of a lower version of SQLite. One person was able to resolve the issue by upgrading SQLite version - https://github.com/ranaroussi/yfinance/issues/1372
Locally, here is the configuration:-
Python version - 3.10.8
yfinance - 0.2.9
SQLite3 - 3.37.2
and my Amazon MWAA Airflow configuration is:-
Python version - 3.10.8 (main, Jan 17 2023, 22:57:31) [GCC 7.3.1 20180712 (Red Hat 7.3.1-15)]
yfinance - 0.2.9
SQLite3 - 3.7.17
SQLite is not a python library version, but it’s the a system-level application that needs to be upgraded manually.
I'm able to do locally, but how do I upgrade SQLite to >3.34.x version on Amazon MWAA?
Can anyone help me?
Tried upgrading SQLITE version with requirements file. It didn't work.
apache-airflow-providers-sqlite==3.3.1

Related

Will there be any compatibility issue if i upgrade my Databricks run time version

Will there be any issue in my current notebooks and jobs if i upgrade my Databricks run time version from 9.1 LTS to 10.4 LTS
I didn't tried upgrading the version. If I upgrade it then will I be able to change it back to previous version
It's really a very broad question - exact answer depends on the features and libraries/connectors that you're using in your code. You can refer to the Databricks Runtime 10.x migration guide and Spark 3.2.1 migration guide for more information about upgrade.
Usually, the correct way to do is to try to run your job with new runtime, but using the test environment, where your production data won't be affected.

Django deployment error deango.core.exceptions.ImproperlyConfigured

Hey i have an django application which is working fine locally but its not working when it is hosted on a web showing below error
django.core.exceptions.ImproperlyConfigured: Error loading pyodbc module: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /home/site/wwwroot/antenv/lib/python3.7/site-packages/pyodbc.cpython-37m-x86_64-linux-gnu.so)
Did i miss anything at the time of hosting?
Assuming you got this issue during deployment via DevOps pipeline, you could specify an exact version of python in the UsePythonVersion (including minor version) task.
Supported python versions, you could check the software of the agent image:
https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops&tabs=yaml#software
Also, you could try the solution in the following case, by adding deadsnakes repo, installing 3.7 and symlink python to python3.7:
https://github.com/actions/virtual-environments/issues/2634#issuecomment-775808754

Apache Airflow is inconsistent with getting the google-cloud-bigquery versions installed on the gcp compute engine instance

I am using the Apache Airflow version 1.8.1.
We have two GCP instances master and worker where we have installed some specific versions of GCP.
The version installed for google-cloud-bigquery is 1.6.0 on both instances .
A piece of code bring in error of version for google-cloud-bigquery.
bigquery_client = bigquery.Client()
dataset_ref = bigquery_client.dataset(dataset, project=project)
tables = list(bigquery_client.list_tables(dataset_ref))
Error message:
tables = list(bigquery_client.list_tables(dataset_ref))
{bash_operator.py:94} INFO - AttributeError: 'Client' object has no attribute 'list_tables'
Added the pip freeze command to check which version is being picked and found whenever the version 0.26.0 is picked , the code fails but works fine with 1.6.0.
I have never installed version 0.26.0 for google-cloud-bigquery , unable to debug how it gets picked up and from which machine.

Compatibility between MongoDB server and Mongo C++ Driver

I'm new to the MongoDB. My virtual machine runs Ubuntu 14.04.5 with mongod, which is standard for this OS:
hekto#ubuntu:~$ mongod --version
db version v2.4.9
Tue Jun 5 18:00:23.923 git version: nogitversion
I've built a Mongo C++ Driver Ver 3.2.0 from sources and tried to write some tests. All of them output an exception below:
Server at localhost:27017 reports wire version 0, but this version of libmongoc requires at least 3 (MongoDB 3.0): generic server error
It looks like the C++ client and the server are incompatible.
Are there any tricks, which can be used with the Mongo C++ Driver to force it to work with older Mongo servers?
I can't convert the database itself to any new format for now, but also wouldn't like to learn the obsolete driver API.
MongoDB 2.4.9 has been end-of-life for quite some time: https://www.mongodb.com/support-policy, and most drivers have dropped support for talking to it.
If you are just starting with MongoDB, you should start with the newest available stable version, which is currently 3.6.5.
You can obtain packages for Ubuntu 14.04 according to the instructions here https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/

Redis version on Cloudbees is out of date?

I'm setting up an OSS build in Cloudbees with /usr/sbin/redis-server being started as one of the build tasks:
+ /usr/sbin/redis-server
[204] 04 Nov 03:52:58 # Warning: no config file specified, using the default config. In order to specify a config file use 'redis-server /path/to/redis.conf'
[204] 04 Nov 03:52:58 * Server started, Redis version 2.0.3
The (Redis site)[http://redis.io/download] shows 2.6.2 to be the current version and 2.4.17 as "legacy". On the extended downloads page, version 2.0.3 is deprecated.
Am I launching it the wrong server executable, or are there plans to support a more recent version of Redis?
We need to upgrade the build machines so that packages like this can be upgraded. We will do so soon.
CloudBees now has the latest versions of Redis (2.6.4, 2.4.17, 2.2.12) built and available using our add-on system. This lets us offer newer versions of packages than are supported by the operating system packages.
You can find more information on this on our Redis page - https://developer.cloudbees.com/bin/view/DEV/Redis