Skip to content

Commit

Permalink
feat: clean feature download for translate table
Browse files Browse the repository at this point in the history
  • Loading branch information
AldemirLucas committed Aug 5, 2024
1 parent 6844ebf commit 25bdbf1
Show file tree
Hide file tree
Showing 6 changed files with 146 additions and 110 deletions.
26 changes: 13 additions & 13 deletions next/components/molecules/DataInformationQuery.js
Original file line number Diff line number Diff line change
Expand Up @@ -790,13 +790,13 @@ export default function DataInformationQuery({ resource }) {
>
<CodeHighlight language="python">{`import basedosdados as bd
billing_id = <seu_billing_id>
billing_id = <seu_billing_id>
query = """
${sqlCode}
"""
query = """
${sqlCode}
"""
bd.read_sql(query = query, billing_project_id = billing_id)`}
bd.read_sql(query = query, billing_project_id = billing_id)`}
</CodeHighlight>
</Skeleton>
</TabPanel>
Expand Down Expand Up @@ -860,16 +860,16 @@ export default function DataInformationQuery({ resource }) {
isLoaded={!isLoadingCode}
>
<CodeHighlight language="r">{`
# Defina o seu projeto no Google Cloud
set_billing_id("<YOUR_PROJECT_ID>")
# Defina o seu projeto no Google Cloud
set_billing_id("<YOUR_PROJECT_ID>")
# Para carregar o dado direto no R
query <- "
${sqlCode}
"
# Para carregar o dado direto no R
query <- "
${sqlCode}
"
read_sql(query, billing_project_id = get_billing_id())
`}
read_sql(query, billing_project_id = get_billing_id())
`}
</CodeHighlight>
</Skeleton>
</TabPanel>
Expand Down
18 changes: 17 additions & 1 deletion next/components/organisms/BdmTablePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ export default function BdmTablePage({ id }) {
:
"Não informado"
}: Última vez que atualizaram na fonte original
{resource?.rawDataSource?.[0]?.updates?.[0]?.entity?.slug &&
{resource?.rawDataSource?.[0]?.updates?.[0]?.entity?.slug ?
<Text
backgroundColor="#EEEEEE"
padding="2px 4px"
Expand All @@ -403,6 +403,22 @@ export default function BdmTablePage({ id }) {
>
{getUpdateFormat(resource?.rawDataSource?.[0]?.updates?.[0]?.entity?.slug)}
</Text>
:
!resource?.rawDataSource?.[0]?.updates?.[0] || !resource?.updates?.[0]?.frequency ?
<Text
backgroundColor="#EEEEEE"
padding="2px 4px"
borderRadius="4px"
fontFamily="Roboto"
fontWeight="500"
fontSize="12px"
lineHeight="18px"
color="#252A32"
>
Sem previsão de atualização
</Text>
:
<></>
}
</Box>
<Text
Expand Down
1 change: 1 addition & 0 deletions next/pages/dataset/[dataset].js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ export default function DatasetPage ({ dataset }) {
>
<GridItem
display="flex"
height="fit-content"
justifyContent="center"
border="1px solid #DEDFE0"
borderRadius="16px"
Expand Down
Loading

0 comments on commit 25bdbf1

Please sign in to comment.