Skip to content

sqlalchemy overlap warning #110

@corviday

Description

@corviday

SQLAlchemy gives the following warnings when interacting with the most recent version of the modelmeta ORM:

/local_temp/lzeman/modelmeta/venv/lib64/python3.6/site-packages/sqlalchemy/orm/relationships.py:3454: SAWarning: relationship 'DataFileVariableDSGTimeSeriesXStation.data_file_variable_dsg_ts' will copy column data_file_variables_dsg_time_series.data_file_variable_dsg_ts_id to column data_file_variables_dsg_time_series_x_stations.data_file_variable_dsg_ts_id, which conflicts with relationship(s): 'DataFileVariableDSGTimeSeries.stations' (copies data_file_variables_dsg_time_series.data_file_variable_dsg_ts_id to data_file_variables_dsg_time_series_x_stations.data_file_variable_dsg_ts_id), 'Station.data_file_variables' (copies data_file_variables_dsg_time_series.data_file_variable_dsg_ts_id to data_file_variables_dsg_time_series_x_stations.data_file_variable_dsg_ts_id). If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read-only. For the less common case that foreign key constraints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards.   The 'overlaps' parameter may be used to remove this warning.
  for (pr, fr_) in other_props
/local_temp/lzeman/modelmeta/venv/lib64/python3.6/site-packages/sqlalchemy/orm/relationships.py:3454: SAWarning: relationship 'DataFileVariableDSGTimeSeriesXStation.station' will copy column stations.station_id to column data_file_variables_dsg_time_series_x_stations.station_id, which conflicts with relationship(s): 'DataFileVariableDSGTimeSeries.stations' (copies stations.station_id to data_file_variables_dsg_time_series_x_stations.station_id), 'Station.data_file_variables' (copies stations.station_id to data_file_variables_dsg_time_series_x_stations.station_id). If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read-only. For the less common case that foreign key constraints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards.   The 'overlaps' parameter may be used to remove this warning.
  for (pr, fr_) in other_props
/local_temp/lzeman/modelmeta/venv/lib64/python3.6/site-packages/sqlalchemy/orm/relationships.py:3454: SAWarning: relationship 'DataFile.run' will copy column runs.run_id to column data_files.run_id, which conflicts with relationship(s): 'Run.time_set' (copies runs.run_id to data_files.run_id). If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read-only. For the less common case that foreign key constraints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards.   The 'overlaps' parameter may be used to remove this warning.
  for (pr, fr_) in other_props
/local_temp/lzeman/modelmeta/venv/lib64/python3.6/site-packages/sqlalchemy/orm/relationships.py:3454: SAWarning: relationship 'Run.files' will copy column runs.run_id to column data_files.run_id, which conflicts with relationship(s): 'Run.time_set' (copies runs.run_id to data_files.run_id). If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read-only. For the less common case that foreign key constraints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards.   The 'overlaps' parameter may be used to remove this warning.
  for (pr, fr_) in other_props
/local_temp/lzeman/modelmeta/venv/lib64/python3.6/site-packages/sqlalchemy/orm/relationships.py:3454: SAWarning: relationship 'DataFile.timeset' will copy column time_sets.time_set_id to column data_files.time_set_id, which conflicts with relationship(s): 'Run.time_set' (copies time_sets.time_set_id to data_files.time_set_id). If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read-only. For the less common case that foreign key constraints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards.   The 'overlaps' parameter may be used to remove this warning.
  for (pr, fr_) in other_props
/local_temp/lzeman/modelmeta/venv/lib64/python3.6/site-packages/sqlalchemy/orm/relationships.py:3454: SAWarning: relationship 'TimeSet.files' will copy column time_sets.time_set_id to column data_files.time_set_id, which conflicts with relationship(s): 'Run.time_set' (copies time_sets.time_set_id to data_files.time_set_id). If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read-only. For the less common case that foreign key constraints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards.   The 'overlaps' parameter may be used to remove this warning.
  for (pr, fr_) in other_props
/local_temp/lzeman/modelmeta/venv/lib64/python3.6/site-packages/sqlalchemy/orm/relationships.py:3454: SAWarning: relationship 'Variable.data_files_variables' will copy column variable_aliases.variable_alias_id to column variables.variable_alias_id, which conflicts with relationship(s): 'Variable.variable_aliases' (copies variable_aliases.variable_alias_id to variables.variable_alias_id). If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read-only. For the less common case that foreign key constraints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards.   The 'overlaps' parameter may be used to remove this warning.
  for (pr, fr_) in other_props
/local_temp/lzeman/modelmeta/venv/lib64/python3.6/site-packages/sqlalchemy/orm/relationships.py:3454: SAWarning: relationship 'DataFileVariable.variable_alias' will copy column variable_aliases.variable_alias_id to column data_file_variables.variable_alias_id, which conflicts with relationship(s): 'Variable.data_files_variables' (copies variable_aliases.variable_alias_id to data_file_variables.variable_alias_id). If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read-only. For the less common case that foreign key constraints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards.   The 'overlaps' parameter may be used to remove this warning.
  for (pr, fr_) in other_props
