How can we create a raster attribute table using QGIS Python - plugins

I have a couple of raster files and I need to create attribute tables for them in QGIS using PyQGIS. I have tried raster attribute table plugin but how can I do it from the Python console?

Related

Create parent without template table using pg_partman

I installed pg_partman extension and it seems to work well, but I have a problem, using the function create_parent. Using it without specifying p_template_table will generate a template table automatically. But I don't want that, because I don't need that template table. Is there any way to create a parent without generating a template table?

How to I upload table to Apache Superset?

I'm trying to upload a dataset to be viewed in Superset.
I created a postgres databased and able to connect via the URI: postgresql://user:password#localhost:port
I created a table called NYC Taxi with a table called nyctaxi.
However, when I tried to add the table to superset, I get the following error:
Table [nyctaxi] could not be found, please double check your database connection, schema, and table name, error: nyctaxi
if you have the data in CSV you can load it using the UPLOAD CSV from the source menu.
I have an small demo here

Talend Open Studio : creating table in MySQL dynamically

I am trying to find out how to do dynamic creation of tables in MySQL using Talend.
In other ETL tools such as Pentaho they have a specific component called "metadata" to do this.
So my use case is the following:
1) Create database manually in MySQL
2) Use Talend to read CSV Header info, and use this as the fields of a table to be created in MySQL using Talend.
I have searched and could not find anything for this specific feature online.
[Note : using Talend Open Studio for Big Data Version: 6.4.1]
UPDATE:
I have made progress on this, but running into issues trying to generate a primary key on the MySQL output using the NumericSequence function.
My data does not have natively a primary key, but wish to include one:
I have a screenshot of the tMap attached here:
Also I am getting a compile/build error. It seems it does not like the primary key generation it seems.
See attached image.
And here also is the tMySQLOutput settings for Primary Key:
More Work Done:
I have changed the name of the Primary Key in the tMySQL component to match the name of the tMap output area component, i get the same compile error.
I will attach this error here:
To create dynamically MySQL tables in Talend, you can use one of the "Action on table" options in tMysqlOutput components (in your case, "Create table...").
https://help.talend.com/reader/4I8tDQGtrOPDl5MXAS3Q~w/aDNKleHXlevILu9pnbCoNg
Don't forget to define correctly PK fields for further inserts, updates, deletes...
Then, if necessary, through your favorite Database Tool (MySQL Workbench, DBeaver or other), you can retrieve the DDL (and DML) script(s).
I hope this answers to your problem/question.

QGIS no geom-columns found .. there is a genometry column

I have a database that keeps information for world map. When I export this to Quantum the map that is shown is not full. How can I solve that?
Sorry but your question is a little vague. What database are you using? How is the coordinates stored (can I assume decimal degrees, or are you using PostGIS and have a geometry column)? What geometry type are you trying to show?
If your DB is postgresql / postgis with a geom column, then you can select "Add Vector Layer" and check the "Database" radio button under "Source Type". You can then create a connection to that table and it will load the data just fine.
Alternatively, select the "Add PostGIS Layers" option and create a connection that way. You can follow the same steps if your database is MS Access etc and you can connect via ODBC.
If it doesn't then I think your issue will be in the database.
This part assumes you have point data:
If your database is excel, make sure your coordinate columns are the right data type and it is saved as .csv.
Select "Add Delimited Text Layer" in QGIS and you fill in the details for which are the X and Y coordinate columns. If you have a lot of columns it make things easier if your column headers are 'X' and 'Y' respectively.
Finally (again assuming point data) you could open the processing toolbox and search for 'Points Layer From Table'. If you don't see the processing button along the top of QGIS, then you've got to download it from the plugins manager (just search 'processing'). You need to state the layer, X field, Y field, and your CRS and that will create a new layer. NOTE the data is now separate from the database so any changes made to the layer are not reflected in the database. Unlike using PostGIS where the updates are live.
I hope this has helped, sorry if this has been a memory dump of all the ways I know without knowing a little more about your issue.

Why Plug-In Meta Data Import truncate table names?

I'm using Datastage 11.3.
When I try to import table definition via "Plug-In Meta Data Import", it truncates too long table names.
There is a way to prevents it from doing this?
I'm using the wizard, but if I want to use plug-in I still get the same problem.