Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions feathr_project/feathr/definition/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def to_feature_config(self) -> str:
anonymous: true
{% endif %}
}
{% if source.event_timestamp_column is defined %}
{% if source.event_timestamp_column %}
timeWindowParameters: {
timestampColumn: "{{source.event_timestamp_column}}"
timestampColumnFormat: "{{source.timestamp_format}}"
Expand Down Expand Up @@ -403,7 +403,7 @@ def to_feature_config(self) -> str:
table: "{{source.table}}"
{% endif %}
}
{% if source.event_timestamp_column is defined %}
{% if source.event_timestamp_column %}
timeWindowParameters: {
timestampColumn: "{{source.event_timestamp_column}}"
timestampColumnFormat: "{{source.timestamp_format}}"
Expand All @@ -418,11 +418,11 @@ def get_required_properties(self):
return []

def to_dict(self) -> Dict[str, str]:
ret = self.options.copy()
ret = {}
ret["type"] = "sparksql"
if self.sql:
if hasattr(self, "sql"):
ret["sql"] = self.sql
elif self.table:
elif hasattr(self, "table"):
ret["table"] = self.table
return ret

Expand Down Expand Up @@ -462,7 +462,7 @@ def to_feature_config(self) -> str:
{{option.key}}: "{{option.value}}"
{% endfor %}
}
{% if source.event_timestamp_column is defined %}
{% if source.event_timestamp_column %}
timeWindowParameters: {
timestampColumn: "{{source.event_timestamp_column}}"
timestampColumnFormat: "{{source.timestamp_format}}"
Expand Down