/local_temp/lzeman/modelmeta/venv/lib64/python3.6/site-packages/sqlalchemy/orm/relationships.py:3454: SAWarning: relationship 'VariableAlias.data_file_variables' will copy column variable_aliases.variable_alias_id to column data_file_variables.variable_alias_id, which conflicts with relationship(s): 'Variable.data_files_variables' (copies variable_aliases.variable_alias_id to data_file_variables.variable_alias_id). If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read-only. For the less common case that foreign key constraints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards.   The 'overlaps' parameter may be used to remove this warning.
  for (pr, fr_) in other_props
/local_temp/lzeman/modelmeta/venv/lib64/python3.6/site-packages/sqlalchemy/orm/relationships.py:3454: SAWarning: relationship 'DataFile.variable_aliases' will copy column data_files.data_file_id to column data_file_variables.data_file_id, which conflicts with relationship(s): 'DataFileVariable.file' (copies data_files.data_file_id to data_file_variables.data_file_id), 'DataFile.data_file_variables' (copies data_files.data_file_id to data_file_variables.data_file_id). If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read-only. For the less common case that foreign key constraints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards.   The 'overlaps' parameter may be used to remove this warning.
  for (pr, fr_) in other_props
/local_temp/lzeman/modelmeta/venv/lib64/python3.6/site-packages/sqlalchemy/orm/relationships.py:3454: SAWarning: relationship 'DataFile.variable_aliases' will copy column variable_aliases.variable_alias_id to column data_file_variables.variable_alias_id, which conflicts with relationship(s): 'Variable.data_files_variables' (copies variable_aliases.variable_alias_id to data_file_variables.variable_alias_id), 'DataFileVariable.variable_alias' (copies variable_aliases.variable_alias_id to data_file_variables.variable_alias_id), 'VariableAlias.data_file_variables' (copies variable_aliases.variable_alias_id to data_file_variables.variable_alias_id). If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read-only. For the less common case that foreign key constraints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards.   The 'overlaps' parameter may be used to remove this warning.
  for (pr, fr_) in other_props
/local_temp/lzeman/modelmeta/venv/lib64/python3.6/site-packages/sqlalchemy/orm/relationships.py:3454: SAWarning: relationship 'VariableAlias.data_files' will copy column variable_aliases.variable_alias_id to column data_file_variables.variable_alias_id, which conflicts with relationship(s): 'Variable.data_files_variables' (copies variable_aliases.variable_alias_id to data_file_variables.variable_alias_id), 'DataFileVariable.variable_alias' (copies variable_aliases.variable_alias_id to data_file_variables.variable_alias_id), 'VariableAlias.data_file_variables' (copies variable_aliases.variable_alias_id to data_file_variables.variable_alias_id). If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read-only. For the less common case that foreign key constraints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards.   The 'overlaps' parameter may be used to remove this warning.
  for (pr, fr_) in other_props
/local_temp/lzeman/modelmeta/venv/lib64/python3.6/site-packages/sqlalchemy/orm/relationships.py:3454: SAWarning: relationship 'VariableAlias.data_files' will copy column data_files.data_file_id to column data_file_variables.data_file_id, which conflicts with relationship(s): 'DataFileVariable.file' (copies data_files.data_file_id to data_file_variables.data_file_id), 'DataFile.data_file_variables' (copies data_files.data_file_id to data_file_variables.data_file_id). If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read-only. For the less common case that foreign key constraints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards.   The 'overlaps' parameter may be used to remove this warning.
  for (pr, fr_) in other_props
/local_temp/lzeman/modelmeta/venv/lib64/python3.6/site-packages/sqlalchemy/orm/relationships.py:3454: SAWarning: relationship 'Variable.variable_alias' will copy column variable_aliases.variable_alias_id to column variables.variable_alias_id, which conflicts with relationship(s): 'Variable.variable_aliases' (copies variable_aliases.variable_alias_id to variables.variable_alias_id), 'Variable.data_files_variables' (copies variable_aliases.variable_alias_id to variables.variable_alias_id). If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read-only. For the less common case that foreign key constraints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards.   The 'overlaps' parameter may be used to remove this warning.
  for (pr, fr_) in other_props
/local_temp/lzeman/modelmeta/venv/lib64/python3.6/site-packages/sqlalchemy/orm/relationships.py:3454: SAWarning: relationship 'VariableAlias.variable' will copy column variable_aliases.variable_alias_id to column variables.variable_alias_id, which conflicts with relationship(s): 'Variable.variable_aliases' (copies variable_aliases.variable_alias_id to variables.variable_alias_id), 'Variable.data_files_variables' (copies variable_aliases.variable_alias_id to variables.variable_alias_id). If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read-only. For the less common case that foreign key constraints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards.   The 'overlaps' parameter may be used to remove this warning.
  for (pr, fr_) in other_props

Looks like there are some fancy flags we should set to handle the split between gridded datasets and discrete structured geometry datasets.

I didn't see these warnings last week, so they may represent some new sqlalchemy functionality. It looiks like a new version was released today, and we haven't pinned. Solution may be either researching the fancy new flags and applying as indicated, or pinning to an older version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions