Comments (6)
So internal id 3 gets deleted, leaving the sequences as 1,2,4? Probably more a question for the openLCA guys. I don't think they're used as a reference at all - don't know how it would cause problems. Those feel like famous last words though.
I seem to recall that this sort of thing could cause a validation error when you validate a database. @pweilerERG do you recall if that's the case?
Yes - non-consecutive internalids will cause validation errors in the database. This should work to reset them -
from java.util import Date
dao = ProcessDao(db)
for d in dao.getDescriptors():
p = dao.getForId(d.id)
p.lastInternalId = 0
for e in p.exchanges:
e.internalId = p.lastInternalId + 1
p.lastInternalId += 1
v = Version(p.version)
v.incUpdate()
p.version = v.getValue()
p.lastChange = Date().getTime()
dao.update(p)
from electricitylci.
@m-jamieson, from what I can tell, you don't need the two JOIN
statements in the second query, right? They were added in the first query just for the return table from the SELECT
statement.
NM. I see that flow table holds the required "flow_type" property used for the comparison.
from electricitylci.
I know internal IDs on exchanges are just a clerical thing, but do we know if there any concern if the exchange list IDs are non-consecutive? Cause this is gonna punch a lot of holes.
from electricitylci.
@m-jamieson, from what I can tell, you don't need the two
JOIN
statements in the second query, right? They were added in the first query just for the return table from theSELECT
statement.
Yes, you're right.
from electricitylci.
I know internal IDs on exchanges are just a clerical thing, but do we know if there any concern if the exchange list IDs are non-consecutive? Cause this is gonna punch a lot of holes.
You're talking about within an existing database? So internal id 3 gets deleted, leaving the sequences as 1,2,4? Probably more a question for the openLCA guys. I don't think they're used as a reference at all - don't know how it would cause problems. Those feel like famous last words though.
from electricitylci.
So internal id 3 gets deleted, leaving the sequences as 1,2,4? Probably more a question for the openLCA guys. I don't think they're used as a reference at all - don't know how it would cause problems. Those feel like famous last words though.
I seem to recall that this sort of thing could cause a validation error when you validate a database. @pweilerERG do you recall if that's the case?
from electricitylci.
Related Issues (20)
- What impact assessment method? HOT 4
- Globals, references to globals, and editing references of globals
- Forced BA aggregation for FERC and US, but what about eGRID? HOT 3
- Should PC link to petcoke UP? HOT 2
- KeyError in fill_default_provider_uuids
- Missing data file reference in Wiki
- No fuel category in Stewi's getInventoryFacilities for eGRID 2020 HOT 1
- _exchange_table_creation_ref missing renewables HOT 1
- EIA coalpublic2021.xls Excel file format cannot be determined HOT 1
- Missing International Mix data for 2021 onward HOT 3
- Addressing the Industrial Cogeneration Problem and Implementing the filter in model_config HOT 1
- Fix output exchange flows mislabeled as resources HOT 5
- Mexican balancing authority labeled as Canada in BA_Codes_930.xlsx HOT 7
- No 2022 EIA transmission and distribution loss data HOT 3
- Missing Canadian Exports for 2021 and beyond HOT 1
- Fix region mis-match between consumption and distribution mixes
- Incorrect output flow for "at grid; consumption mix" HOT 2
- Issues with the electricity column in generate_plant_water_use() HOT 1
- Update coal model inventories
- Set temporal representativeness attribute for processes to inventory vintage, not target year
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 electricitylci.