palantir / palantir/foundry-platform-python
[consult] How to build ontology in case of postgresql where table inherit exist
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 206
- Forks
- 50
- Avg merge
- 6d 3h
- Merged PRs (30d)
- 3
Description
Here in our case, we need to build ontology based on tables in postgresql databse.
-
There are multi table in database, and they have inherit relation(as postgresql support this), i use
sqlalchemyto describe these part of table as follows, here include base table likeSample, and inherited table likeDrySample; and there are futher inherited table likeAntiSampleandProteinSamplewhich inherited fromDrySample. -
In these case, how should i build ontology in palantir? I thought palantir not support object type inherit, am i right ? hoping for your kindly help and reply @jsmith @jameszhang244 @afloren-palantir @invliD @ericanderson @jmcampanini @akerl @tdeitch
class Sample(Base):
__tablename__ ='samples'
id: Mapped[int] = mapped_column(primary_key=True)
source: Mapped[int] = mapped_column(ForeignKey('experiments.id'))
type: Mapped[str] = mapped_column(String(255))
class DrySample(Sample):
__tablename__ = 'dry_samples'
id: Mapped[int] = mapped_column(ForeignKey('samples.id'), primary_key=True)
sample_id: Mapped[str] = mapped_column(String(255))
freeze_count: Mapped[int] = mapped_column(Integer, default=0)
class AntiSample(DrySample):
__tablename__ = 'anti_samples'
id: Mapped[int] = mapped_column(ForeignKey('dry_sample.id'), primary_key=True)
volume: Mapped[str] = mapped_column(Float)
class ProteinSample(DrySample):
__tablename__ = 'anti_samples'
id: Mapped[int] = mapped_column(ForeignKey('dry_sample.id'), primary_key=True)
protein_id: Mapped[int] = mapped_column(ForeignKey('proteins.id'))
description: Mapped[str] = mapped_column(Text)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No repository file, test, or entry point is identified; begin by clarifying whether this is a request for SDK documentation or guidance on modeling PostgreSQL inheritance in Foundry. Define the expected ontology behavior for Sample, DrySample, AntiSample, and ProteinSample before any contribution can be scoped.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, python, sqlalchemy
- Domain
- databases
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100