Comments (2)
@aborruso
I appreciate if you find it useful.
sqlitebiter using "-a" creates one db and 237 tables. Is it possible to append every source table to only one destination table (the structure is the same)?
I had added an experimental feature (--convert-config
option) at sqlitebiter 0.26.0
to enables the above.
You could append every source table to only one destination table by the below command and the config file:
$ sqlitebiter -a --convert-config convert_config.json url https://si.siciliafse1420.it/elencobeneficiari?page=N
convert_config.json
is as follows:
{
"url" : [
{
"target_url": "https://si.siciliafse1420.it/elencobeneficiari?page=",
"rules": {
"P.IVA/CF" : {
"type hint": "text"
}
}
}
]
}
I tested https://si.siciliafse1420.it/elencobeneficiari?page=1
to ...?page=10
can be converted to one destination table.
without the configuration file, sqlitebiter
detects column data types from actual data and create(or append) a table.
If a detected table schema does not match with the existing table, sqlitebiter
will create another table with a different table name even if -a
option specified.
For example:
https://si.siciliafse1420.it/elencobeneficiari?page=1
https://si.siciliafse1420.it/elencobeneficiari?page=2
these pages detected different schema as follows.
page=1
Field | Type | Null | Key | Default | Index | Extra |
---|---|---|---|---|---|---|
Cod. interno | INTEGER | YES | NULL | |||
CIP | TEXT | YES | NULL | |||
Titolo | TEXT | YES | NULL | |||
CUP | TEXT | YES | NULL | |||
Soggetto | TEXT | YES | NULL | |||
P.IVA/CF | TEXT | YES | NULL | |||
Comune sede legale | TEXT | YES | NULL | |||
Indirizzo sede legale | TEXT | YES | NULL | |||
Importo finanziato | TEXT | YES | NULL | |||
Importo finanziato spesa pubblica | TEXT | YES | NULL | |||
Spese certificate | TEXT | YES | NULL |
page=2
Field | Type | Null | Key | Default | Index | Extra |
---|---|---|---|---|---|---|
Cod. interno | INTEGER | YES | NULL | |||
CIP | TEXT | YES | NULL | |||
Titolo | TEXT | YES | NULL | |||
CUP | TEXT | YES | NULL | |||
Soggetto | TEXT | YES | NULL | |||
P.IVA/CF | INTEGER | YES | NULL | |||
Comune sede legale | TEXT | YES | NULL | |||
Indirizzo sede legale | TEXT | YES | NULL | |||
Importo finanziato | TEXT | YES | NULL | |||
Importo finanziato spesa pubblica | TEXT | YES | NULL | |||
Spese certificate | TEXT | YES | NULL |
In this case, page=1
P.IVA/CF
column type is TEXT
(because include value other than numbers such as "-"
), while page=2
P.IVA/CF
column type is INTEGER
. So, considered as different schema.
from sqlitebiter.
Hi @thombashi first of all thank you very much.
It works!!!
I'm opening a new related feature request
from sqlitebiter.
Related Issues (20)
- update $archive value to "sqlitebiter_windows_amd64.zip" in get-sqlitebiter.ps1 HOT 1
- How do I specify columns orders when loading form an array of JSON objects? HOT 3
- Handle Wikipedia table faulty boolean design; and HTML headers with row/colspan > 1 (also XLS) HOT 1
- XLS import FAILs when a header cell is blank
- XLSX conversion crashes with NoneType for authorId, seems related to cell comments
- json to sqlLite Error HOT 1
- ODS Support
- Convert excel DATE to sqlite DATE
- Unable to locate package HOT 1
- Retain leading zeros when converting text or --no-type-inference HOT 1
- Support simple hierarchical JSON HOT 2
- Automatically detect and create Primary and Foreign Keys HOT 2
- Better default name for database file
- Non able to create output, starting from a simple html page HOT 4
- incompatibility between pip V22 json output and sqlitebiter HOT 1
- Installation dpkg (.deb package) Failing HOT 1
- Convert to spaces HOT 2
- Add --unescape option HOT 1
- Allow inferring source format from alternate string HOT 6
- sqlite3.IntegrityError: NOT NULL constraint failed: _source_info_.format_name HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sqlitebiter.