Skip to content

Failure when there is a hyphen in project names #1545

Description

@woop

Expected Behavior

Able to run feast apply when there is a hyphen in the project name

Current Behavior

Registered entity year_month_day
Registered feature view serve_weather_features
Deploying infrastructure for serve_weather_features
Traceback (most recent call last):
  File "/home/willem/.pyenv/versions/3.7.7/bin/feast", line 33, in <module>
    sys.exit(load_entry_point('feast', 'console_scripts', 'feast')())
  File "/home/willem/.pyenv/versions/3.7.7/lib/python3.7/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/willem/.pyenv/versions/3.7.7/lib/python3.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/willem/.pyenv/versions/3.7.7/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/willem/.pyenv/versions/3.7.7/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/willem/.pyenv/versions/3.7.7/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/willem/Projects/feast/sdk/python/feast/cli.py", line 163, in apply_total_command
    apply_total(repo_config, Path.cwd())
  File "/home/willem/Projects/feast/sdk/python/feast/repo_operations.py", line 208, in apply_total
    partial=False,
  File "/home/willem/Projects/feast/sdk/python/feast/infra/local.py", line 61, in update_infra
    f"CREATE TABLE IF NOT EXISTS {_table_id(project, table)} (entity_key BLOB, feature_name TEXT, value BLOB, event_ts timestamp, created_ts timestamp,  PRIMARY KEY(entity_key, feature_name))"
sqlite3.OperationalError: near "-": syntax error

Steps to reproduce

Clone https://github.com/dmatrix/mlflow-tests/tree/master/py/delta-lake
Run feast apply

Specifications

  • Version: 0.10.3

Possible Solution

The problem is that we don't support hyphens in project names. We should either prevent the use of hyphens or support them at the storage layer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions